summaryrefslogtreecommitdiffstats
path: root/mdk-stage1
diff options
context:
space:
mode:
Diffstat (limited to 'mdk-stage1')
-rw-r--r--mdk-stage1/ppp/pppd/auth.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mdk-stage1/ppp/pppd/auth.c b/mdk-stage1/ppp/pppd/auth.c
index 0520c1eef..fd6cb13d4 100644
--- a/mdk-stage1/ppp/pppd/auth.c
+++ b/mdk-stage1/ppp/pppd/auth.c
@@ -1191,11 +1191,13 @@ plogin(user, passwd, msg)
if (pw != (struct passwd *)NULL) {
struct lastlog ll;
int fd;
+ time_t tnow;
if ((fd = open(_PATH_LASTLOG, O_RDWR, 0)) >= 0) {
(void)lseek(fd, (off_t)(pw->pw_uid * sizeof(ll)), SEEK_SET);
memset((void *)&ll, 0, sizeof(ll));
- (void)time(&ll.ll_time);
+ (void)time(&tnow);
+ ll.ll_time = tnow;
(void)strncpy(ll.ll_line, tty, sizeof(ll.ll_line));
(void)write(fd, (char *)&ll, sizeof(ll));
(void)close(fd);