summaryrefslogtreecommitdiff
path: root/sshlogin.c
diff options
context:
space:
mode:
authordtucker <dtucker>2009-08-16 23:40:00 +0000
committerdtucker <dtucker>2009-08-16 23:40:00 +0000
commit3eb0d3bceef5f359ca1ad0becae4b4167a559a5a (patch)
tree4cb4d6ad60d70128823c19b098131b01453c1922 /sshlogin.c
parentdd8892360bd8e4e639b7580edba6cded49214fb7 (diff)
downloadopenssh-3eb0d3bceef5f359ca1ad0becae4b4167a559a5a.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 */
}