From 991b346d4994b4b85981adb35d0dd6e91bedd364 Mon Sep 17 00:00:00 2001 From: Guillaume Cottenceau Date: Mon, 11 Jun 2001 14:46:02 +0000 Subject: have adsl pppoe installation available --- mdk-stage1/ppp/pppd/auth.c | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-) (limited to 'mdk-stage1/ppp/pppd/auth.c') diff --git a/mdk-stage1/ppp/pppd/auth.c b/mdk-stage1/ppp/pppd/auth.c index c1912c252..5f95a2982 100644 --- a/mdk-stage1/ppp/pppd/auth.c +++ b/mdk-stage1/ppp/pppd/auth.c @@ -76,6 +76,8 @@ #endif #include "pathnames.h" +#include + static const char rcsid[] = RCSID; /* Bits in scan_authfile return value */ @@ -1183,7 +1185,7 @@ plogin(user, passwd, msg) tty = devnam; if (strncmp(tty, "/dev/", 5) == 0) tty += 5; - logwtmp(tty, user, remote_name); /* Add wtmp login entry */ +// logwtmp(tty, user, remote_name); /* Add wtmp login entry */ #if defined(_PATH_LASTLOG) && !defined(USE_PAM) if (pw != (struct passwd *)NULL) { @@ -1229,7 +1231,7 @@ plogout() tty = devnam; if (strncmp(tty, "/dev/", 5) == 0) tty += 5; - logwtmp(tty, "", ""); /* Wipe out utmp logout entry */ +// logwtmp(tty, "", ""); /* Wipe out utmp logout entry */ #endif /* ! USE_PAM */ logged_in = 0; } @@ -1475,8 +1477,7 @@ set_allowed_addrs(unit, addrs, opts) struct permitted_ip *ip; char *ptr_word, *ptr_mask; struct hostent *hp; - struct netent *np; - u_int32_t a, mask, ah, offset; + u_int32_t a, mask, offset; struct ipcp_options *wo = &ipcp_wantoptions[unit]; u_int32_t suggested_ip = 0; @@ -1551,22 +1552,8 @@ set_allowed_addrs(unit, addrs, opts) if (hp != NULL && hp->h_addrtype == AF_INET) { a = *(u_int32_t *)hp->h_addr; } else { - np = getnetbyname (ptr_word); - if (np != NULL && np->n_addrtype == AF_INET) { - a = htonl (*(u_int32_t *)np->n_net); - if (ptr_mask == NULL) { - /* calculate appropriate mask for net */ - ah = ntohl(a); - if (IN_CLASSA(ah)) - mask = IN_CLASSA_NET; - else if (IN_CLASSB(ah)) - mask = IN_CLASSB_NET; - else if (IN_CLASSC(ah)) - mask = IN_CLASSC_NET; - } - } else { - a = inet_addr (ptr_word); - } + printf("*** getnetbyname is unsupported, please report bug! ***\n"); + return; } if (ptr_mask != NULL) -- cgit v1.2.1