mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04: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
1 changed files with 1 additions and 1 deletions
|
|
@ -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 a new issue