From 4c38dffadee9bd29fa85dffef3ea4b63d6704183 Mon Sep 17 00:00:00 2001 From: sin Date: Mon, 9 Jun 2014 12:06:45 +0100 Subject: [PATCH] If the user password is empty check it against the provided pass as well --- util/passwd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/passwd.c b/util/passwd.c index 4929317..7cec804 100644 --- a/util/passwd.c +++ b/util/passwd.c @@ -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;