summaryrefslogtreecommitdiff
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 0311a493e..e91893ae5 100644
--- a/auth-passwd.c
+++ b/auth-passwd.c
@@ -11,7 +11,7 @@
11 11
12#ifndef USE_PAM 12#ifndef USE_PAM
13 13
14RCSID("$Id: auth-passwd.c,v 1.12 1999/12/28 04:09:36 damien Exp $"); 14RCSID("$Id: auth-passwd.c,v 1.13 1999/12/29 22:48:15 damien Exp $");
15 15
16#include "packet.h" 16#include "packet.h"
17#include "ssh.h" 17#include "ssh.h"
@@ -43,13 +43,13 @@ auth_password(struct passwd * pw, const char *password)
43 struct spwd *spw; 43 struct spwd *spw;
44#endif 44#endif
45 45
46 /* deny if no user. */
47 if (pw == NULL)
48 return 0;
46 if (pw->pw_uid == 0 && options.permit_root_login == 2) 49 if (pw->pw_uid == 0 && options.permit_root_login == 2)
47 return 0; 50 return 0;
48 if (*password == '\0' && options.permit_empty_passwd == 0) 51 if (*password == '\0' && options.permit_empty_passwd == 0)
49 return 0; 52 return 0;
50 /* deny if no user. */
51 if (pw == NULL)
52 return 0;
53 53
54#ifdef SKEY 54#ifdef SKEY
55 if (options.skey_authentication == 1) { 55 if (options.skey_authentication == 1) {