diff options
author | Darren Tucker <dtucker@zip.com.au> | 2003-05-02 23:42:25 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2003-05-02 23:42:25 +1000 |
commit | 97363a8b24601bad631f6f187c487a166f7eb959 (patch) | |
tree | 22ddbb3b4756f7579003e3f18b2a2e690cf5d11d /openbsd-compat | |
parent | 3c01654deb235191d798a5254561624872a7f010 (diff) |
- (dtucker) Move handling of bad password authentications into a platform
specific record_failed_login() function (affects AIX & Unicos).
Diffstat (limited to 'openbsd-compat')
-rw-r--r-- | openbsd-compat/bsd-cray.c | 10 | ||||
-rw-r--r-- | openbsd-compat/bsd-cray.h | 4 | ||||
-rw-r--r-- | openbsd-compat/port-aix.c | 16 | ||||
-rw-r--r-- | openbsd-compat/port-aix.h | 5 |
4 files changed, 33 insertions, 2 deletions
diff --git a/openbsd-compat/bsd-cray.c b/openbsd-compat/bsd-cray.c index edb3112b3..4875af868 100644 --- a/openbsd-compat/bsd-cray.c +++ b/openbsd-compat/bsd-cray.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: bsd-cray.c,v 1.8 2002/09/26 00:38:51 tim Exp $ | 2 | * $Id: bsd-cray.c,v 1.9 2003/05/02 13:42:25 dtucker Exp $ |
3 | * | 3 | * |
4 | * bsd-cray.c | 4 | * bsd-cray.c |
5 | * | 5 | * |
@@ -143,6 +143,14 @@ cray_access_denied(char *username) | |||
143 | return (errcode); | 143 | return (errcode); |
144 | } | 144 | } |
145 | 145 | ||
146 | /* | ||
147 | * record_failed_login: generic "login failed" interface function | ||
148 | */ | ||
149 | record_failed_login(const char *user, const char *ttyname) | ||
150 | { | ||
151 | cray_login_failure((char *)user, IA_UDBERR); | ||
152 | } | ||
153 | |||
146 | int | 154 | int |
147 | cray_setup (uid_t uid, char *username, const char *command) | 155 | cray_setup (uid_t uid, char *username, const char *command) |
148 | { | 156 | { |
diff --git a/openbsd-compat/bsd-cray.h b/openbsd-compat/bsd-cray.h index a09954f2f..d2489f4bf 100644 --- a/openbsd-compat/bsd-cray.h +++ b/openbsd-compat/bsd-cray.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: bsd-cray.h,v 1.7 2003/03/21 01:05:38 mouring Exp $ | 2 | * $Id: bsd-cray.h,v 1.8 2003/05/02 13:42:25 dtucker Exp $ |
3 | * | 3 | * |
4 | * bsd-cray.h | 4 | * bsd-cray.h |
5 | * | 5 | * |
@@ -42,6 +42,8 @@ void cray_init_job(struct passwd *); /* init cray job */ | |||
42 | void cray_job_termination_handler(int); /* process end of job signal */ | 42 | void cray_job_termination_handler(int); /* process end of job signal */ |
43 | void cray_login_failure(char *username, int errcode); | 43 | void cray_login_failure(char *username, int errcode); |
44 | int cray_access_denied(char *username); | 44 | int cray_access_denied(char *username); |
45 | #define CUSTOM_FAILED_LOGIN 1 | ||
46 | void record_failed_login(const char *user, const char *ttyname); | ||
45 | extern char cray_tmpdir[]; /* cray tmpdir */ | 47 | extern char cray_tmpdir[]; /* cray tmpdir */ |
46 | #ifndef IA_SSHD | 48 | #ifndef IA_SSHD |
47 | #define IA_SSHD IA_LOGIN | 49 | #define IA_SSHD IA_LOGIN |
diff --git a/openbsd-compat/port-aix.c b/openbsd-compat/port-aix.c index 4c96a3171..cddc0907f 100644 --- a/openbsd-compat/port-aix.c +++ b/openbsd-compat/port-aix.c | |||
@@ -24,12 +24,17 @@ | |||
24 | * | 24 | * |
25 | */ | 25 | */ |
26 | #include "includes.h" | 26 | #include "includes.h" |
27 | #include "ssh.h" | ||
28 | #include "log.h" | ||
29 | #include "servconf.h" | ||
27 | 30 | ||
28 | #ifdef _AIX | 31 | #ifdef _AIX |
29 | 32 | ||
30 | #include <uinfo.h> | 33 | #include <uinfo.h> |
31 | #include <../xmalloc.h> | 34 | #include <../xmalloc.h> |
32 | 35 | ||
36 | extern ServerOptions options; | ||
37 | |||
33 | /* | 38 | /* |
34 | * AIX has a "usrinfo" area where logname and other stuff is stored - | 39 | * AIX has a "usrinfo" area where logname and other stuff is stored - |
35 | * a few applications actually use this and die if it's not set | 40 | * a few applications actually use this and die if it's not set |
@@ -52,5 +57,16 @@ aix_usrinfo(struct passwd *pw) | |||
52 | xfree(cp); | 57 | xfree(cp); |
53 | } | 58 | } |
54 | 59 | ||
60 | # ifdef CUSTOM_FAILED_LOGIN | ||
61 | /* | ||
62 | * record_failed_login: generic "login failed" interface function | ||
63 | */ | ||
64 | void | ||
65 | record_failed_login(const char *user, const char *ttyname) | ||
66 | { | ||
67 | loginfailed(user, | ||
68 | get_canonical_hostname(options.verify_reverse_mapping), ttyname); | ||
69 | } | ||
70 | # endif /* CUSTOM_FAILED_LOGIN */ | ||
55 | #endif /* _AIX */ | 71 | #endif /* _AIX */ |
56 | 72 | ||
diff --git a/openbsd-compat/port-aix.h b/openbsd-compat/port-aix.h index 4abe00316..2254e7462 100644 --- a/openbsd-compat/port-aix.h +++ b/openbsd-compat/port-aix.h | |||
@@ -36,5 +36,10 @@ | |||
36 | # include <sys/timers.h> | 36 | # include <sys/timers.h> |
37 | #endif | 37 | #endif |
38 | 38 | ||
39 | #ifdef WITH_AIXAUTHENTICATE | ||
40 | # define CUSTOM_FAILED_LOGIN 1 | ||
41 | void record_failed_login(const char *user, const char *ttyname); | ||
42 | #endif | ||
43 | |||
39 | void aix_usrinfo(struct passwd *pw); | 44 | void aix_usrinfo(struct passwd *pw); |
40 | #endif /* _AIX */ | 45 | #endif /* _AIX */ |