diff options
author | Damien Miller <djm@mindrot.org> | 2018-10-11 11:29:35 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2018-10-11 11:29:35 +1100 |
commit | c29b111e7d87c2324ff71c80653dd8da168c13b9 (patch) | |
tree | 1f3bec2f9d79467c6a4f164c37d00f0f1ce0b0dd | |
parent | fe8e8f349a553ef4c567acd418aac769a82b7729 (diff) |
check pw_passwd != NULL here too
Again, for systems with broken NIS implementations.
Prompted by coolbugcheckers AT gmail.com
-rw-r--r-- | auth-passwd.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/auth-passwd.c b/auth-passwd.c index 65f525184..24fcb67b2 100644 --- a/auth-passwd.c +++ b/auth-passwd.c | |||
@@ -198,6 +198,9 @@ sys_auth_passwd(struct ssh *ssh, const char *password) | |||
198 | /* Just use the supplied fake password if authctxt is invalid */ | 198 | /* Just use the supplied fake password if authctxt is invalid */ |
199 | char *pw_password = authctxt->valid ? shadow_pw(pw) : pw->pw_passwd; | 199 | char *pw_password = authctxt->valid ? shadow_pw(pw) : pw->pw_passwd; |
200 | 200 | ||
201 | if (pw_password == NULL) | ||
202 | return 0; | ||
203 | |||
201 | /* Check for users with no password. */ | 204 | /* Check for users with no password. */ |
202 | if (strcmp(pw_password, "") == 0 && strcmp(password, "") == 0) | 205 | if (strcmp(pw_password, "") == 0 && strcmp(password, "") == 0) |
203 | return (1); | 206 | return (1); |