From b892863972083681e8e7cb17a90d772d2a5c9304 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 30 Jan 2008 03:20:58 +0100 Subject: [PATCH] create history files with the proper mode --- file.c | 2 +- uci.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/file.c b/file.c index cb76d97..47d9c44 100644 --- a/file.c +++ b/file.c @@ -545,7 +545,7 @@ static FILE *uci_open_stream(struct uci_context *ctx, const char *filename, int UCI_THROW(ctx, UCI_ERR_NOTFOUND); } - fd = open(filename, (write ? O_RDWR | O_CREAT : O_RDONLY)); + fd = open(filename, (write ? O_RDWR | O_CREAT : O_RDONLY), UCI_FILEMODE); if (fd <= 0) goto error; diff --git a/uci.h b/uci.h index 69f4c12..88d94c9 100644 --- a/uci.h +++ b/uci.h @@ -35,6 +35,7 @@ #define UCI_CONFDIR "/etc/config" #define UCI_SAVEDIR "/tmp/.uci" +#define UCI_FILEMODE 0600 enum { -- 2.11.0