diff options
author | Damien Miller <djm@mindrot.org> | 1999-12-31 08:49:13 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 1999-12-31 08:49:13 +1100 |
commit | 8eb0fd6d6fee368ff0c3de479b0c18763fe3ea3a (patch) | |
tree | 274f73a6e3c7272b0a22892078b564561e886d37 | |
parent | 8bdeee25f8c0215812cdcdbd24f8c5b308a7b76a (diff) |
- Fix password support on systems with a mixture of shadowed and
non-shadowed passwords (e.g. NIS). Report and fix from
HARUYAMA Seigo <haruyama@nt.phys.s.u-tokyo.ac.jp>
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | auth-passwd.c | 16 |
2 files changed, 17 insertions, 8 deletions
@@ -1,13 +1,22 @@ | |||
1 | 19991231 | ||
2 | - Fix password support on systems with a mixture of shadowed and | ||
3 | non-shadowed passwords (e.g. NIS). Report and fix from | ||
4 | HARUYAMA Seigo <haruyama@nt.phys.s.u-tokyo.ac.jp> | ||
5 | |||
1 | 19991230 | 6 | 19991230 |
2 | - OpenBSD CVS updates: | 7 | - OpenBSD CVS updates: |
3 | - [auth-passwd.c] | 8 | - [auth-passwd.c] |
4 | check for NULL 1st | 9 | check for NULL 1st |
5 | - Removed most of the pam code into its own file auth-pam.[ch]. This | 10 | - Removed most of the pam code into its own file auth-pam.[ch]. This |
6 | cleaned up sshd.c up significantly. | 11 | cleaned up sshd.c up significantly. |
12 | - PAM authentication was incorrectly interpreting | ||
13 | "PermitRootLogin without-password". Report from Matthias Andree | ||
14 | <ma@dt.e-technik.uni-dortmund.de | ||
7 | - Several other cleanups | 15 | - Several other cleanups |
8 | - Merged Dante SOCKS support patch from David Rankin | 16 | - Merged Dante SOCKS support patch from David Rankin |
9 | <drankin@bohemians.lexington.ky.us> | 17 | <drankin@bohemians.lexington.ky.us> |
10 | - Updated documentation with ./configure options | 18 | - Updated documentation with ./configure options |
19 | - Released 1.2.1pre23 | ||
11 | 20 | ||
12 | 19991229 | 21 | 19991229 |
13 | - Applied another NetBSD portability patch from David Rankin | 22 | - Applied another NetBSD portability patch from David Rankin |
diff --git a/auth-passwd.c b/auth-passwd.c index e91893ae5..c33470300 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.13 1999/12/29 22:48:15 damien Exp $"); | 14 | RCSID("$Id: auth-passwd.c,v 1.14 1999/12/30 21:49:13 damien Exp $"); |
15 | 15 | ||
16 | #include "packet.h" | 16 | #include "packet.h" |
17 | #include "ssh.h" | 17 | #include "ssh.h" |
@@ -76,14 +76,14 @@ auth_password(struct passwd * pw, const char *password) | |||
76 | 76 | ||
77 | #if defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW) | 77 | #if defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW) |
78 | spw = getspnam(pw->pw_name); | 78 | spw = getspnam(pw->pw_name); |
79 | if (spw == NULL) | 79 | if (spw != NULL) |
80 | return(0); | 80 | { |
81 | /* Check for users with no password. */ | ||
82 | if (strcmp(password, "") == 0 && strcmp(spw->sp_pwdp, "") == 0) | ||
83 | return 1; | ||
81 | 84 | ||
82 | /* Check for users with no password. */ | 85 | pw_password = spw->sp_pwdp; |
83 | if (strcmp(password, "") == 0 && strcmp(spw->sp_pwdp, "") == 0) | 86 | } |
84 | return 1; | ||
85 | |||
86 | pw_password = spw->sp_pwdp; | ||
87 | #endif /* defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW) */ | 87 | #endif /* defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW) */ |
88 | 88 | ||
89 | if (pw_password[0] != '\0') | 89 | if (pw_password[0] != '\0') |