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 @@ -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); }