no need to include utmp everywhere.

add utmpx support
This commit is contained in:
christos 2002-08-02 02:52:07 +00:00
parent bdb7464e61
commit 4be5fa5155
5 changed files with 16 additions and 14 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.28 2000/09/23 22:39:33 christos Exp $
# $NetBSD: Makefile,v 1.29 2002/08/02 02:52:07 christos Exp $
PCAPDIR=${.CURDIR}/../../../lib/libpcap
@ -14,7 +14,7 @@ BINOWN= root
LDADD= -lpcap -lcrypt -lutil
DPADD= ${LIBPCAP} ${LIBCRYPT} ${LIBUTIL}
CPPFLAGS+= -I. -DHAVE_PATHS_H
CPPFLAGS+= -I. -DHAVE_PATHS_H -DSUPPORT_UTMP -DSUPPORT_UTMPX
CPPFLAGS+= -I${PCAPDIR} -DPPP_FILTER
CPPFLAGS+= -DCBCP_SUPPORT -DCHAPMS -DUSE_CRYPT -DMSLANMAN
CPPFLAGS+= -DINET6

View File

@ -1,4 +1,4 @@
/* $NetBSD: auth.c,v 1.30 2002/07/10 15:00:35 fredb Exp $ */
/* $NetBSD: auth.c,v 1.31 2002/08/02 02:52:07 christos Exp $ */
/*
* auth.c - PPP authentication and phase control.
@ -62,7 +62,7 @@
#if 0
#define RCSID "Id: auth.c,v 1.69 2001/03/12 22:50:01 paulus Exp "
#else
__RCSID("$NetBSD: auth.c,v 1.30 2002/07/10 15:00:35 fredb Exp $");
__RCSID("$NetBSD: auth.c,v 1.31 2002/08/02 02:52:07 christos Exp $");
#endif
#endif
@ -76,11 +76,11 @@ __RCSID("$NetBSD: auth.c,v 1.30 2002/07/10 15:00:35 fredb Exp $");
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/socket.h>
#include <utmp.h>
#include <fcntl.h>
#if defined(_PATH_LASTLOG) && defined(_linux_)
#include <lastlog.h>
#endif
#include <util.h>
#include <netdb.h>
#include <netinet/in.h>
@ -1265,7 +1265,12 @@ plogout()
tty = devnam;
if (strncmp(tty, "/dev/", 5) == 0)
tty += 5;
#ifdef SUPPORT_UTMP
logwtmp(tty, "", ""); /* Wipe out utmp logout entry */
#endif
#ifdef SUPPORT_UTMPX
logwtmpx(tty, "", "", DEAD_PROCESS, 0); /* Wipe out utmp logout entry */
#endif
#endif /* ! USE_PAM */
logged_in = 0;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: main.c,v 1.40 2002/07/01 22:19:38 itojun Exp $ */
/* $NetBSD: main.c,v 1.41 2002/08/02 02:52:07 christos Exp $ */
/*
* main.c - Point-to-Point Protocol main module
@ -47,7 +47,7 @@
#if 0
#define RCSID "Id: main.c,v 1.105 2001/03/12 22:58:59 paulus Exp "
#else
__RCSID("$NetBSD: main.c,v 1.40 2002/07/01 22:19:38 itojun Exp $");
__RCSID("$NetBSD: main.c,v 1.41 2002/08/02 02:52:07 christos Exp $");
#endif
#endif
@ -61,7 +61,6 @@ __RCSID("$NetBSD: main.c,v 1.40 2002/07/01 22:19:38 itojun Exp $");
#include <fcntl.h>
#include <syslog.h>
#include <netdb.h>
#include <utmp.h>
#include <pwd.h>
#include <setjmp.h>
#include <sys/param.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: tty.c,v 1.3 2002/07/31 14:59:10 christos Exp $ */
/* $NetBSD: tty.c,v 1.4 2002/08/02 02:52:07 christos Exp $ */
/*
* tty.c - code for handling serial ports in pppd.
@ -27,7 +27,7 @@
#if 0
#define RCSID "Id: tty.c,v 1.6 2001/03/12 22:59:01 paulus Exp "
#else
__RCSID("$NetBSD: tty.c,v 1.3 2002/07/31 14:59:10 christos Exp $");
__RCSID("$NetBSD: tty.c,v 1.4 2002/08/02 02:52:07 christos Exp $");
#endif
#endif
@ -41,7 +41,6 @@ __RCSID("$NetBSD: tty.c,v 1.3 2002/07/31 14:59:10 christos Exp $");
#include <fcntl.h>
#include <syslog.h>
#include <netdb.h>
#include <utmp.h>
#include <pwd.h>
#include <setjmp.h>
#include <sys/param.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: utils.c,v 1.7 2002/05/29 19:06:33 christos Exp $ */
/* $NetBSD: utils.c,v 1.8 2002/08/02 02:52:07 christos Exp $ */
/*
* utils.c - various utility functions used in pppd.
@ -24,7 +24,7 @@
#if 0
#define RCSID "Id: utils.c,v 1.13 2001/03/16 02:08:13 paulus Exp "
#else
__RCSID("$NetBSD: utils.c,v 1.7 2002/05/29 19:06:33 christos Exp $");
__RCSID("$NetBSD: utils.c,v 1.8 2002/08/02 02:52:07 christos Exp $");
#endif
#endif
@ -38,7 +38,6 @@ __RCSID("$NetBSD: utils.c,v 1.7 2002/05/29 19:06:33 christos Exp $");
#include <fcntl.h>
#include <syslog.h>
#include <netdb.h>
#include <utmp.h>
#include <pwd.h>
#include <sys/param.h>
#include <sys/types.h>