aboutsummaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2025-07-07 17:42:35 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2025-07-07 17:42:35 +0200
commit5e9b95ff40de7e9b3395e51d456647ae99b2e8b2 (patch)
tree6818f8460fea1bced80573accf7381198bdefa16 /libbb
parent479d8db99faa005783fc483d0830314d6156e51f (diff)
downloadbusybox-w32-5e9b95ff40de7e9b3395e51d456647ae99b2e8b2.tar.gz
busybox-w32-5e9b95ff40de7e9b3395e51d456647ae99b2e8b2.tar.bz2
busybox-w32-5e9b95ff40de7e9b3395e51d456647ae99b2e8b2.zip
cryptpw: -m sha512crypt must also be accepted
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb')
-rw-r--r--libbb/pw_encrypt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libbb/pw_encrypt.c b/libbb/pw_encrypt.c
index 4acc33039..3b2fea00d 100644
--- a/libbb/pw_encrypt.c
+++ b/libbb/pw_encrypt.c
@@ -30,7 +30,7 @@ char* FAST_FUNC crypt_make_pw_salt(char salt[MAX_PW_SALT_LEN], const char *algo)
30 *salt_ptr++ = '$'; 30 *salt_ptr++ = '$';
31#if !ENABLE_USE_BB_CRYPT || ENABLE_USE_BB_CRYPT_SHA 31#if !ENABLE_USE_BB_CRYPT || ENABLE_USE_BB_CRYPT_SHA
32 if ((algo[0]|0x20) == 's') { /* sha */ 32 if ((algo[0]|0x20) == 's') { /* sha */
33 salt[1] = '5' + (strcasecmp(algo, "sha512") == 0); 33 salt[1] = '5' + (strncasecmp(algo, "sha512", 6) == 0);
34 len = 16 / 2; 34 len = 16 / 2;
35 } 35 }
36#endif 36#endif