wok-4.x rev 11353
Use system passwd database (again)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue Nov 29 18:41:09 2011 +0100 (2011-11-29) |
parents | a6b781a0cffb |
children | 76ff4f7136d3 |
files | busybox/stuff/busybox-1.18-httpd.u |
line diff
1.1 --- a/busybox/stuff/busybox-1.18-httpd.u Tue Nov 29 18:11:22 2011 +0100 1.2 +++ b/busybox/stuff/busybox-1.18-httpd.u Tue Nov 29 18:41:09 2011 +0100 1.3 @@ -1,17 +1,17 @@ 1.4 Add support for system passwords 1.5 --- busybox-1.18.2/networking/httpd.c 1.6 +++ busybox-1.18.2/networking/httpd.c 1.7 -@@ -53,6 +53,8 @@ 1.8 +@@ -50,6 +50,8 @@ 1.9 * /cgi-bin:foo:bar # Require user foo, pwd bar on urls starting with /cgi-bin/ 1.10 * /adm:admin:setup # Require user admin, pwd setup on urls starting with /adm/ 1.11 * /adm:toor:PaSsWd # or user toor, pwd PaSsWd on urls starting with /adm/ 1.12 + * /adm:root:* # or user root, pwd from /etc/passwd on urls starting with /adm/ 1.13 + * /wiki:*:* # or any user from /etc/passwd with according pwd on urls starting with /wiki/ 1.14 * .au:audio/basic # additional mime type for audio.au files 1.15 - * *.php:/path/php # running cgi.php scripts through an interpreter 1.16 + * *.php:/path/php # run xxx.php through an interpreter 1.17 * 1.18 -@@ -96,6 +98,14 @@ 1.19 - */ 1.20 +@@ -94,6 +96,14 @@ 1.21 + /* TODO: use TCP_CORK, parse_config() */ 1.22 1.23 #include "libbb.h" 1.24 +#if ENABLE_PAM 1.25 @@ -23,9 +23,9 @@ 1.26 +# include <security/pam_misc.h> 1.27 +#endif 1.28 #if ENABLE_FEATURE_HTTPD_USE_SENDFILE 1.29 - #include <sys/sendfile.h> 1.30 + # include <sys/sendfile.h> 1.31 #endif 1.32 -@@ -1663,6 +1673,56 @@ 1.33 +@@ -1700,6 +1710,56 @@ 1.34 } 1.35 1.36 #if ENABLE_FEATURE_HTTPD_BASIC_AUTH 1.37 @@ -82,7 +82,7 @@ 1.38 /* 1.39 * Config file entries are of the form "/<path>:<user>:<passwd>". 1.40 * If config file has no prefix match for path, access is allowed. 1.41 -@@ -1672,7 +1732,7 @@ 1.42 +@@ -1709,7 +1769,7 @@ 1.43 * 1.44 * Returns 1 if user_and_passwd is OK. 1.45 */ 1.46 @@ -91,7 +91,7 @@ 1.47 { 1.48 Htaccess *cur; 1.49 const char *prev = NULL; 1.50 -@@ -1680,6 +1740,7 @@ 1.51 +@@ -1717,6 +1777,7 @@ 1.52 for (cur = g_auth; cur; cur = cur->next) { 1.53 const char *dir_prefix; 1.54 size_t len; 1.55 @@ -99,7 +99,7 @@ 1.56 1.57 dir_prefix = cur->before_colon; 1.58 1.59 -@@ -1704,36 +1765,96 @@ 1.60 +@@ -1741,36 +1802,96 @@ 1.61 prev = dir_prefix; 1.62 1.63 if (ENABLE_FEATURE_HTTPD_AUTH_MD5) {