summaryrefslogtreecommitdiff
path: root/auth.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2005-02-02 17:10:11 +1100
committerDarren Tucker <dtucker@zip.com.au>2005-02-02 17:10:11 +1100
commit42d9dc75ed2eefa6eeffc892f02eb164c1860603 (patch)
treec10968f34ae3610ac1630718b2b2c967d5a448aa /auth.c
parentad7646a59ab05ed9d6c156ba952725f44c02de7d (diff)
- (dtucker) [auth.c loginrec.h openbsd-compat/{bsd-cray,port-aix}.{c,h}]
Make record_failed_login() call provide hostname rather than having the implementations having to do lookups themselves. Only affects AIX and UNICOS (the latter only uses the "user" parameter anyway). ok djm@
Diffstat (limited to 'auth.c')
-rw-r--r--auth.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/auth.c b/auth.c
index 4698e3990..dfc1be374 100644
--- a/auth.c
+++ b/auth.c
@@ -50,6 +50,7 @@ RCSID("$OpenBSD: auth.c,v 1.57 2005/01/22 08:17:59 dtucker Exp $");
50#include "misc.h" 50#include "misc.h"
51#include "bufaux.h" 51#include "bufaux.h"
52#include "packet.h" 52#include "packet.h"
53#include "loginrec.h"
53 54
54/* import */ 55/* import */
55extern ServerOptions options; 56extern ServerOptions options;
@@ -244,7 +245,8 @@ auth_log(Authctxt *authctxt, int authenticated, char *method, char *info)
244 245
245#ifdef CUSTOM_FAILED_LOGIN 246#ifdef CUSTOM_FAILED_LOGIN
246 if (authenticated == 0 && strcmp(method, "password") == 0) 247 if (authenticated == 0 && strcmp(method, "password") == 0)
247 record_failed_login(authctxt->user, "ssh"); 248 record_failed_login(authctxt->user,
249 get_canonical_hostname(options.use_dns), "ssh");
248#endif 250#endif
249} 251}
250 252
@@ -468,7 +470,8 @@ getpwnamallow(const char *user)
468 logit("Invalid user %.100s from %.100s", 470 logit("Invalid user %.100s from %.100s",
469 user, get_remote_ipaddr()); 471 user, get_remote_ipaddr());
470#ifdef CUSTOM_FAILED_LOGIN 472#ifdef CUSTOM_FAILED_LOGIN
471 record_failed_login(user, "ssh"); 473 record_failed_login(user,
474 get_canonical_hostname(options.use_dns), "ssh");
472#endif 475#endif
473 return (NULL); 476 return (NULL);
474 } 477 }