summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2005-07-19 15:32:27 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2005-07-19 15:32:27 +0000
commitcc926b7ac0a46834a3c340d057433e42427b89c8 (patch)
tree554309ff3cfd36f278d5cc07bec527949028db49 /usr.bin
parent550d50600b52602ef98eb71f9a4c94864465ad8c (diff)
auth_usercheck(3) can return NULL, so check for that. Report from
mpech@. ok markus@
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ssh/auth-passwd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/ssh/auth-passwd.c b/usr.bin/ssh/auth-passwd.c
index 52ffff98a09..2edb59901ef 100644
--- a/usr.bin/ssh/auth-passwd.c
+++ b/usr.bin/ssh/auth-passwd.c
@@ -36,7 +36,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: auth-passwd.c,v 1.33 2005/01/24 11:47:13 dtucker Exp $");
+RCSID("$OpenBSD: auth-passwd.c,v 1.34 2005/07/19 15:32:26 otto Exp $");
#include "packet.h"
#include "buffer.h"
@@ -134,6 +134,8 @@ sys_auth_passwd(Authctxt *authctxt, const char *password)
as = auth_usercheck(pw->pw_name, authctxt->style, "auth-ssh",
(char *)password);
+ if (as == NULL)
+ return (0);
if (auth_getstate(as) & AUTH_PWEXPIRED) {
auth_close(as);
disable_forwarding();