summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>1999-12-29 12:47:47 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>1999-12-29 12:47:47 +0000
commitb836d3776194ea7f7b2b4516817f5cb258b642d0 (patch)
treec5748fdaa8e76860804d7e3c3c340df7cd5c5740 /usr.bin
parentdc754cc8e44bc0e1452d9089c899e66b045d4cce (diff)
check for NULL 1st
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ssh/auth-passwd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/ssh/auth-passwd.c b/usr.bin/ssh/auth-passwd.c
index ae15d39f537..de0f6402d7e 100644
--- a/usr.bin/ssh/auth-passwd.c
+++ b/usr.bin/ssh/auth-passwd.c
@@ -8,7 +8,7 @@
*/
#include "includes.h"
-RCSID("$Id: auth-passwd.c,v 1.13 1999/12/01 16:54:35 markus Exp $");
+RCSID("$Id: auth-passwd.c,v 1.14 1999/12/29 12:47:46 markus Exp $");
#include "packet.h"
#include "ssh.h"
@@ -25,13 +25,13 @@ auth_password(struct passwd * pw, const char *password)
extern ServerOptions options;
char *encrypted_password;
+ /* deny if no user. */
+ if (pw == NULL)
+ return 0;
if (pw->pw_uid == 0 && options.permit_root_login == 2)
return 0;
if (*password == '\0' && options.permit_empty_passwd == 0)
return 0;
- /* deny if no user. */
- if (pw == NULL)
- return 0;
#ifdef SKEY
if (options.skey_authentication == 1) {