summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pppd/auth.c
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2000-12-09 09:35:55 +0000
committerobrien <obrien@FreeBSD.org>2000-12-09 09:35:55 +0000
commitc2ee1dcc02035d781d6c70f06df7106979a9f870 (patch)
tree757810dc1fdd19be4c8125ccb9e8beb1aff3d929 /usr.sbin/pppd/auth.c
parentc174181f432119d1dae3f5e58ecc14c8d7b6f545 (diff)
downloadFreeBSD-src-c2ee1dcc02035d781d6c70f06df7106979a9f870.zip
FreeBSD-src-c2ee1dcc02035d781d6c70f06df7106979a9f870.tar.gz
Add `_PATH_DEVZERO'.
Use _PATH_* where where possible.
Diffstat (limited to 'usr.sbin/pppd/auth.c')
-rw-r--r--usr.sbin/pppd/auth.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/pppd/auth.c b/usr.sbin/pppd/auth.c
index 4cc40cb..2a580e9 100644
--- a/usr.sbin/pppd/auth.c
+++ b/usr.sbin/pppd/auth.c
@@ -41,6 +41,7 @@ static char rcsid[] = "$FreeBSD$";
#include <stdlib.h>
#include <unistd.h>
#include <syslog.h>
+#include <paths.h>
#include <pwd.h>
#include <string.h>
#include <sys/types.h>
@@ -965,7 +966,7 @@ plogin(user, passwd, msg, msglen)
/* Log in wtmp and utmp using login() */
tty = devnam;
- if (strncmp(tty, "/dev/", 5) == 0)
+ if (strncmp(tty, _PATH_DEV, sizeof _PATH_DEV - 1) == 0)
tty += 5;
if (logout(tty)) /* Already entered (by login?) */
@@ -1031,7 +1032,7 @@ plogout()
char *tty;
tty = devnam;
- if (strncmp(tty, "/dev/", 5) == 0)
+ if (strncmp(tty, _PATH_DEV, sizeof _PATH_DEV - 1) == 0)
tty += 5;
logwtmp(tty, "", ""); /* Wipe out wtmp logout entry */
logout(tty); /* Wipe out utmp */
OpenPOWER on IntegriCloud