CONFIG REWRITE: Use sane perms when creating redis.conf from scratch.

This commit is contained in:
antirez 2013-05-14 12:45:04 +02:00
parent e252045454
commit 9e74d216e1

View File

@ -1481,7 +1481,7 @@ void rewriteConfigRemoveOrphaned(struct rewriteConfigState *state) {
* set accordingly. */
int rewriteConfigOverwriteFile(char *configfile, sds content) {
int retval = 0;
int fd = open(configfile,O_RDWR|O_CREAT);
int fd = open(configfile,O_RDWR|O_CREAT,0644);
int content_size = sdslen(content), padding = 0;
struct stat sb;
sds content_padded;