diff options
author | Brian Somers <brian@FreeBSD.org> | 1997-10-28 16:50:56 +0000 |
---|---|---|
committer | Brian Somers <brian@FreeBSD.org> | 1997-10-28 16:50:56 +0000 |
commit | af8eceb3f642774df3e5b81de7f39805a796adcd (patch) | |
tree | f30fdca38c01ccbaf0284d9fd7f31cf0fcd1ce14 | |
parent | 55b211e3af2a3fd1e1a04e5c4e2f005d5d4a9af2 (diff) | |
download | src-af8eceb3f642774df3e5b81de7f39805a796adcd.tar.gz src-af8eceb3f642774df3e5b81de7f39805a796adcd.zip |
Don't logwtmp(), login() already does it.
Log us out of utmp & wtmp if we're already in there.
PR: 4862
Notes
Notes:
svn path=/head/; revision=30814
-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 e3686196fa6a..4e9745c5b667 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); } |