summary |
tags |
clone url |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
5932a05)
SCCS-vsn: usr.bin/login/login.c 5.22
SCCS-vsn: usr.bin/login/login.c.1 5.22
#endif not lint
#ifndef lint
#endif not lint
#ifndef lint
-static char sccsid[] = "@(#)login.c 5.21 (Berkeley) %G%";
+static char sccsid[] = "@(#)login.c 5.22 (Berkeley) %G%";
exit(0);
}
time(&utmp.ut_time);
exit(0);
}
time(&utmp.ut_time);
- t = ttyslot();
- if (t > 0 && (f = open("/etc/utmp", O_WRONLY)) >= 0) {
- lseek(f, (long)(t*sizeof(utmp)), 0);
- SCPYN(utmp.ut_line, tty);
- write(f, (char *)&utmp, sizeof(utmp));
- close(f);
- }
- if ((f = open("/usr/adm/wtmp", O_WRONLY|O_APPEND)) >= 0) {
- write(f, (char *)&utmp, sizeof(utmp));
- close(f);
- }
+ SCPYN(utmp.ut_line, tty);
+ login(&utmp);
quietlog = access(qlog, F_OK) == 0;
if ((f = open(lastlog, O_RDWR)) >= 0) {
struct lastlog ll;
quietlog = access(qlog, F_OK) == 0;
if ((f = open(lastlog, O_RDWR)) >= 0) {
struct lastlog ll;
#endif not lint
#ifndef lint
#endif not lint
#ifndef lint
-static char sccsid[] = "@(#)login.c.1 5.21 (Berkeley) %G%";
+static char sccsid[] = "@(#)login.c.1 5.22 (Berkeley) %G%";
exit(0);
}
time(&utmp.ut_time);
exit(0);
}
time(&utmp.ut_time);
- t = ttyslot();
- if (t > 0 && (f = open("/etc/utmp", O_WRONLY)) >= 0) {
- lseek(f, (long)(t*sizeof(utmp)), 0);
- SCPYN(utmp.ut_line, tty);
- write(f, (char *)&utmp, sizeof(utmp));
- close(f);
- }
- if ((f = open("/usr/adm/wtmp", O_WRONLY|O_APPEND)) >= 0) {
- write(f, (char *)&utmp, sizeof(utmp));
- close(f);
- }
+ SCPYN(utmp.ut_line, tty);
+ login(&utmp);
quietlog = access(qlog, F_OK) == 0;
if ((f = open(lastlog, O_RDWR)) >= 0) {
struct lastlog ll;
quietlog = access(qlog, F_OK) == 0;
if ((f = open(lastlog, O_RDWR)) >= 0) {
struct lastlog ll;