Don't logwtmp(), login() already does it.

Log us out of utmp & wtmp if we're already in there.
PR:		4862
This commit is contained in:
Brian Somers 1997-10-28 16:50:56 +00:00
parent 55b211e3af
commit af8eceb3f6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=30814

View file

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