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.
This commit is contained in:
@@ -1733,7 +1733,7 @@ static int checkPerm(const char *path, const char *request)
|
||||
&& pp[3] == '$' && pp[4]
|
||||
) {
|
||||
pp++;
|
||||
cipher = pw_encrypt(u+1, pp);
|
||||
cipher = pw_encrypt(u+1, pp, 1);
|
||||
if (strcmp(cipher, pp) == 0)
|
||||
goto set_remoteuser_var; /* Ok */
|
||||
/* unauthorized */
|
||||
@@ -2352,7 +2352,7 @@ int httpd_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
#endif
|
||||
#if ENABLE_FEATURE_HTTPD_AUTH_MD5
|
||||
if (opt & OPT_MD5) {
|
||||
puts(pw_encrypt(pass, "$1$"));
|
||||
puts(pw_encrypt(pass, "$1$", 1));
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user