diff options
author | Damien Miller <djm@mindrot.org> | 2014-07-03 21:29:38 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2014-07-03 21:29:38 +1000 |
commit | 686feb560ec43a06ba04da82b50f3c183c947309 (patch) | |
tree | 2eb2828a5c6c16d2fdede3f4644c811d98e06b57 /auth.c | |
parent | 0f12341402e18fd9996ec23189b9418d2722453f (diff) |
- djm@cvs.openbsd.org 2014/07/03 11:16:55
[auth.c auth.h auth1.c auth2.c]
make the "Too many authentication failures" message include the
user, source address, port and protocol in a format similar to the
authentication success / failure messages; bz#2199, ok dtucker
Diffstat (limited to 'auth.c')
-rw-r--r-- | auth.c | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: auth.c,v 1.104 2014/04/29 18:01:49 markus Exp $ */ | 1 | /* $OpenBSD: auth.c,v 1.105 2014/07/03 11:16:55 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2000 Markus Friedl. All rights reserved. | 3 | * Copyright (c) 2000 Markus Friedl. All rights reserved. |
4 | * | 4 | * |
@@ -326,6 +326,20 @@ auth_log(Authctxt *authctxt, int authenticated, int partial, | |||
326 | #endif | 326 | #endif |
327 | } | 327 | } |
328 | 328 | ||
329 | |||
330 | void | ||
331 | auth_maxtries_exceeded(Authctxt *authctxt) | ||
332 | { | ||
333 | packet_disconnect("Too many authentication failures for " | ||
334 | "%s%.100s from %.200s port %d %s", | ||
335 | authctxt->valid ? "" : "invalid user ", | ||
336 | authctxt->user, | ||
337 | get_remote_ipaddr(), | ||
338 | get_remote_port(), | ||
339 | compat20 ? "ssh2" : "ssh1"); | ||
340 | /* NOTREACHED */ | ||
341 | } | ||
342 | |||
329 | /* | 343 | /* |
330 | * Check whether root logins are disallowed. | 344 | * Check whether root logins are disallowed. |
331 | */ | 345 | */ |