summaryrefslogtreecommitdiff
path: root/sshlogin.c
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2010-01-24 21:39:36 +0000
committerColin Watson <cjwatson@debian.org>2010-01-24 21:39:36 +0000
commit964476f91b66c475d5b8fa1e8b28d39a97a1b56e (patch)
treed12ff16d94cffc5d84dba0193eaaa616967c9c2c /sshlogin.c
parentcadac134eda6ed97478afdc528a68dd33f31dbc5 (diff)
parent1e4cfeee6c17b02af09418c5afe4a4d71aaaf0c8 (diff)
import openssh-5.3p1-gsskex-all-20100124.patch
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 cc35d6024..33bd652fb 100644
--- a/sshlogin.c
+++ b/sshlogin.c
@@ -86,13 +86,20 @@ get_last_login_time(uid_t uid, const char *logname,
86static void 86static void
87store_lastlog_message(const char *user, uid_t uid) 87store_lastlog_message(const char *user, uid_t uid)
88{ 88{
89#ifndef NO_SSH_LASTLOG
89 char *time_string, hostname[MAXHOSTNAMELEN] = "", buf[512]; 90 char *time_string, hostname[MAXHOSTNAMELEN] = "", buf[512];
90 time_t last_login_time; 91 time_t last_login_time;
91 92
92#ifndef NO_SSH_LASTLOG
93 if (!options.print_lastlog) 93 if (!options.print_lastlog)
94 return; 94 return;
95 95
96# ifdef CUSTOM_SYS_AUTH_GET_LASTLOGIN_MSG
97 time_string = sys_auth_get_lastlogin_msg(user, uid);
98 if (time_string != NULL) {
99 buffer_append(&loginmsg, time_string, strlen(time_string));
100 xfree(time_string);
101 }
102# else
96 last_login_time = get_last_login_time(uid, user, hostname, 103 last_login_time = get_last_login_time(uid, user, hostname,
97 sizeof(hostname)); 104 sizeof(hostname));
98 105
@@ -107,6 +114,7 @@ store_lastlog_message(const char *user, uid_t uid)
107 time_string, hostname); 114 time_string, hostname);
108 buffer_append(&loginmsg, buf, strlen(buf)); 115 buffer_append(&loginmsg, buf, strlen(buf));
109 } 116 }
117# endif /* CUSTOM_SYS_AUTH_GET_LASTLOGIN_MSG */
110#endif /* NO_SSH_LASTLOG */ 118#endif /* NO_SSH_LASTLOG */
111} 119}
112 120