summaryrefslogtreecommitdiffstats
path: root/auth-passwd.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>1999-12-30 09:48:15 +1100
committerDamien Miller <djm@mindrot.org>1999-12-30 09:48:15 +1100
commitece22a8312357e1f34916659d77fa7dd8d15ae32 (patch)
tree7d2b1e93ce67ed88bda9752a33db460b7f89b45c /auth-passwd.c
parent753331ee5e0a61adf6cf26ae0e75606a3e68947a (diff)
- OpenBSD CVS updates:
- [auth-passwd.c] check for NULL 1st
Diffstat (limited to 'auth-passwd.c')
-rw-r--r--auth-passwd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/auth-passwd.c b/auth-passwd.c
index 0311a493..e91893ae 100644
--- a/auth-passwd.c
+++ b/auth-passwd.c
@@ -11,7 +11,7 @@
#ifndef USE_PAM
-RCSID("$Id: auth-passwd.c,v 1.12 1999/12/28 04:09:36 damien Exp $");
+RCSID("$Id: auth-passwd.c,v 1.13 1999/12/29 22:48:15 damien Exp $");
#include "packet.h"
#include "ssh.h"
@@ -43,13 +43,13 @@ auth_password(struct passwd * pw, const char *password)
struct spwd *spw;
#endif
+ /* 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) {