diff options
author | Darren Tucker <dtucker@zip.com.au> | 2003-07-08 22:59:59 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2003-07-08 22:59:59 +1000 |
commit | b9aa0a0baa33efb06a773de18f2b45c12c15cbaf (patch) | |
tree | 88e63239d15bca8deb7fee0bda994b7f0cb746fa /openbsd-compat/port-aix.c | |
parent | 793e817d491b5081d2a156b546ae06f28d11a737 (diff) |
- (dtucker) [auth-passwd.c auth.c session.c sshd.c port-aix.c port-aix.h]
Convert aixloginmsg into platform-independant Buffer loginmsg.
Diffstat (limited to 'openbsd-compat/port-aix.c')
-rw-r--r-- | openbsd-compat/port-aix.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/openbsd-compat/port-aix.c b/openbsd-compat/port-aix.c index c8d9517b6..cc6190cb8 100644 --- a/openbsd-compat/port-aix.c +++ b/openbsd-compat/port-aix.c | |||
@@ -61,6 +61,28 @@ aix_usrinfo(struct passwd *pw) | |||
61 | xfree(cp); | 61 | xfree(cp); |
62 | } | 62 | } |
63 | 63 | ||
64 | #ifdef WITH_AIXAUTHENTICATE | ||
65 | /* | ||
66 | * Remove embedded newlines in string (if any). | ||
67 | * Used before logging messages returned by AIX authentication functions | ||
68 | * so the message is logged on one line. | ||
69 | */ | ||
70 | void | ||
71 | aix_remove_embedded_newlines(char *p) | ||
72 | { | ||
73 | if (p == NULL) | ||
74 | return; | ||
75 | |||
76 | for (; *p; p++) { | ||
77 | if (*p == '\n') | ||
78 | *p = ' '; | ||
79 | } | ||
80 | /* Remove trailing whitespace */ | ||
81 | if (*--p == ' ') | ||
82 | *p = '\0'; | ||
83 | } | ||
84 | #endif /* WITH_AIXAUTHENTICATE */ | ||
85 | |||
64 | # ifdef CUSTOM_FAILED_LOGIN | 86 | # ifdef CUSTOM_FAILED_LOGIN |
65 | /* | 87 | /* |
66 | * record_failed_login: generic "login failed" interface function | 88 | * record_failed_login: generic "login failed" interface function |