]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/auth.c
don't need to be group kmem any more
[ppp.git] / pppd / auth.c
index a8e50042570286e55d3cd14af09d5b091eea70fe..b9c28fcafb6abc38ca789436c308831fb9d02799 100644 (file)
@@ -33,7 +33,7 @@
  */
 
 #ifndef lint
  */
 
 #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 <stdio.h>
 #endif
 
 #include <stdio.h>
@@ -77,16 +77,6 @@ struct wordlist {
 #define FALSE  0
 #define TRUE   1
 
 #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;
 /* 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",
         */
        if (attempts++ >= 10) {
            syslog(LOG_WARNING, "%d LOGIN FAILURES ON %s, %s",
-                  attempts, devname, user);
+                  attempts, devnam, user);
            quit();
        }
        if (attempts > 3)
            quit();
        }
        if (attempts > 3)
@@ -488,9 +478,9 @@ login(user, passwd, msg, msglen)
     /*
      * Write a wtmp entry for this user.
      */
     /*
      * Write a wtmp entry for this user.
      */
-    tty = strrchr(devname, '/');
+    tty = strrchr(devnam, '/');
     if (tty == NULL)
     if (tty == NULL)
-       tty = devname;
+       tty = devnam;
     else
        tty++;
     logwtmp(tty, user, "");            /* Add wtmp login entry */
     else
        tty++;
     logwtmp(tty, user, "");            /* Add wtmp login entry */
@@ -507,9 +497,9 @@ logout()
 {
     char *tty;
 
 {
     char *tty;
 
-    tty = strrchr(devname, '/');
+    tty = strrchr(devnam, '/');
     if (tty == NULL)
     if (tty == NULL)
-       tty = devname;
+       tty = devnam;
     else
        tty++;
     logwtmp(tty, "", "");              /* Wipe out wtmp logout entry */
     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;
 int
 auth_ip_addr(unit, addr)
     int unit;
-    u_long addr;
+    uint32 addr;
 {
 {
-    u_long a;
+    uint32 a;
     struct hostent *hp;
     struct wordlist *addrs;
 
     struct hostent *hp;
     struct wordlist *addrs;
 
@@ -726,7 +716,7 @@ auth_ip_addr(unit, addr)
                       addrs->word);
                continue;
            } else
                       addrs->word);
                continue;
            } else
-               a = *(u_long *)hp->h_addr;
+               a = *(uint32 *)hp->h_addr;
        }
        if (addr == a)
            return 1;
        }
        if (addr == a)
            return 1;
@@ -741,7 +731,7 @@ auth_ip_addr(unit, addr)
  */
 int
 bad_ip_adrs(addr)
  */
 int
 bad_ip_adrs(addr)
-    u_long addr;
+    uint32 addr;
 {
     addr = ntohl(addr);
     return (addr >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET
 {
     addr = ntohl(addr);
     return (addr >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET