diff options
-rw-r--r-- | usr.sbin/config/main.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/usr.sbin/config/main.c b/usr.sbin/config/main.c index d1ca9bf..24b4396 100644 --- a/usr.sbin/config/main.c +++ b/usr.sbin/config/main.c @@ -150,6 +150,8 @@ main(int argc, char **argv) usage(); PREFIX = *argv; + if (stat(PREFIX, &buf) != 0 || !S_ISREG(buf.st_mode)) + err(2, "%s", PREFIX); if (freopen("DEFAULTS", "r", stdin) != NULL) { found_defaults = 1; yyfile = "DEFAULTS"; |