- OpenBSD CVS updates:

- [auth-passwd.c]
     check for NULL 1st
This commit is contained in:
Damien Miller 1999-12-30 09:48:15 +11:00
parent 753331ee5e
commit ece22a8312
2 changed files with 9 additions and 4 deletions

View File

@ -1,3 +1,8 @@
19991230
- OpenBSD CVS updates:
- [auth-passwd.c]
check for NULL 1st
19991229 19991229
- Applied another NetBSD portability patch from David Rankin - Applied another NetBSD portability patch from David Rankin
<drankin@bohemians.lexington.ky.us> <drankin@bohemians.lexington.ky.us>

View File

@ -11,7 +11,7 @@
#ifndef USE_PAM #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 "packet.h"
#include "ssh.h" #include "ssh.h"
@ -43,13 +43,13 @@ auth_password(struct passwd * pw, const char *password)
struct spwd *spw; struct spwd *spw;
#endif #endif
/* deny if no user. */
if (pw == NULL)
return 0;
if (pw->pw_uid == 0 && options.permit_root_login == 2) if (pw->pw_uid == 0 && options.permit_root_login == 2)
return 0; return 0;
if (*password == '\0' && options.permit_empty_passwd == 0) if (*password == '\0' && options.permit_empty_passwd == 0)
return 0; return 0;
/* deny if no user. */
if (pw == NULL)
return 0;
#ifdef SKEY #ifdef SKEY
if (options.skey_authentication == 1) { if (options.skey_authentication == 1) {