mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-27 07:44:29 +02:00
check pw_passwd != NULL here too
Again, for systems with broken NIS implementations. Prompted by coolbugcheckers AT gmail.com
This commit is contained in:
parent
fe8e8f349a
commit
c29b111e7d
@ -198,6 +198,9 @@ sys_auth_passwd(struct ssh *ssh, const char *password)
|
|||||||
/* Just use the supplied fake password if authctxt is invalid */
|
/* Just use the supplied fake password if authctxt is invalid */
|
||||||
char *pw_password = authctxt->valid ? shadow_pw(pw) : pw->pw_passwd;
|
char *pw_password = authctxt->valid ? shadow_pw(pw) : pw->pw_passwd;
|
||||||
|
|
||||||
|
if (pw_password == NULL)
|
||||||
|
return 0;
|
||||||
|
|
||||||
/* Check for users with no password. */
|
/* Check for users with no password. */
|
||||||
if (strcmp(pw_password, "") == 0 && strcmp(password, "") == 0)
|
if (strcmp(pw_password, "") == 0 && strcmp(password, "") == 0)
|
||||||
return (1);
|
return (1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user