diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2009-07-30 17:46:12 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2009-07-30 17:46:12 +0000 |
commit | 61f3fc7e4dc5bdf543940f8cc7334f5f64d4b9fb (patch) | |
tree | 4eb1ec694aca054687584f90dbc78a9d2e6c849e /cfg.c | |
parent | 8df30358317c2e1aeb324c1e5cef0b4a17440302 (diff) |
Don't babysit people and let them try to load /dev/zero or (more useful)
/dev/null if they want.
Diffstat (limited to 'cfg.c')
-rw-r--r-- | cfg.c | 10 |
1 files changed, 0 insertions, 10 deletions
@@ -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); |