summaryrefslogtreecommitdiffstats
path: root/cfg.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-07-30 17:46:12 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-07-30 17:46:12 +0000
commit61f3fc7e4dc5bdf543940f8cc7334f5f64d4b9fb (patch)
tree4eb1ec694aca054687584f90dbc78a9d2e6c849e /cfg.c
parent8df30358317c2e1aeb324c1e5cef0b4a17440302 (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.c10
1 files changed, 0 insertions, 10 deletions
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);