* libmisc/obscure.c, libmisc/salt.c, src/passwd.c: Match DES, MD5,
SHA256, and SHA512 exactly (not only the first 3/6 chars). * libmisc/salt.c (SHA_salt_rounds): Set rounds to the specified prefered_rounds value, if specified. * src/gpasswd.c, libmisc/salt.c: Fix compilation warnings (use size_t for lengths). * src/chpasswd.c, src/chgpasswd.c: Add missing parenthesis.
This commit is contained in:
@@ -245,9 +245,9 @@ static const char *password_check (const char *old, const char *new,
|
||||
#ifdef ENCRYPTMETHOD_SELECT
|
||||
} else {
|
||||
|
||||
if (!strncmp (result, "MD5" , 3) ||
|
||||
!strncmp (result, "SHA256", 6) ||
|
||||
!strncmp (result, "SHA512", 6))
|
||||
if (!strcmp (result, "MD5") ||
|
||||
!strcmp (result, "SHA256") ||
|
||||
!strcmp (result, "SHA512"))
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user