]> git.ozlabs.org Git - ppp.git/commitdiff
devname -> devnam
authorPaul Mackerras <paulus@samba.org>
Mon, 22 Aug 1994 00:40:48 +0000 (00:40 +0000)
committerPaul Mackerras <paulus@samba.org>
Mon, 22 Aug 1994 00:40:48 +0000 (00:40 +0000)
pppd/auth.c
pppd/ipcp.c
pppd/main.c
pppd/options.c

index a8e50042570286e55d3cd14af09d5b091eea70fe..c4ea4157a232856ec5314c4fad82c24c24055853 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.8 1994/08/22 00:36:38 paulus Exp $";
 #endif
 
 #include <stdio.h>
 #endif
 
 #include <stdio.h>
@@ -79,7 +79,7 @@ struct wordlist {
 
 extern char user[];
 extern char passwd[];
 
 extern char user[];
 extern char passwd[];
-extern char devname[];
+extern char devnam[];
 extern char our_name[];
 extern char remote_name[];
 extern char hostname[];
 extern char our_name[];
 extern char remote_name[];
 extern char hostname[];
@@ -426,7 +426,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 +488,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 +507,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 */
index 6c9abb15f2be9487516afe27a68523800c5f824d..8e20c525e8379753c8d5116b8075b7617f5f616c 100644 (file)
@@ -18,7 +18,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char rcsid[] = "$Id: ipcp.c,v 1.8 1994/05/26 06:37:34 paulus Exp $";
+static char rcsid[] = "$Id: ipcp.c,v 1.9 1994/08/22 00:36:38 paulus Exp $";
 #endif
 
 /*
 #endif
 
 /*
@@ -44,7 +44,7 @@ ipcp_options ipcp_allowoptions[NPPP]; /* Options we allow peer to request */
 ipcp_options ipcp_hisoptions[NPPP];    /* Options that we ack'd */
 
 extern char ifname[];
 ipcp_options ipcp_hisoptions[NPPP];    /* Options that we ack'd */
 
 extern char ifname[];
-extern char devname[];
+extern char devnam[];
 extern int baud_rate;
 
 /* local vars */
 extern int baud_rate;
 
 /* local vars */
@@ -1083,7 +1083,7 @@ ipcp_script(f, script)
 
     argv[0] = script;
     argv[1] = ifname;
 
     argv[0] = script;
     argv[1] = ifname;
-    argv[2] = devname;
+    argv[2] = devnam;
     argv[3] = strspeed;
     argv[4] = strlocal;
     argv[5] = strremote;
     argv[3] = strspeed;
     argv[4] = strlocal;
     argv[5] = strremote;
index 6ec6eab29323094193a6782a19cec58ba6e73dad..35bc8ea4b27e57157084b65ccffd88f16a6869d3 100644 (file)
@@ -18,7 +18,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char rcsid[] = "$Id: main.c,v 1.14 1994/08/09 06:27:52 paulus Exp $";
+static char rcsid[] = "$Id: main.c,v 1.15 1994/08/22 00:40:48 paulus Exp $";
 #endif
 
 #include <stdio.h>
 #endif
 
 #include <stdio.h>
@@ -99,7 +99,7 @@ static pid_t  pid;            /* Our pid */
 static pid_t   pgrpid;         /* Process Group ID */
 uid_t uid;                     /* Our real user-id */
 
 static pid_t   pgrpid;         /* Process Group ID */
 uid_t uid;                     /* Our real user-id */
 
-char devname[MAXPATHLEN] = "/dev/tty"; /* Device name */
+char devnam[MAXPATHLEN] = "/dev/tty";  /* Device name */
 int default_device = TRUE;     /* use default device (stdin/out) */
 
 int fd = -1;                   /* Device file descriptor */
 int default_device = TRUE;     /* use default device (stdin/out) */
 
 int fd = -1;                   /* Device file descriptor */
@@ -208,7 +208,7 @@ main(argc, argv)
 
     p = ttyname(0);
     if (p)
 
     p = ttyname(0);
     if (p)
-       strcpy(devname, p);
+       strcpy(devnam, p);
   
     if (gethostname(hostname, MAXNAMELEN) < 0 ) {
        perror("couldn't get hostname");
   
     if (gethostname(hostname, MAXNAMELEN) < 0 ) {
        perror("couldn't get hostname");
@@ -316,7 +316,7 @@ main(argc, argv)
      * Lock the device if we've been asked to.
      */
     if (lockflag && !default_device)
      * Lock the device if we've been asked to.
      */
     if (lockflag && !default_device)
-       if (lock(devname) < 0)
+       if (lock(devnam) < 0)
            die(1);
 
     do {
            die(1);
 
     do {
@@ -324,8 +324,8 @@ main(argc, argv)
        /*
         * Open the serial device and set it up to be the ppp interface.
         */
        /*
         * Open the serial device and set it up to be the ppp interface.
         */
-       if ((fd = open(devname, O_RDWR, 0)) < 0) {
-           syslog(LOG_ERR, "open(%s): %m", devname);
+       if ((fd = open(devnam, O_RDWR, 0)) < 0) {
+           syslog(LOG_ERR, "open(%s): %m", devnam);
            die(1);
        }
        hungup = 0;
            die(1);
        }
        hungup = 0;
@@ -391,7 +391,7 @@ main(argc, argv)
         * Block all signals, start opening the connection, and wait for
         * incoming events (reply, timeout, etc.).
         */
         * Block all signals, start opening the connection, and wait for
         * incoming events (reply, timeout, etc.).
         */
-       syslog(LOG_NOTICE, "Connect: %s <--> %s", ifname, devname);
+       syslog(LOG_NOTICE, "Connect: %s <--> %s", ifname, devnam);
        lcp_lowerup(0);
        lcp_open(0);            /* Start protocol */
        for (phase = PHASE_ESTABLISH; phase != PHASE_DEAD; ) {
        lcp_lowerup(0);
        lcp_open(0);            /* Start protocol */
        for (phase = PHASE_ESTABLISH; phase != PHASE_DEAD; ) {
index d58c85022badc3e1c283a131caaf4409f03512b6..c7c4b4ea5783bef908fbe21ec4a9bd3a46aeda69 100644 (file)
@@ -18,7 +18,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char rcsid[] = "$Id: options.c,v 1.11 1994/08/09 06:29:14 paulus Exp $";
+static char rcsid[] = "$Id: options.c,v 1.12 1994/08/22 00:36:38 paulus Exp $";
 #endif
 
 #include <stdio.h>
 #endif
 
 #include <stdio.h>
@@ -54,7 +54,7 @@ char *strdup __ARGS((char *));
 #endif
 
 #ifndef GIDSET_TYPE
 #endif
 
 #ifndef GIDSET_TYPE
-#define GIDSET_TYPE    int
+#define GIDSET_TYPE    gid_t
 #endif
 
 /*
 #endif
 
 /*
@@ -141,7 +141,7 @@ extern int nodetach;
 extern char *connector;
 extern char *disconnector;
 extern int inspeed;
 extern char *connector;
 extern char *disconnector;
 extern int inspeed;
-extern char devname[];
+extern char devnam[];
 extern int default_device;
 extern u_long netmask;
 extern int detach;
 extern int default_device;
 extern u_long netmask;
 extern int detach;
@@ -430,9 +430,9 @@ options_for_tty()
     char *dev, *path;
     int ret;
 
     char *dev, *path;
     int ret;
 
-    dev = strrchr(devname, '/');
+    dev = strrchr(devnam, '/');
     if (dev == NULL)
     if (dev == NULL)
-       dev = devname;
+       dev = devnam;
     else
        ++dev;
     if (strcmp(dev, "tty") == 0)
     else
        ++dev;
     if (strcmp(dev, "tty") == 0)
@@ -1069,8 +1069,8 @@ setdevname(cp)
        return -1;
     }
   
        return -1;
     }
   
-    (void) strncpy(devname, cp, MAXPATHLEN);
-    devname[MAXPATHLEN-1] = 0;
+    (void) strncpy(devnam, cp, MAXPATHLEN);
+    devnam[MAXPATHLEN-1] = 0;
     default_device = FALSE;
   
     return 1;
     default_device = FALSE;
   
     return 1;