version 1.72, 2019/12/04 09:51:07 |
version 1.73, 2021/10/24 21:24:16 |
|
|
|
|
motd = login_getcapstr(lc, "welcome", _PATH_MOTDFILE, _PATH_MOTDFILE); |
motd = login_getcapstr(lc, "welcome", _PATH_MOTDFILE, _PATH_MOTDFILE); |
|
|
if ((fd = open(motd, O_RDONLY, 0)) == -1) |
if ((fd = open(motd, O_RDONLY)) == -1) |
return; |
return; |
|
|
memset(&sa, 0, sizeof(sa)); |
memset(&sa, 0, sizeof(sa)); |
|
|
off_t pos; |
off_t pos; |
int fd; |
int fd; |
|
|
if ((fd = open(_PATH_LASTLOG, O_RDWR, 0)) >= 0) { |
if ((fd = open(_PATH_LASTLOG, O_RDWR)) >= 0) { |
pos = (off_t)pwd->pw_uid * sizeof(ll); |
pos = (off_t)pwd->pw_uid * sizeof(ll); |
if (!quiet) { |
if (!quiet) { |
if (pread(fd, &ll, sizeof(ll), pos) == sizeof(ll) && |
if (pread(fd, &ll, sizeof(ll), pos) == sizeof(ll) && |