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)
downloadopenssh-git-42d9dc75ed2eefa6eeffc892f02eb164c1860603.tar.gz
- (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 4698e399..dfc1be37 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 $");
#include "misc.h"
#include "bufaux.h"
#include "packet.h"
+#include "loginrec.h"
/* import */
extern ServerOptions options;
@@ -244,7 +245,8 @@ auth_log(Authctxt *authctxt, int authenticated, char *method, char *info)
#ifdef CUSTOM_FAILED_LOGIN
if (authenticated == 0 && strcmp(method, "password") == 0)
- record_failed_login(authctxt->user, "ssh");
+ record_failed_login(authctxt->user,
+ get_canonical_hostname(options.use_dns), "ssh");
#endif
}
@@ -468,7 +470,8 @@ getpwnamallow(const char *user)
logit("Invalid user %.100s from %.100s",
user, get_remote_ipaddr());
#ifdef CUSTOM_FAILED_LOGIN
- record_failed_login(user, "ssh");
+ record_failed_login(user,
+ get_canonical_hostname(options.use_dns), "ssh");
#endif
return (NULL);
}