Fix a 64 bit time_t bogon that I missed from before. lastlog.ll_time is
not a time_t.
This commit is contained in:
parent
389b844652
commit
cf6453779c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=121557
@ -986,7 +986,7 @@ plogin(user, passwd, msg, msglen)
|
||||
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);
|
||||
ll.ll_time = _time_to_time32(time(0));
|
||||
(void)strncpy(ll.ll_line, tty, sizeof(ll.ll_line));
|
||||
(void)write(fd, (char *)&ll, sizeof(ll));
|
||||
(void)close(fd);
|
||||
|
Loading…
Reference in New Issue
Block a user