summaryrefslogtreecommitdiffstats
path: root/usr.bin/login/login_fbtab.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/login/login_fbtab.c')
-rw-r--r--usr.bin/login/login_fbtab.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/login/login_fbtab.c b/usr.bin/login/login_fbtab.c
index 846033c..e0b99e3 100644
--- a/usr.bin/login/login_fbtab.c
+++ b/usr.bin/login/login_fbtab.c
@@ -66,6 +66,7 @@
#include <string.h>
#include <errno.h>
#include <dirent.h>
+#include <paths.h>
#include <unistd.h>
#include "pathnames.h"
@@ -98,7 +99,7 @@ gid_t gid;
*cp = 0; /* strip comment */
if ((cp = devname = strtok(buf, WSPACE)) == 0)
continue; /* empty or comment */
- if (strncmp(devname, "/dev/", 5) != 0
+ if (strncmp(devname, _PATH_DEV, sizeof _PATH_DEV - 1) != 0
|| (cp = strtok((char *) 0, WSPACE)) == 0
|| *cp != '0'
|| sscanf(cp, "%o", &prot) == 0
OpenPOWER on IntegriCloud