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:
Denis Vlasenko
2008-06-12 16:55:59 +00:00
parent 9de4622055
commit 4ea83bf562
10 changed files with 1458 additions and 26 deletions

View File

@ -71,7 +71,7 @@ int correct_password(const struct passwd *pw)
if (!unencrypted) {
return 0;
}
encrypted = crypt(unencrypted, correct);
encrypted = pw_encrypt(unencrypted, correct, 1);
memset(unencrypted, 0, strlen(unencrypted));
return strcmp(encrypted, correct) == 0;
}