summaryrefslogtreecommitdiff
path: root/openbsd-compat
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 /openbsd-compat
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 'openbsd-compat')
-rw-r--r--openbsd-compat/bsd-cray.c4
-rw-r--r--openbsd-compat/bsd-cray.h6
-rw-r--r--openbsd-compat/port-aix.c7
-rw-r--r--openbsd-compat/port-aix.h3
4 files changed, 7 insertions, 13 deletions
diff --git a/openbsd-compat/bsd-cray.c b/openbsd-compat/bsd-cray.c
index f630366b..d1f1c059 100644
--- a/openbsd-compat/bsd-cray.c
+++ b/openbsd-compat/bsd-cray.c
@@ -1,5 +1,5 @@
/*
- * $Id: bsd-cray.c,v 1.13 2004/01/30 03:34:22 dtucker Exp $
+ * $Id: bsd-cray.c,v 1.14 2005/02/02 06:10:11 dtucker Exp $
*
* bsd-cray.c
*
@@ -171,7 +171,7 @@ cray_access_denied(char *username)
* record_failed_login: generic "login failed" interface function
*/
void
-record_failed_login(const char *user, const char *ttyname)
+record_failed_login(const char *user, const char *hostname, const char *ttyname)
{
cray_login_failure((char *)user, IA_UDBERR);
}
diff --git a/openbsd-compat/bsd-cray.h b/openbsd-compat/bsd-cray.h
index de6ba1a8..774eceb5 100644
--- a/openbsd-compat/bsd-cray.h
+++ b/openbsd-compat/bsd-cray.h
@@ -1,4 +1,4 @@
-/* $Id: bsd-cray.h,v 1.11 2004/01/30 03:34:22 dtucker Exp $ */
+/* $Id: bsd-cray.h,v 1.12 2005/02/02 06:10:11 dtucker Exp $ */
/*
* Copyright (c) 2002, Cray Inc. (Wendy Palm <wendyp@cray.com>)
@@ -42,10 +42,10 @@ void cray_init_job(struct passwd *);
void cray_job_termination_handler(int);
void cray_login_failure(char *, int );
int cray_access_denied(char *);
-#define CUSTOM_FAILED_LOGIN 1
-void record_failed_login(const char *, const char *);
extern char cray_tmpdir[];
+#define CUSTOM_FAILED_LOGIN 1
+
#ifndef IA_SSHD
# define IA_SSHD IA_LOGIN
#endif
diff --git a/openbsd-compat/port-aix.c b/openbsd-compat/port-aix.c
index e7eb179e..79d18021 100644
--- a/openbsd-compat/port-aix.c
+++ b/openbsd-compat/port-aix.c
@@ -28,8 +28,6 @@
#include "auth.h"
#include "ssh.h"
#include "log.h"
-#include "servconf.h"
-#include "canohost.h"
#include "xmalloc.h"
#include "buffer.h"
@@ -38,7 +36,6 @@
#include <uinfo.h>
#include "port-aix.h"
-extern ServerOptions options;
extern Buffer loginmsg;
# ifdef HAVE_SETAUTHDB
@@ -280,10 +277,8 @@ sys_auth_record_login(const char *user, const char *host, const char *ttynm)
* record_failed_login: generic "login failed" interface function
*/
void
-record_failed_login(const char *user, const char *ttyname)
+record_failed_login(const char *user, const char *hostname, const char *ttyname)
{
- char *hostname = (char *)get_canonical_hostname(options.use_dns);
-
if (geteuid() != 0)
return;
diff --git a/openbsd-compat/port-aix.h b/openbsd-compat/port-aix.h
index 29e9751c..75113900 100644
--- a/openbsd-compat/port-aix.h
+++ b/openbsd-compat/port-aix.h
@@ -1,4 +1,4 @@
-/* $Id: port-aix.h,v 1.21 2004/08/14 14:09:12 dtucker Exp $ */
+/* $Id: port-aix.h,v 1.22 2005/02/02 06:10:11 dtucker Exp $ */
/*
*
@@ -68,7 +68,6 @@ int sys_auth_allowed_user(struct passwd *);
# define CUSTOM_SYS_AUTH_RECORD_LOGIN 1
int sys_auth_record_login(const char *, const char *, const char *);
# define CUSTOM_FAILED_LOGIN 1
-void record_failed_login(const char *, const char *);
#endif
void aix_setauthdb(const char *);