summaryrefslogtreecommitdiff
path: root/openbsd-compat
diff options
context:
space:
mode:
Diffstat (limited to 'openbsd-compat')
-rw-r--r--openbsd-compat/port-aix.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/openbsd-compat/port-aix.c b/openbsd-compat/port-aix.c
index a7ced57e9..13a73e873 100644
--- a/openbsd-compat/port-aix.c
+++ b/openbsd-compat/port-aix.c
@@ -265,15 +265,17 @@ sys_auth_record_login(const char *user, const char *host, const char *ttynm,
265 Buffer *loginmsg) 265 Buffer *loginmsg)
266{ 266{
267 char *msg = NULL; 267 char *msg = NULL;
268 static int msg_done = 0;
268 int success = 0; 269 int success = 0;
269 270
270 aix_setauthdb(user); 271 aix_setauthdb(user);
271 if (loginsuccess((char *)user, (char *)host, (char *)ttynm, &msg) == 0) { 272 if (loginsuccess((char *)user, (char *)host, (char *)ttynm, &msg) == 0) {
272 success = 1; 273 success = 1;
273 if (msg != NULL) { 274 if (msg != NULL && loginmsg != NULL && !msg_done) {
274 debug("AIX/loginsuccess: msg %s", msg); 275 debug("AIX/loginsuccess: msg %s", msg);
275 buffer_append(loginmsg, msg, strlen(msg)); 276 buffer_append(loginmsg, msg, strlen(msg));
276 xfree(msg); 277 xfree(msg);
278 msg_done = 1;
277 } 279 }
278 } 280 }
279 aix_restoreauthdb(); 281 aix_restoreauthdb();