pkgsrc/net/pppd/patches/patch-ak
cube 3e86158156 Initial import of pppd, version 2.4.3, into the NetBSD Package Collection.
The PPP Daemon is the userland part of the Point-to-Point Protocol.  It works
in combination with a dedicated kernel network interface usually named ppp.
PPP is a very extensible protocol and pppd supports a large number of options,
including compression (through various algorithms), cryptography (Microsoft's
MPPE) and authentication (PAP, CHAP, Microsoft CHAP), provided the kernel has
the relevant back-ends in some cases.
2005-01-02 02:51:40 +00:00

52 lines
1.4 KiB
Text

$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;
}