summaryrefslogtreecommitdiffstats
path: root/sshlogin.c
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2009-10-01 15:19:37 +0000
committerdes <des@FreeBSD.org>2009-10-01 15:19:37 +0000
commit98b8242e22b0fc941b830dcec63d235b01bd46a2 (patch)
treee5b7ad86bb53b8a7e0394f159b15abac2622bdb6 /sshlogin.c
parentf4c3a2131f559534b5693fd15df8d89049db7cbb (diff)
downloadFreeBSD-src-98b8242e22b0fc941b830dcec63d235b01bd46a2.zip
FreeBSD-src-98b8242e22b0fc941b830dcec63d235b01bd46a2.tar.gz
Vendor import of OpenSSH 5.3p1
Diffstat (limited to 'sshlogin.c')
-rw-r--r--sshlogin.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sshlogin.c b/sshlogin.c
index cc35d60..33bd652 100644
--- a/sshlogin.c
+++ b/sshlogin.c
@@ -86,13 +86,20 @@ get_last_login_time(uid_t uid, const char *logname,
static void
store_lastlog_message(const char *user, uid_t uid)
{
+#ifndef NO_SSH_LASTLOG
char *time_string, hostname[MAXHOSTNAMELEN] = "", buf[512];
time_t last_login_time;
-#ifndef NO_SSH_LASTLOG
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 */
}
OpenPOWER on IntegriCloud