diff options
author | Matt Johnston <matt@ucc.asn.au> | 2004-12-23 17:00:15 +0000 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2004-12-23 17:00:15 +0000 |
commit | 9d4318370418b66796d370cb1fa05d49c28920b0 (patch) | |
tree | ed87ba82226d3eddce366b14a29d71464ebe4921 /svr-authpam.c | |
parent | e7677a5e8ddaa4787659a1a9e5320369c94564e4 (diff) |
Log the IP along with auth success/fail attempts
--HG--
extra : convert_revision : 25eab43bd46e931fd4afecec49c22b9311062099
Diffstat (limited to 'svr-authpam.c')
-rw-r--r-- | svr-authpam.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/svr-authpam.c b/svr-authpam.c index e3aa725..4937fa6 100644 --- a/svr-authpam.c +++ b/svr-authpam.c @@ -194,8 +194,9 @@ void svr_auth_pam() { dropbear_log(LOG_WARNING, "pam_authenticate() failed, rc=%d, %s\n", rc, pam_strerror(pamHandlep, rc)); dropbear_log(LOG_WARNING, - "bad PAM password attempt for '%s'", - ses.authstate.printableuser); + "bad PAM password attempt for '%s' from %s", + ses.authstate.printableuser, + svr_ses.addrstring); send_msg_userauth_failure(0, 1); goto cleanup; } @@ -204,15 +205,17 @@ void svr_auth_pam() { dropbear_log(LOG_WARNING, "pam_acct_mgmt() failed, rc=%d, %s\n", rc, pam_strerror(pamHandlep, rc)); dropbear_log(LOG_WARNING, - "bad PAM password attempt for '%s'", - ses.authstate.printableuser); + "bad PAM password attempt for '%s' from %s", + ses.authstate.printableuser, + svr_ses.addrstring); send_msg_userauth_failure(0, 1); goto cleanup; } /* successful authentication */ - dropbear_log(LOG_NOTICE, "PAM password auth succeeded for '%s'", - ses.authstate.printableuser); + dropbear_log(LOG_NOTICE, "PAM password auth succeeded for '%s' from %s", + ses.authstate.printableuser, + svr_ses.addrstring); send_msg_userauth_success(); cleanup: |