Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/pppd/pppd no need to include utmp everywhere.



details:   https://anonhg.NetBSD.org/src/rev/2282a11d0547
branches:  trunk
changeset: 534717:2282a11d0547
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Aug 02 02:52:07 2002 +0000

description:
no need to include utmp everywhere.
add utmpx support

diffstat:

 usr.sbin/pppd/pppd/Makefile |   4 ++--
 usr.sbin/pppd/pppd/auth.c   |  11 ++++++++---
 usr.sbin/pppd/pppd/main.c   |   5 ++---
 usr.sbin/pppd/pppd/tty.c    |   5 ++---
 usr.sbin/pppd/pppd/utils.c  |   5 ++---
 5 files changed, 16 insertions(+), 14 deletions(-)

diffs (140 lines):

diff -r fa39a920cd7e -r 2282a11d0547 usr.sbin/pppd/pppd/Makefile
--- a/usr.sbin/pppd/pppd/Makefile       Fri Aug 02 02:49:27 2002 +0000
+++ b/usr.sbin/pppd/pppd/Makefile       Fri Aug 02 02:52:07 2002 +0000
@@ -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 @@
 
 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
diff -r fa39a920cd7e -r 2282a11d0547 usr.sbin/pppd/pppd/auth.c
--- a/usr.sbin/pppd/pppd/auth.c Fri Aug 02 02:49:27 2002 +0000
+++ b/usr.sbin/pppd/pppd/auth.c Fri Aug 02 02:52:07 2002 +0000
@@ -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 @@
 #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 @@
     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;
 }
diff -r fa39a920cd7e -r 2282a11d0547 usr.sbin/pppd/pppd/main.c
--- a/usr.sbin/pppd/pppd/main.c Fri Aug 02 02:49:27 2002 +0000
+++ b/usr.sbin/pppd/pppd/main.c Fri Aug 02 02:52:07 2002 +0000
@@ -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 @@
 #include <fcntl.h>
 #include <syslog.h>
 #include <netdb.h>
-#include <utmp.h>
 #include <pwd.h>
 #include <setjmp.h>
 #include <sys/param.h>
diff -r fa39a920cd7e -r 2282a11d0547 usr.sbin/pppd/pppd/tty.c
--- a/usr.sbin/pppd/pppd/tty.c  Fri Aug 02 02:49:27 2002 +0000
+++ b/usr.sbin/pppd/pppd/tty.c  Fri Aug 02 02:52:07 2002 +0000
@@ -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 @@
 #include <fcntl.h>
 #include <syslog.h>
 #include <netdb.h>
-#include <utmp.h>
 #include <pwd.h>
 #include <setjmp.h>
 #include <sys/param.h>
diff -r fa39a920cd7e -r 2282a11d0547 usr.sbin/pppd/pppd/utils.c
--- a/usr.sbin/pppd/pppd/utils.c        Fri Aug 02 02:49:27 2002 +0000
+++ b/usr.sbin/pppd/pppd/utils.c        Fri Aug 02 02:52:07 2002 +0000
@@ -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 @@
 #include <fcntl.h>
 #include <syslog.h>
 #include <netdb.h>
-#include <utmp.h>
 #include <pwd.h>
 #include <sys/param.h>
 #include <sys/types.h>



Home | Main Index | Thread Index | Old Index