Mercurial > dropbear
comparison svr-authpasswd.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 | 3394a7cb30cd |
children | 161557a9dde8 |
comparison
equal
deleted
inserted
replaced
156:8c2b3506f112 | 158:364a75cfebab |
---|---|
86 m_free(password); | 86 m_free(password); |
87 | 87 |
88 if (strcmp(testcrypt, passwdcrypt) == 0) { | 88 if (strcmp(testcrypt, passwdcrypt) == 0) { |
89 /* successful authentication */ | 89 /* successful authentication */ |
90 dropbear_log(LOG_NOTICE, | 90 dropbear_log(LOG_NOTICE, |
91 "password auth succeeded for '%s'", | 91 "password auth succeeded for '%s' from %s", |
92 ses.authstate.printableuser); | 92 ses.authstate.printableuser, |
93 svr_ses.addrstring); | |
93 send_msg_userauth_success(); | 94 send_msg_userauth_success(); |
94 } else { | 95 } else { |
95 dropbear_log(LOG_WARNING, | 96 dropbear_log(LOG_WARNING, |
96 "bad password attempt for '%s'", | 97 "bad password attempt for '%s' from %s", |
97 ses.authstate.printableuser); | 98 ses.authstate.printableuser, |
99 svr_ses.addrstring); | |
98 send_msg_userauth_failure(0, 1); | 100 send_msg_userauth_failure(0, 1); |
99 } | 101 } |
100 | 102 |
101 } | 103 } |
102 | 104 |