From 73ff6e966f3ffa3491bde99eb103ac448903c227 Mon Sep 17 00:00:00 2001 From: Mike Baker Date: Sun, 26 Mar 2006 11:11:19 +0000 Subject: [PATCH] add a cheap 2 byte salt to md5 passwords SVN-Revision: 3487 --- .../package/busybox/patches/230-passwd_salt.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 openwrt/package/busybox/patches/230-passwd_salt.patch diff --git a/openwrt/package/busybox/patches/230-passwd_salt.patch b/openwrt/package/busybox/patches/230-passwd_salt.patch new file mode 100644 index 0000000000..0322a98439 --- /dev/null +++ b/openwrt/package/busybox/patches/230-passwd_salt.patch @@ -0,0 +1,13 @@ +--- busybox-1.00/loginutils/passwd.c 2006-03-26 06:07:37 -05:00 ++++ busybox-1.00/loginutils/passwd.c 2006-03-26 06:09:03 -05:00 +@@ -386,7 +386,9 @@ + bzero(orig, sizeof(orig)); + + if (algo == 1) { +- cp = pw_encrypt(pass, "$1$"); ++ char salt[6]="$1$\0\0\0"; ++ memcpy(salt+3,crypt_make_salt(),3); ++ cp = pw_encrypt(pass, salt); + } else + cp = pw_encrypt(pass, crypt_make_salt()); + bzero(pass, sizeof pass); -- 2.30.2