From 32b3cf2c96fd8cee6cb082821a43d3375c850d58 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Sun, 26 Dec 1999 10:21:48 +1100 Subject: 19991226 - Enabled utmpx support by default for Solaris - Cleanup sshd.c PAM a little more 19991225 - Merged fixes from Ben Taylor - Fixed configure support for PAM. Reported by Naz <96na@eng.cam.ac.uk> - Disabled logging of PAM password authentication failures when password is empty. (e.g start of authentication loop). Reported by Naz <96na@eng.cam.ac.uk>) --- sshd.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'sshd.c') diff --git a/sshd.c b/sshd.c index 9c570ab8a..c06d914e6 100644 --- a/sshd.c +++ b/sshd.c @@ -11,7 +11,7 @@ */ #include "includes.h" -RCSID("$Id: sshd.c,v 1.40 1999/12/24 23:11:29 damien Exp $"); +RCSID("$Id: sshd.c,v 1.41 1999/12/25 23:21:48 damien Exp $"); #ifdef HAVE_POLL_H # include @@ -249,8 +249,10 @@ int do_pam_auth(const char *user, const char *password) log("PAM Password authentication accepted for user \"%.100s\"", user); return 1; } else { - log("PAM Password authentication for \"%.100s\" failed: %s", - user, PAM_STRERROR((pam_handle_t *)pamh, pam_retval)); + /* Don't log failure for auth attempts with empty password */ + if (password[0] != '\0') + log("PAM Password authentication for \"%.100s\" failed: %s", + user, PAM_STRERROR((pam_handle_t *)pamh, pam_retval)); return 0; } } @@ -1362,9 +1364,6 @@ do_authloop(struct passwd * pw) int plen, dlen, nlen, ulen, elen; int type = 0; void (*authlog) (const char *fmt,...) = verbose; -#ifdef HAVE_LIBPAM - int pam_retval; -#endif /* HAVE_LIBPAM */ /* Indicate that authentication is needed. */ packet_start(SSH_SMSG_FAILURE); -- cgit v1.2.3