Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
417253af
Commit
417253af
authored
May 14, 2013
by
antirez
Browse files
CONFIG REWRITE: Use sane perms when creating redis.conf from scratch.
parent
8feb3d26
Changes
1
Show whitespace changes
Inline
Side-by-side
src/config.c
View file @
417253af
...
@@ -1458,7 +1458,7 @@ void rewriteConfigRemoveOrphaned(struct rewriteConfigState *state) {
...
@@ -1458,7 +1458,7 @@ void rewriteConfigRemoveOrphaned(struct rewriteConfigState *state) {
* set accordingly. */
* set accordingly. */
int rewriteConfigOverwriteFile(char *configfile, sds content) {
int rewriteConfigOverwriteFile(char *configfile, sds content) {
int retval = 0;
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;
int content_size = sdslen(content), padding = 0;
struct stat sb;
struct stat sb;
sds content_padded;
sds content_padded;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment