Mercurial > dropbear
diff svr-auth.c @ 158:364a75cfebab
Log the IP along with auth success/fail attempts
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Thu, 23 Dec 2004 17:00:15 +0000 |
parents | 9337c9f9a607 |
children | 0cfba3034be5 |
line wrap: on
line diff
--- a/svr-auth.c Wed Dec 22 15:37:50 2004 +0000 +++ b/svr-auth.c Thu Dec 23 17:00:15 2004 +0000 @@ -205,7 +205,8 @@ strcmp(username, ses.authstate.username) != 0) { /* the username needs resetting */ if (ses.authstate.username != NULL) { - dropbear_log(LOG_WARNING, "client trying multiple usernames"); + dropbear_log(LOG_WARNING, "client trying multiple usernames from %s", + svr_ses.addrstring); m_free(ses.authstate.username); } authclear(); @@ -218,7 +219,8 @@ if (ses.authstate.pw == NULL) { TRACE(("leave checkusername: user '%s' doesn't exist", username)); dropbear_log(LOG_WARNING, - "login attempt for nonexistent user"); + "login attempt for nonexistent user from %s", + svr_ses.addrstring); send_msg_userauth_failure(0, 1); return DROPBEAR_FAILURE; } @@ -336,7 +338,8 @@ } else { userstr = ses.authstate.printableuser; } - dropbear_exit("Max auth tries reached - user %s", userstr); + dropbear_exit("Max auth tries reached - user '%s' from %s", + userstr, svr_ses.addrstring); } TRACE(("leave send_msg_userauth_failure"));