summaryrefslogtreecommitdiff
path: root/sshlogin.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2009-08-17 09:40:00 +1000
committerDarren Tucker <dtucker@zip.com.au>2009-08-17 09:40:00 +1000
commitb5d5ee1ab0a2df1d5c6aea7ac8dadc4e8782bdd0 (patch)
treecb73f65759a1f3d268015bd8688e6c987b9442e6 /sshlogin.c
parent83d8f2833611c8bb3646eeae918788e946e4e190 (diff)
downloadopenssh-git-b5d5ee1ab0a2df1d5c6aea7ac8dadc4e8782bdd0.tar.gz
- (dtucker) [sshlogin.c openbsd-compat/port-aix.{c,h}] Bug #1595: make
PrintLastLog work on AIX. Based in part on a patch from Miguel Sanders.
Diffstat (limited to 'sshlogin.c')
-rw-r--r--sshlogin.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sshlogin.c b/sshlogin.c
index dff47b6f..33bd652f 100644
--- a/sshlogin.c
+++ b/sshlogin.c
@@ -93,6 +93,13 @@ store_lastlog_message(const char *user, uid_t uid)
if (!options.print_lastlog)
return;
+# ifdef CUSTOM_SYS_AUTH_GET_LASTLOGIN_MSG
+ time_string = sys_auth_get_lastlogin_msg(user, uid);
+ if (time_string != NULL) {
+ buffer_append(&loginmsg, time_string, strlen(time_string));
+ xfree(time_string);
+ }
+# else
last_login_time = get_last_login_time(uid, user, hostname,
sizeof(hostname));
@@ -107,6 +114,7 @@ store_lastlog_message(const char *user, uid_t uid)
time_string, hostname);
buffer_append(&loginmsg, buf, strlen(buf));
}
+# endif /* CUSTOM_SYS_AUTH_GET_LASTLOGIN_MSG */
#endif /* NO_SSH_LASTLOG */
}