Index: modules/pam_lastlog/pam_lastlog.c =================================================================== RCS file: /cvsroot/pam/Linux-PAM/modules/pam_lastlog/pam_lastlog.c,v --- modules/pam_lastlog/pam_lastlog.c 12 Oct 2001 05:56:26 -0000 1.4 +++ modules/pam_lastlog/pam_lastlog.c 25 Nov 2003 09:00:06 -0000 @@ -1,7 +1,7 @@ /* pam_lastlog module */ /* - * $Id: pam_lastlog.c,v 1.4 2001/10/12 05:56:26 agmorgan Exp $ + * $Id: pam_lastlog.c,v 1.5 2003/11/25 09:00:06 kukuk Exp $ * * Written by Andrew Morgan 1996/3/11 * @@ -254,10 +254,12 @@ 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); @@ -319,13 +321,15 @@ /* 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);