summaryrefslogtreecommitdiff
path: root/svr-authpubkey.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2004-12-23 17:00:15 +0000
committerMatt Johnston <matt@ucc.asn.au>2004-12-23 17:00:15 +0000
commit57d800d314006b78699282260f3ab3b839b43e08 (patch)
treeed87ba82226d3eddce366b14a29d71464ebe4921 /svr-authpubkey.c
parent706d0cbf66d0ac1096d2763379e70d106403bfb7 (diff)
downloaddropbear-57d800d314006b78699282260f3ab3b839b43e08.tar.gz
Log the IP along with auth success/fail attempts
Diffstat (limited to 'svr-authpubkey.c')
-rw-r--r--svr-authpubkey.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/svr-authpubkey.c b/svr-authpubkey.c
index 14b5a78..5052b10 100644
--- a/svr-authpubkey.c
+++ b/svr-authpubkey.c
@@ -104,13 +104,13 @@ void svr_auth_pubkey() {
if (buf_verify(ses.payload, key, buf_getptr(signbuf, signbuf->len),
signbuf->len) == DROPBEAR_SUCCESS) {
dropbear_log(LOG_NOTICE,
- "pubkey auth succeeded for '%s' with key %s",
- ses.authstate.printableuser, fp);
+ "pubkey auth succeeded for '%s' with key %s from %s",
+ ses.authstate.printableuser, fp, svr_ses.addrstring);
send_msg_userauth_success();
} else {
dropbear_log(LOG_WARNING,
- "pubkey auth bad signature for '%s' with key %s",
- ses.authstate.printableuser, fp);
+ "pubkey auth bad signature for '%s' with key %s from %s",
+ ses.authstate.printableuser, fp, svr_ses.addrstring);
send_msg_userauth_failure(0, 1);
}
m_free(fp);
@@ -165,8 +165,8 @@ static int checkpubkey(unsigned char* algo, unsigned int algolen,
/* check that we can use the algo */
if (have_algo(algo, algolen, sshhostkey) == DROPBEAR_FAILURE) {
dropbear_log(LOG_WARNING,
- "pubkey auth attempt with unknown algo for '%s'",
- ses.authstate.printableuser);
+ "pubkey auth attempt with unknown algo for '%s' from %s",
+ ses.authstate.printableuser, svr_ses.addrstring);
goto out;
}