]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/auth.c
support Deflate and Predictor
[ppp.git] / pppd / auth.c
index f08fb312abe2b64f90bb4dc5a04a93faa0002664..aca60b51974f9f85f4eec64279d08128c6b27917 100644 (file)
@@ -33,7 +33,7 @@
  */
 
 #ifndef lint
-static char rcsid[] = "$Id: auth.c,v 1.15 1995/05/19 03:16:12 paulus Exp $";
+static char rcsid[] = "$Id: auth.c,v 1.18 1995/10/27 03:39:53 paulus Exp $";
 #endif
 
 #include <stdio.h>
@@ -66,7 +66,7 @@ static char rcsid[] = "$Id: auth.c,v 1.15 1995/05/19 03:16:12 paulus Exp $";
 #include "ccp.h"
 #include "pathnames.h"
 
-#if defined(sparc) && !defined(NeXT)
+#if defined(sun) && defined(sparc)
 #include <alloca.h>
 #endif /*sparc*/
 
@@ -96,8 +96,7 @@ static struct wordlist *addresses[NUM_PPP];
 #define CHAP_WITHPEER  4
 #define CHAP_PEER      8
 
-/* Prototypes */
-void check_access __P((FILE *, char *));
+/* Prototypes for procedures local to this file. */
 
 static void network_phase __P((int));
 static int  login __P((char *, char *, char **, int *));
@@ -507,11 +506,9 @@ login(user, passwd, msg, msglen)
     /*
      * Write a wtmp entry for this user.
      */
-    tty = strrchr(devnam, '/');
-    if (tty == NULL)
-       tty = devnam;
-    else
-       tty++;
+    tty = devnam;
+    if (strncmp(tty, "/dev/", 5) == 0)
+       tty += 5;
     logwtmp(tty, user, "");            /* Add wtmp login entry */
     logged_in = TRUE;
 
@@ -526,11 +523,9 @@ logout()
 {
     char *tty;
 
-    tty = strrchr(devnam, '/');
-    if (tty == NULL)
-       tty = devnam;
-    else
-       tty++;
+    tty = devnam;
+    if (strncmp(tty, "/dev/", 5) == 0)
+       tty += 5;
     logwtmp(tty, "", "");              /* Wipe out wtmp logout entry */
     logged_in = FALSE;
 }