version 1.68, 2001/03/25 00:01:34 |
version 1.69, 2001/03/25 13:16:11 |
|
|
} |
} |
|
|
/* Get the time and hostname when the user last logged in. */ |
/* Get the time and hostname when the user last logged in. */ |
hostname[0] = '\0'; |
if (options.print_lastlog) { |
last_login_time = get_last_login_time(pw->pw_uid, pw->pw_name, |
hostname[0] = '\0'; |
hostname, sizeof(hostname)); |
last_login_time = get_last_login_time(pw->pw_uid, pw->pw_name, |
|
hostname, sizeof(hostname)); |
|
} |
|
|
/* Record that there was a login on that tty from the remote host. */ |
/* Record that there was a login on that tty from the remote host. */ |
record_login(pid, s->tty, pw->pw_name, pw->pw_uid, |
record_login(pid, s->tty, pw->pw_name, pw->pw_uid, |
|
|
if (stat(buf, &st) >= 0) |
if (stat(buf, &st) >= 0) |
#endif |
#endif |
return; |
return; |
if (last_login_time != 0) { |
if (options.print_lastlog && last_login_time != 0) { |
time_string = ctime(&last_login_time); |
time_string = ctime(&last_login_time); |
if (strchr(time_string, '\n')) |
if (strchr(time_string, '\n')) |
*strchr(time_string, '\n') = 0; |
*strchr(time_string, '\n') = 0; |