summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cfg.c10
-rw-r--r--cmd-load-buffer.c4
2 files changed, 0 insertions, 14 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);
diff --git a/cmd-load-buffer.c b/cmd-load-buffer.c
index 063cafa1..4a7f9ffb 100644
--- a/cmd-load-buffer.c
+++ b/cmd-load-buffer.c
@@ -60,10 +60,6 @@ cmd_load_buffer_exec(struct cmd *self, struct cmd_ctx *ctx)
ctx->error(ctx, "%s: %s", data->arg, strerror(errno));
return (-1);
}
- if (!S_ISREG(statbuf.st_mode)) {
- ctx->error(ctx, "%s: not a regular file", data->arg);
- return (-1);
- }
if ((f = fopen(data->arg, "rb")) == NULL) {
ctx->error(ctx, "%s: %s", data->arg, strerror(errno));