projects
/
oweals
/
uci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3a31f86
)
create history files with the proper mode
author
Felix Fietkau
<nbd@openwrt.org>
Wed, 30 Jan 2008 02:20:58 +0000
(
03:20
+0100)
committer
Felix Fietkau
<nbd@openwrt.org>
Wed, 30 Jan 2008 02:20:58 +0000
(
03:20
+0100)
file.c
patch
|
blob
|
history
uci.h
patch
|
blob
|
history
diff --git
a/file.c
b/file.c
index cb76d97cc0e7d759ab2deeeaad86a5b72849743b..47d9c44b08152de07d0ac734192ca89e4c1c482e 100644
(file)
--- 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 69f4c12074e6cf223d5ecab02a36e48762a010f9..88d94c981521544fbc427a86e3990f0b3a7977fb 100644
(file)
--- 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
{