From 56dd5dfff4801fd32232df4fdb5ca24db2499825 Mon Sep 17 00:00:00 2001 From: Tiago Cunha Date: Thu, 30 Jul 2009 21:07:23 +0000 Subject: Sync OpenBSD patchset 206: Don't babysit people and let them try to load /dev/zero or (more useful) /dev/null if they want. --- cfg.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'cfg.c') diff --git a/cfg.c b/cfg.c index 1fd7524f..c50c5cd9 100644 --- a/cfg.c +++ b/cfg.c @@ -1,4 +1,4 @@ -/* $Id: cfg.c,v 1.18 2009-06-25 16:21:32 nicm Exp $ */ +/* $Id: cfg.c,v 1.19 2009-07-30 21:07:23 tcunha Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott @@ -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