mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-10 16:31:18 +01:00
Fix bug that prevented accounts with empty passwords from logging
in. Submitted by: Paul Traina <pst@juniper.net>
This commit is contained in:
parent
d02c233129
commit
ce9f8663f9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=45387
@ -61,7 +61,7 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags, int argc,
|
||||
return retval;
|
||||
if ((pwd = getpwnam(user)) != NULL) {
|
||||
encrypted = crypt(password, pwd->pw_passwd);
|
||||
if (password[0] == '\0' && pwd->pw_passwd != '\0')
|
||||
if (password[0] == '\0' && pwd->pw_passwd[0] != '\0')
|
||||
encrypted = ":";
|
||||
|
||||
retval = strcmp(encrypted, pwd->pw_passwd) == 0 ?
|
||||
|
Loading…
Reference in New Issue
Block a user