X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=pppd%2Fauth.c;h=aca60b51974f9f85f4eec64279d08128c6b27917;hp=f08fb312abe2b64f90bb4dc5a04a93faa0002664;hb=f496bf27c6f959825eb6b6d60e31801ff6137462;hpb=064450d2b3ecf22d603cf13cb704c6e96b6c1a17 diff --git a/pppd/auth.c b/pppd/auth.c index f08fb31..aca60b5 100644 --- a/pppd/auth.c +++ b/pppd/auth.c @@ -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 @@ -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 #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; }