commit 4c38dffadee9bd29fa85dffef3ea4b63d6704183
parent 4b05ca07cc622f0b50092cda3318cd804730eafc
Author: sin <sin@2f30.org>
Date: Mon, 9 Jun 2014 12:06:45 +0100
If the user password is empty check it against the provided pass as well
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git 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;