aboutsummaryrefslogtreecommitdiffstats
path: root/src/state_file.c
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2008-09-20 03:39:43 -0700
committerEric Wong <normalperson@yhbt.net>2008-09-20 03:39:43 -0700
commitdf1ed6f83043b7290d27b49c3c63fc8bcb796d5c (patch)
tree70a6ef6e795be45dedd863ce63983d22910ef706 /src/state_file.c
parent1087b54a46feacb5a6a46d99df77345be8d4d54d (diff)
downloadmpd-df1ed6f83043b7290d27b49c3c63fc8bcb796d5c.tar.gz
mpd-df1ed6f83043b7290d27b49c3c63fc8bcb796d5c.tar.xz
mpd-df1ed6f83043b7290d27b49c3c63fc8bcb796d5c.zip
Oops, open() with O_CREAT is nicer with a mode
Respect the user's umask (and the number of the beast!)
Diffstat (limited to '')
-rw-r--r--src/state_file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/state_file.c b/src/state_file.c
index b7f28e538..365baec0f 100644
--- a/src/state_file.c
+++ b/src/state_file.c
@@ -55,7 +55,7 @@ void write_state_file(void)
if (!sfpath)
return;
- while (((fd = open(sfpath, O_WRONLY|O_TRUNC|O_CREAT)) < 0) &&
+ while (((fd = open(sfpath, O_WRONLY|O_TRUNC|O_CREAT, 0666)) < 0) &&
errno == EINTR);
if (fd < 0) {
ERROR("problems opening state file \"%s\" for writing: %s\n",