version 1.25, 1998/07/05 20:30:46 |
version 1.26, 1998/07/13 02:11:36 |
|
|
int fd; |
int fd; |
|
|
if ((fd = open(_PATH_LASTLOG, O_RDWR, 0)) >= 0) { |
if ((fd = open(_PATH_LASTLOG, O_RDWR, 0)) >= 0) { |
(void)lseek(fd, (off_t)pwd->pw_uid * sizeof(ll), L_SET); |
(void)lseek(fd, (off_t)pwd->pw_uid * sizeof(ll), SEEK_SET); |
if (!quiet) { |
if (!quiet) { |
if (read(fd, (char *)&ll, sizeof(ll)) == sizeof(ll) && |
if (read(fd, (char *)&ll, sizeof(ll)) == sizeof(ll) && |
ll.ll_time != 0) { |
ll.ll_time != 0) { |
|
|
ll.ll_host); |
ll.ll_host); |
(void)putchar('\n'); |
(void)putchar('\n'); |
} |
} |
(void)lseek(fd, (off_t)pwd->pw_uid * sizeof(ll), L_SET); |
(void)lseek(fd, (off_t)pwd->pw_uid * sizeof(ll), |
|
SEEK_SET); |
} |
} |
memset((void *)&ll, 0, sizeof(ll)); |
memset((void *)&ll, 0, sizeof(ll)); |
(void)time(&ll.ll_time); |
(void)time(&ll.ll_time); |