summaryrefslogtreecommitdiff
path: root/auth2-hostbased.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 /auth2-hostbased.c
parentfe3af0a26497234bbae83a25fadf81a78cf2cf66 (diff)
Log IP addresses of hosts attempting to use blacklisted keys (closes:
#481721).
Diffstat (limited to 'auth2-hostbased.c')
-rw-r--r--auth2-hostbased.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/auth2-hostbased.c b/auth2-hostbased.c
index 8e3d5f530..d7009eeb0 100644
--- a/auth2-hostbased.c
+++ b/auth2-hostbased.c
@@ -150,11 +150,13 @@ hostbased_key_allowed(struct passwd *pw, const char *cuser, char *chost,
150 if (blacklisted_key(key) == 1) { 150 if (blacklisted_key(key) == 1) {
151 fp = key_fingerprint(key, SSH_FP_MD5, SSH_FP_HEX); 151 fp = key_fingerprint(key, SSH_FP_MD5, SSH_FP_HEX);
152 if (options.permit_blacklisted_keys) 152 if (options.permit_blacklisted_keys)
153 logit("Public key %s blacklisted (see " 153 logit("Public key %s from %s blacklisted (see "
154 "ssh-vulnkey(1)); continuing anyway", fp); 154 "ssh-vulnkey(1)); continuing anyway",
155 fp, get_remote_ipaddr());
155 else 156 else
156 logit("Public key %s blacklisted (see " 157 logit("Public key %s from %s blacklisted (see "
157 "ssh-vulnkey(1))", fp); 158 "ssh-vulnkey(1))",
159 fp, get_remote_ipaddr());
158 xfree(fp); 160 xfree(fp);
159 if (!options.permit_blacklisted_keys) 161 if (!options.permit_blacklisted_keys)
160 return 0; 162 return 0;