From 450a158d7ef01e44723802e28a65348375718a2c Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Sun, 30 May 2004 20:43:59 +1000 Subject: - (dtucker) [auth-pam.c auth-pam.h auth-passwd.c]: Bug #874: Re-add PAM support for PasswordAuthentication=yes. ok djm@ --- auth-passwd.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'auth-passwd.c') diff --git a/auth-passwd.c b/auth-passwd.c index beaf0fa6c..da247df7d 100644 --- a/auth-passwd.c +++ b/auth-passwd.c @@ -91,6 +91,10 @@ auth_password(Authctxt *authctxt, const char *password) return ok; } #endif +#ifdef USE_PAM + if (options.use_pam) + return (sshpam_auth_passwd(authctxt, password) && ok); +#endif #if defined(USE_SHADOW) && defined(HAS_SHADOW_EXPIRE) if (!expire_checked) { expire_checked = 1; -- cgit v1.2.3 From e35bf12eebca0c3ca248dca4c04bff83b9c475a1 Mon Sep 17 00:00:00 2001 From: Ben Lindstrom Date: Tue, 22 Jun 2004 03:37:11 +0000 Subject: - (bal) [auth-passwd.c auth1.c] Clean up unused variables. --- ChangeLog | 3 ++- auth-passwd.c | 2 ++ auth1.c | 6 +++--- 3 files changed, 7 insertions(+), 4 deletions(-) (limited to 'auth-passwd.c') diff --git a/ChangeLog b/ChangeLog index b3d09c70d..00864980a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,5 @@ 20040622 + - (bal) [auth-passwd.c auth1.c] Clean up unused variables. - (dtucker) OpenBSD CVS Sync - djm@cvs.openbsd.org 2004/06/20 17:36:59 [ssh.c] @@ -1361,4 +1362,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.3429 2004/06/22 03:27:16 dtucker Exp $ +$Id: ChangeLog,v 1.3430 2004/06/22 03:37:11 mouring Exp $ diff --git a/auth-passwd.c b/auth-passwd.c index da247df7d..7a68e0562 100644 --- a/auth-passwd.c +++ b/auth-passwd.c @@ -64,7 +64,9 @@ auth_password(Authctxt *authctxt, const char *password) { struct passwd * pw = authctxt->pw; int ok = authctxt->valid; +#if defined(USE_SHADOW) && defined(HAS_SHADOW_EXPIRE) static int expire_checked = 0; +#endif #ifndef HAVE_CYGWIN if (pw->pw_uid == 0 && options.permit_root_login != PERMIT_YES) diff --git a/auth1.c b/auth1.c index 471f27172..e541935ce 100644 --- a/auth1.c +++ b/auth1.c @@ -69,7 +69,6 @@ do_authloop(Authctxt *authctxt) u_int dlen; u_int ulen; int prev, type = 0; - struct passwd *pw = authctxt->pw; debug("Attempting authentication for %s%.100s.", authctxt->valid ? "" : "illegal user ", authctxt->user); @@ -232,9 +231,10 @@ do_authloop(Authctxt *authctxt) #ifdef HAVE_CYGWIN if (authenticated && - !check_nt_auth(type == SSH_CMSG_AUTH_PASSWORD, pw)) { + !check_nt_auth(type == SSH_CMSG_AUTH_PASSWORD, + authctxt->pw)) { packet_disconnect("Authentication rejected for uid %d.", - pw == NULL ? -1 : pw->pw_uid); + authctxt->pw == NULL ? -1 : authctxt->pw->pw_uid); authenticated = 0; } #else -- cgit v1.2.3