version 1.5, 2002/08/29 15:57:25 |
version 1.5.2.1, 2003/09/16 21:20:29 |
|
|
} |
} |
|
|
/* |
/* |
* Records that the user has logged in. I these parts of operating systems |
* Records that the user has logged in. I wish these parts of operating |
* were more standardized. |
* systems were more standardized. |
*/ |
*/ |
void |
void |
record_login(pid_t pid, const char *ttyname, const char *user, uid_t uid, |
record_login(pid_t pid, const char *ttyname, const char *user, uid_t uid, |
|
|
if (fd >= 0) { |
if (fd >= 0) { |
lseek(fd, (off_t) ((long) uid * sizeof(ll)), SEEK_SET); |
lseek(fd, (off_t) ((long) uid * sizeof(ll)), SEEK_SET); |
if (write(fd, &ll, sizeof(ll)) != sizeof(ll)) |
if (write(fd, &ll, sizeof(ll)) != sizeof(ll)) |
log("Could not write %.100s: %.100s", lastlog, strerror(errno)); |
logit("Could not write %.100s: %.100s", lastlog, strerror(errno)); |
close(fd); |
close(fd); |
} |
} |
} |
} |