If the user password is empty check it against the provided pass as well

This commit is contained in:
sin 2014-06-09 12:06:45 +01:00
parent 4b05ca07cc
commit 4c38dffade
1 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,7 @@ pw_check(struct passwd *pw, const char *pass)
}
if (pw->pw_passwd[0] == '\0')
return 1;
return pass[0] == '\0' ? 1 : 0;
if (pw->pw_passwd[0] == 'x' && pw->pw_passwd[1] == '\0') {
errno = 0;