X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=pppd%2Fauth.c;h=b9c28fcafb6abc38ca789436c308831fb9d02799;hp=a8e50042570286e55d3cd14af09d5b091eea70fe;hb=1b9f7635dd45d643b2fb7cf496f67789892897c5;hpb=829ce3a1b544753fc086c75b57d779839adfa545 diff --git a/pppd/auth.c b/pppd/auth.c index a8e5004..b9c28fc 100644 --- a/pppd/auth.c +++ b/pppd/auth.c @@ -33,7 +33,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: auth.c,v 1.7 1994/08/09 06:29:14 paulus Exp $"; +static char rcsid[] = "$Id: auth.c,v 1.9 1994/09/01 00:12:52 paulus Exp $"; #endif #include @@ -77,16 +77,6 @@ struct wordlist { #define FALSE 0 #define TRUE 1 -extern char user[]; -extern char passwd[]; -extern char devname[]; -extern char our_name[]; -extern char remote_name[]; -extern char hostname[]; -extern int uselogin; -extern int usehostname; -extern int auth_required; - /* Records which authentication operations haven't completed yet. */ static int auth_pending[NPPP]; static int logged_in; @@ -426,7 +416,7 @@ check_passwd(unit, auser, userlen, apasswd, passwdlen, msg, msglen) */ if (attempts++ >= 10) { syslog(LOG_WARNING, "%d LOGIN FAILURES ON %s, %s", - attempts, devname, user); + attempts, devnam, user); quit(); } if (attempts > 3) @@ -488,9 +478,9 @@ login(user, passwd, msg, msglen) /* * Write a wtmp entry for this user. */ - tty = strrchr(devname, '/'); + tty = strrchr(devnam, '/'); if (tty == NULL) - tty = devname; + tty = devnam; else tty++; logwtmp(tty, user, ""); /* Add wtmp login entry */ @@ -507,9 +497,9 @@ logout() { char *tty; - tty = strrchr(devname, '/'); + tty = strrchr(devnam, '/'); if (tty == NULL) - tty = devname; + tty = devnam; else tty++; logwtmp(tty, "", ""); /* Wipe out wtmp logout entry */ @@ -703,9 +693,9 @@ get_secret(unit, client, server, secret, secret_len, save_addrs) int auth_ip_addr(unit, addr) int unit; - u_long addr; + uint32 addr; { - u_long a; + uint32 a; struct hostent *hp; struct wordlist *addrs; @@ -726,7 +716,7 @@ auth_ip_addr(unit, addr) addrs->word); continue; } else - a = *(u_long *)hp->h_addr; + a = *(uint32 *)hp->h_addr; } if (addr == a) return 1; @@ -741,7 +731,7 @@ auth_ip_addr(unit, addr) */ int bad_ip_adrs(addr) - u_long addr; + uint32 addr; { addr = ntohl(addr); return (addr >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET