diff options
author | Colin Watson <cjwatson@debian.org> | 2010-01-24 22:46:54 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2010-01-24 22:46:54 +0000 |
commit | 59247ecde39f2d826a94ab07f6095ca1f6644e88 (patch) | |
tree | 5910d4a840352aafbf67e8a39fa63936e5529b26 /sshlogin.c | |
parent | 07d905b406c4ab64ea2f10a22f4f8f0d595269f6 (diff) | |
parent | 964476f91b66c475d5b8fa1e8b28d39a97a1b56e (diff) |
* New upstream release.
* Update to GSSAPI patch from
http://www.sxw.org.uk/computing/patches/openssh-5.3p1-gsskex-all-20100124.patch.
Diffstat (limited to 'sshlogin.c')
-rw-r--r-- | sshlogin.c | 10 |
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, | |||
86 | static void | 86 | static void |
87 | store_lastlog_message(const char *user, uid_t uid) | 87 | store_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 | ||