diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-06-12 16:55:59 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-06-12 16:55:59 +0000 |
commit | 4ea83bf562c44a6792e7c77e7d87cba91f86f763 (patch) | |
tree | 64dba9163b29724e282c1e94027001a11978e74b /networking | |
parent | 9de462205542547694299e9fe2bc321088ab79aa (diff) | |
download | busybox-w32-4ea83bf562c44a6792e7c77e7d87cba91f86f763.tar.gz busybox-w32-4ea83bf562c44a6792e7c77e7d87cba91f86f763.tar.bz2 busybox-w32-4ea83bf562c44a6792e7c77e7d87cba91f86f763.zip |
uclibc insists on having 70k static buffer for crypt.
For bbox it's not acceptable. Roll our own des and md5 crypt
implementation. Against older uclibc:
text data bss dec hex filename
759945 604 6684 767233 bb501 busybox_old
759766 604 6684 767054 bb44e busybox_unstripped
so, we still save on code size.
Diffstat (limited to 'networking')
-rw-r--r-- | networking/httpd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/networking/httpd.c b/networking/httpd.c index 4da7e5c65..78c6f4d1d 100644 --- a/networking/httpd.c +++ b/networking/httpd.c | |||
@@ -1733,7 +1733,7 @@ static int checkPerm(const char *path, const char *request) | |||
1733 | && pp[3] == '$' && pp[4] | 1733 | && pp[3] == '$' && pp[4] |
1734 | ) { | 1734 | ) { |
1735 | pp++; | 1735 | pp++; |
1736 | cipher = pw_encrypt(u+1, pp); | 1736 | cipher = pw_encrypt(u+1, pp, 1); |
1737 | if (strcmp(cipher, pp) == 0) | 1737 | if (strcmp(cipher, pp) == 0) |
1738 | goto set_remoteuser_var; /* Ok */ | 1738 | goto set_remoteuser_var; /* Ok */ |
1739 | /* unauthorized */ | 1739 | /* unauthorized */ |
@@ -2352,7 +2352,7 @@ int httpd_main(int argc ATTRIBUTE_UNUSED, char **argv) | |||
2352 | #endif | 2352 | #endif |
2353 | #if ENABLE_FEATURE_HTTPD_AUTH_MD5 | 2353 | #if ENABLE_FEATURE_HTTPD_AUTH_MD5 |
2354 | if (opt & OPT_MD5) { | 2354 | if (opt & OPT_MD5) { |
2355 | puts(pw_encrypt(pass, "$1$")); | 2355 | puts(pw_encrypt(pass, "$1$", 1)); |
2356 | return 0; | 2356 | return 0; |
2357 | } | 2357 | } |
2358 | #endif | 2358 | #endif |