summaryrefslogtreecommitdiff
path: root/auth-rh-rsa.c
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2008-05-25 23:24:33 +0000
committerColin Watson <cjwatson@debian.org>2008-05-25 23:24:33 +0000
commitd61c655626e74e65dba34e4e9d5aa6616cc72f93 (patch)
tree039e0946fb19b073b13605142e5737875107dba9 /auth-rh-rsa.c
parentfe3af0a26497234bbae83a25fadf81a78cf2cf66 (diff)
Log IP addresses of hosts attempting to use blacklisted keys (closes:
#481721).
Diffstat (limited to 'auth-rh-rsa.c')
-rw-r--r--auth-rh-rsa.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/auth-rh-rsa.c b/auth-rh-rsa.c
index 77a043998..cd272e4ca 100644
--- a/auth-rh-rsa.c
+++ b/auth-rh-rsa.c
@@ -50,11 +50,13 @@ auth_rhosts_rsa_key_allowed(struct passwd *pw, char *cuser, char *chost,
50 if (blacklisted_key(client_host_key) == 1) { 50 if (blacklisted_key(client_host_key) == 1) {
51 fp = key_fingerprint(client_host_key, SSH_FP_MD5, SSH_FP_HEX); 51 fp = key_fingerprint(client_host_key, SSH_FP_MD5, SSH_FP_HEX);
52 if (options.permit_blacklisted_keys) 52 if (options.permit_blacklisted_keys)
53 logit("Public key %s blacklisted (see " 53 logit("Public key %s from %s blacklisted (see "
54 "ssh-vulnkey(1)); continuing anyway", fp); 54 "ssh-vulnkey(1)); continuing anyway",
55 fp, get_remote_ipaddr());
55 else 56 else
56 logit("Public key %s blacklisted (see " 57 logit("Public key %s from %s blacklisted (see "
57 "ssh-vulnkey(1))", fp); 58 "ssh-vulnkey(1))",
59 fp, get_remote_ipaddr());
58 xfree(fp); 60 xfree(fp);
59 if (!options.permit_blacklisted_keys) 61 if (!options.permit_blacklisted_keys)
60 return 0; 62 return 0;