diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | auth-passwd.c | 8 |
2 files changed, 9 insertions, 4 deletions
@@ -1,3 +1,8 @@ | |||
1 | 19991230 | ||
2 | - OpenBSD CVS updates: | ||
3 | - [auth-passwd.c] | ||
4 | check for NULL 1st | ||
5 | |||
1 | 19991229 | 6 | 19991229 |
2 | - Applied another NetBSD portability patch from David Rankin | 7 | - Applied another NetBSD portability patch from David Rankin |
3 | <drankin@bohemians.lexington.ky.us> | 8 | <drankin@bohemians.lexington.ky.us> |
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 | ||
14 | RCSID("$Id: auth-passwd.c,v 1.12 1999/12/28 04:09:36 damien Exp $"); | 14 | RCSID("$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) { |