diff options
author | Darren Tucker <dtucker@zip.com.au> | 2003-07-08 20:52:12 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2003-07-08 20:52:12 +1000 |
commit | a0c0b6311210e0cddfb1b038bd7b37f5a298ef3e (patch) | |
tree | feecc2846260789958f31ed415aa9065455879fc /openbsd-compat | |
parent | f1159b5b29069caba12dfee88a3a9fb5dc83074d (diff) |
- (dtucker) [acconfig.h auth-passwd.c configure.ac session.c port-aix.[ch]]
Include AIX headers for authentication functions and make calls match
prototypes. Test for and handle 3-args and 4-arg variants of loginfailed.
Diffstat (limited to 'openbsd-compat')
-rw-r--r-- | openbsd-compat/port-aix.c | 6 | ||||
-rw-r--r-- | openbsd-compat/port-aix.h | 9 |
2 files changed, 14 insertions, 1 deletions
diff --git a/openbsd-compat/port-aix.c b/openbsd-compat/port-aix.c index b4c9454a1..c8d9517b6 100644 --- a/openbsd-compat/port-aix.c +++ b/openbsd-compat/port-aix.c | |||
@@ -70,7 +70,11 @@ record_failed_login(const char *user, const char *ttyname) | |||
70 | { | 70 | { |
71 | char *hostname = get_canonical_hostname(options.use_dns); | 71 | char *hostname = get_canonical_hostname(options.use_dns); |
72 | 72 | ||
73 | loginfailed(user, hostname, ttyname); | 73 | # ifdef AIX_LOGINFAILED_3ARG |
74 | loginfailed((char *)user, hostname, (char *)ttyname); | ||
75 | # else | ||
76 | loginfailed((char *)user, hostname, (char *)ttyname, AUDIT_FAIL_AUTH); | ||
77 | # endif | ||
74 | } | 78 | } |
75 | # endif /* CUSTOM_FAILED_LOGIN */ | 79 | # endif /* CUSTOM_FAILED_LOGIN */ |
76 | #endif /* _AIX */ | 80 | #endif /* _AIX */ |
diff --git a/openbsd-compat/port-aix.h b/openbsd-compat/port-aix.h index 2254e7462..2787d919d 100644 --- a/openbsd-compat/port-aix.h +++ b/openbsd-compat/port-aix.h | |||
@@ -26,6 +26,15 @@ | |||
26 | 26 | ||
27 | #ifdef _AIX | 27 | #ifdef _AIX |
28 | 28 | ||
29 | #ifdef WITH_AIXAUTHENTICATE | ||
30 | # include <login.h> | ||
31 | # include <userpw.h> | ||
32 | # include <usersec.h> | ||
33 | # ifdef HAVE_SYS_AUDIT_H | ||
34 | # include <sys/audit.h> | ||
35 | # endif | ||
36 | #endif | ||
37 | |||
29 | /* AIX 4.2.x doesn't have nanosleep but does have nsleep which is equivalent */ | 38 | /* AIX 4.2.x doesn't have nanosleep but does have nsleep which is equivalent */ |
30 | #if !defined(HAVE_NANOSLEEP) && defined(HAVE_NSLEEP) | 39 | #if !defined(HAVE_NANOSLEEP) && defined(HAVE_NSLEEP) |
31 | # define nanosleep(a,b) nsleep(a,b) | 40 | # define nanosleep(a,b) nsleep(a,b) |