if (!(announce & LASTLOG_QUIET)) {
if (last_login.ll_time) {
+ time_t ll_time;
char *the_time;
char *remark;
- the_time = ctime(&last_login.ll_time);
+ ll_time = last_login.ll_time;
+ the_time = ctime(&ll_time);
the_time[-1+strlen(the_time)] = '\0'; /* delete '\n' */
remark = malloc(LASTLOG_MAXSIZE);
/* write latest value */
{
+ time_t ll_time;
const char *remote_host=NULL
, *terminal_line=DEFAULT_TERM;
/* set this login date */
D(("set the most recent login time"));
- (void) time(&last_login.ll_time); /* set the time */
+ (void) time(&ll_time); /* set the time */
+ last_login.ll_time = ll_time;
/* set the remote host */
(void) pam_get_item(pamh, PAM_RHOST, (const void **)&remote_host);