diff options
Diffstat (limited to 'openbsd-compat/port-aix.c')
-rw-r--r-- | openbsd-compat/port-aix.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/openbsd-compat/port-aix.c b/openbsd-compat/port-aix.c index 79d180211..27ab06158 100644 --- a/openbsd-compat/port-aix.c +++ b/openbsd-compat/port-aix.c | |||
@@ -36,6 +36,10 @@ | |||
36 | #include <uinfo.h> | 36 | #include <uinfo.h> |
37 | #include "port-aix.h" | 37 | #include "port-aix.h" |
38 | 38 | ||
39 | /* These should be in the system headers but are not. */ | ||
40 | int usrinfo(int, char *, int); | ||
41 | int setauthdb(const char *, char *); | ||
42 | |||
39 | extern Buffer loginmsg; | 43 | extern Buffer loginmsg; |
40 | 44 | ||
41 | # ifdef HAVE_SETAUTHDB | 45 | # ifdef HAVE_SETAUTHDB |
@@ -49,6 +53,8 @@ static char old_registry[REGISTRY_SIZE] = ""; | |||
49 | * NOTE: TTY= should be set, but since no one uses it and it's hard to | 53 | * NOTE: TTY= should be set, but since no one uses it and it's hard to |
50 | * acquire due to privsep code. We will just drop support. | 54 | * acquire due to privsep code. We will just drop support. |
51 | */ | 55 | */ |
56 | |||
57 | |||
52 | void | 58 | void |
53 | aix_usrinfo(struct passwd *pw) | 59 | aix_usrinfo(struct passwd *pw) |
54 | { | 60 | { |
@@ -260,10 +266,10 @@ sys_auth_record_login(const char *user, const char *host, const char *ttynm) | |||
260 | int success = 0; | 266 | int success = 0; |
261 | 267 | ||
262 | aix_setauthdb(user); | 268 | aix_setauthdb(user); |
263 | if (loginsuccess((char *)user, host, ttynm, &msg) == 0) { | 269 | if (loginsuccess((char *)user, (char *)host, (char *)ttynm, &msg) == 0) { |
264 | success = 1; | 270 | success = 1; |
265 | if (msg != NULL) { | 271 | if (msg != NULL) { |
266 | debug("AIX/loginsuccess: msg %s", __func__, msg); | 272 | debug("AIX/loginsuccess: msg %s", msg); |
267 | buffer_append(&loginmsg, msg, strlen(msg)); | 273 | buffer_append(&loginmsg, msg, strlen(msg)); |
268 | xfree(msg); | 274 | xfree(msg); |
269 | } | 275 | } |
@@ -284,9 +290,10 @@ record_failed_login(const char *user, const char *hostname, const char *ttyname) | |||
284 | 290 | ||
285 | aix_setauthdb(user); | 291 | aix_setauthdb(user); |
286 | # ifdef AIX_LOGINFAILED_4ARG | 292 | # ifdef AIX_LOGINFAILED_4ARG |
287 | loginfailed((char *)user, hostname, (char *)ttyname, AUDIT_FAIL_AUTH); | 293 | loginfailed((char *)user, (char *)hostname, (char *)ttyname, |
294 | AUDIT_FAIL_AUTH); | ||
288 | # else | 295 | # else |
289 | loginfailed((char *)user, hostname, (char *)ttyname); | 296 | loginfailed((char *)user, (char *)hostname, (char *)ttyname); |
290 | # endif | 297 | # endif |
291 | aix_restoreauthdb(); | 298 | aix_restoreauthdb(); |
292 | } | 299 | } |