$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 #include #include -#include #include +#include #if defined(_PATH_LASTLOG) && defined(__linux__) #include #endif +#ifdef __NetBSD__ +#include +#endif #include #include @@ -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; }