From 61f3fc7e4dc5bdf543940f8cc7334f5f64d4b9fb Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Thu, 30 Jul 2009 17:46:12 +0000 Subject: Don't babysit people and let them try to load /dev/zero or (more useful) /dev/null if they want. --- cfg.c | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'cfg.c') diff --git a/cfg.c b/cfg.c index fa5e1b05..6320641e 100644 --- a/cfg.c +++ b/cfg.c @@ -55,21 +55,11 @@ load_cfg(const char *path, char **cause) { FILE *f; u_int n; - struct stat sb; char *buf, *line, *ptr; size_t len; struct cmd_list *cmdlist; struct cmd_ctx ctx; - if (stat(path, &sb) != 0) { - xasprintf(cause, "%s: %s", path, strerror(errno)); - return (-1); - } - if (!S_ISREG(sb.st_mode)) { - xasprintf(cause, "%s: not a regular file", path); - return (-1); - } - if ((f = fopen(path, "rb")) == NULL) { xasprintf(cause, "%s: %s", path, strerror(errno)); return (1); -- cgit v1.2.3