summaryrefslogtreecommitdiff
path: root/sshd.c
diff options
context:
space:
mode:
Diffstat (limited to 'sshd.c')
-rw-r--r--sshd.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/sshd.c b/sshd.c
index 9c570ab8a..c06d914e6 100644
--- a/sshd.c
+++ b/sshd.c
@@ -11,7 +11,7 @@
11 */ 11 */
12 12
13#include "includes.h" 13#include "includes.h"
14RCSID("$Id: sshd.c,v 1.40 1999/12/24 23:11:29 damien Exp $"); 14RCSID("$Id: sshd.c,v 1.41 1999/12/25 23:21:48 damien Exp $");
15 15
16#ifdef HAVE_POLL_H 16#ifdef HAVE_POLL_H
17# include <poll.h> 17# include <poll.h>
@@ -249,8 +249,10 @@ int do_pam_auth(const char *user, const char *password)
249 log("PAM Password authentication accepted for user \"%.100s\"", user); 249 log("PAM Password authentication accepted for user \"%.100s\"", user);
250 return 1; 250 return 1;
251 } else { 251 } else {
252 log("PAM Password authentication for \"%.100s\" failed: %s", 252 /* Don't log failure for auth attempts with empty password */
253 user, PAM_STRERROR((pam_handle_t *)pamh, pam_retval)); 253 if (password[0] != '\0')
254 log("PAM Password authentication for \"%.100s\" failed: %s",
255 user, PAM_STRERROR((pam_handle_t *)pamh, pam_retval));
254 return 0; 256 return 0;
255 } 257 }
256} 258}
@@ -1362,9 +1364,6 @@ do_authloop(struct passwd * pw)
1362 int plen, dlen, nlen, ulen, elen; 1364 int plen, dlen, nlen, ulen, elen;
1363 int type = 0; 1365 int type = 0;
1364 void (*authlog) (const char *fmt,...) = verbose; 1366 void (*authlog) (const char *fmt,...) = verbose;
1365#ifdef HAVE_LIBPAM
1366 int pam_retval;
1367#endif /* HAVE_LIBPAM */
1368 1367
1369 /* Indicate that authentication is needed. */ 1368 /* Indicate that authentication is needed. */
1370 packet_start(SSH_SMSG_FAILURE); 1369 packet_start(SSH_SMSG_FAILURE);