~ubuntu-branches/ubuntu/lucid/openssh/lucid

« back to all changes in this revision

Viewing changes to sshlogin.c

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2010-01-26 13:07:40 UTC
  • mfrom: (1.13.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20100126130740-d7r70jqrqlbvz3r0
Tags: 1:5.3p1-1ubuntu1
* Resynchronise with Debian.  Remaining changes:
  - Add support for registering ConsoleKit sessions on login.
  - Drop openssh-blacklist and openssh-blacklist-extra to Suggests; they
    take up a lot of CD space, and I suspect that rolling them out in
    security updates has covered most affected systems now.
  - Convert to Upstart.  The init script is still here for the benefit of
    people running sshd in chroots.

Show diffs side-by-side

added added

removed removed

Lines of Context:
86
86
static void
87
87
store_lastlog_message(const char *user, uid_t uid)
88
88
{
 
89
#ifndef NO_SSH_LASTLOG
89
90
        char *time_string, hostname[MAXHOSTNAMELEN] = "", buf[512];
90
91
        time_t last_login_time;
91
92
 
92
 
#ifndef NO_SSH_LASTLOG
93
93
        if (!options.print_lastlog)
94
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
103
        last_login_time = get_last_login_time(uid, user, hostname,
97
104
            sizeof(hostname));
98
105
 
107
114
                            time_string, hostname);
108
115
                buffer_append(&loginmsg, buf, strlen(buf));
109
116
        }
 
117
# endif /* CUSTOM_SYS_AUTH_GET_LASTLOGIN_MSG */
110
118
#endif /* NO_SSH_LASTLOG */
111
119
}
112
120