projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cc42814
)
httpd -m: output salted MD5 hash. By (forrest AT hifulltech.com)
author
Denys Vlasenko
<vda.linux@googlemail.com>
Wed, 16 Dec 2009 01:28:50 +0000
(
02:28
+0100)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Wed, 16 Dec 2009 01:28:50 +0000
(
02:28
+0100)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
networking/httpd.c
patch
|
blob
|
history
diff --git
a/networking/httpd.c
b/networking/httpd.c
index 7ac43619a417575010ab71d1cdc5db8e157404d3..0a8322c8856806f9cac16aedd6fd3634272ad332 100644
(file)
--- a/
networking/httpd.c
+++ b/
networking/httpd.c
@@
-2347,7
+2347,12
@@
int httpd_main(int argc UNUSED_PARAM, char **argv)
#endif
#if ENABLE_FEATURE_HTTPD_AUTH_MD5
if (opt & OPT_MD5) {
- puts(pw_encrypt(pass, "$1$", 1));
+ char salt[sizeof("$1$XXXXXXXX")];
+ salt[0] = '$';
+ salt[1] = '1';
+ salt[2] = '$';
+ crypt_make_salt(salt + 3, 4, 0);
+ puts(pw_encrypt(pass, salt, 1));
return 0;
}
#endif