- (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@
diff --git a/auth.c b/auth.c
index 4698e39..dfc1be3 100644
--- a/auth.c
+++ b/auth.c
@@ -50,6 +50,7 @@
#include "misc.h"
#include "bufaux.h"
#include "packet.h"
+#include "loginrec.h"
/* import */
extern ServerOptions options;
@@ -244,7 +245,8 @@
#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 @@
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);
}