summaryrefslogtreecommitdiff
path: root/net/pppd/patches/patch-ak
blob: 3485dfb91f255f988b59374d40603b9fd69afa9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
$NetBSD: patch-ak,v 1.1.1.1 2005/01/02 02:51:42 cube Exp $

--- pppd/auth.c.orig	2004-11-12 11:30:51.000000000 +0100
+++ pppd/auth.c
@@ -81,11 +81,14 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/socket.h>
-#include <utmp.h>
 #include <fcntl.h>
+#include <paths.h>
 #if defined(_PATH_LASTLOG) && defined(__linux__)
 #include <lastlog.h>
 #endif
+#ifdef __NetBSD__
+#include <util.h>
+#endif
 
 #include <netdb.h>
 #include <netinet/in.h>
@@ -844,7 +847,8 @@ start_networks(unit)
 
 #ifdef PPP_FILTER
     if (!demand)
-	set_filters(&pass_filter, &active_filter);
+	set_filters(&pass_filter_in, &pass_filter_out,
+		    &active_filter_in, &active_filter_out);
 #endif
     /* Start CCP and ECP */
     for (i = 0; (protp = protocols[i]) != NULL; ++i)
@@ -1664,7 +1668,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, "", "", 0, DEAD_PROCESS);	/* Wipe out utmp logout entry */
+#endif
 #endif /* ! USE_PAM */
     logged_in = 0;
 }
@@ -2416,7 +2425,7 @@ scan_authfile(f, client, server, secret,
 	    if (ap == NULL)
 		novm("authorized addresses");
 	    ap->word = (char *) (ap + 1);
-	    strcpy(ap->word, word);
+	    strlcpy(ap->word, word, strlen(word) + 1);
 	    *app = ap;
 	    app = &ap->next;
 	}