Fix bug that prevented accounts with empty passwords from logging

in.

Submitted by:	Paul Traina <pst@juniper.net>
This commit is contained in:
John Polstra 1999-04-06 19:48:53 +00:00
parent d02c233129
commit ce9f8663f9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=45387

View File

@ -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 ?