diff options
author | brian <brian@FreeBSD.org> | 1997-10-28 16:50:56 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1997-10-28 16:50:56 +0000 |
commit | 2c7ba54db583d15a410c146cd4501196e769b97c (patch) | |
tree | 603ec59138e853290e1f7a0706feea401900e055 /usr.sbin | |
parent | fb826377ffc6b723d16bad73fa1b409c899e426b (diff) | |
download | FreeBSD-src-2c7ba54db583d15a410c146cd4501196e769b97c.zip FreeBSD-src-2c7ba54db583d15a410c146cd4501196e769b97c.tar.gz |
Don't logwtmp(), login() already does it.
Log us out of utmp & wtmp if we're already in there.
PR: 4862
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/pppd/auth.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.sbin/pppd/auth.c b/usr.sbin/pppd/auth.c index e368619..4e9745c 100644 --- a/usr.sbin/pppd/auth.c +++ b/usr.sbin/pppd/auth.c @@ -33,7 +33,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: auth.c,v 1.18 1997/08/22 12:03:52 peter Exp $"; +static char rcsid[] = "$Id: auth.c,v 1.19 1997/10/10 06:02:54 peter Exp $"; #endif #include <stdio.h> @@ -909,7 +909,9 @@ ppplogin(user, passwd, msg, msglen) if (strncmp(tty, "/dev/", 5) == 0) tty += 5; - logwtmp(tty, user, remote_name); /* Add wtmp login entry */ + if (logout(tty)) /* Already entered (by login?) */ + logwtmp(tty, "", ""); + logged_in = TRUE; memset((void *)&utmp, 0, sizeof(utmp)); @@ -917,7 +919,7 @@ ppplogin(user, passwd, msg, msglen) (void)strncpy(utmp.ut_name, user, sizeof(utmp.ut_name)); (void)strncpy(utmp.ut_host, ":PPP", sizeof(utmp.ut_host)); (void)strncpy(utmp.ut_line, tty, sizeof(utmp.ut_line)); - login(&utmp); + login(&utmp); /* This logs us in wtmp too */ return (UPAP_AUTHACK); } |