aboutsummaryrefslogtreecommitdiff
path: root/src/log.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-12-28 19:48:52 +0100
committerMax Kellermann <max@duempel.org>2008-12-28 19:48:52 +0100
commit2c5885e9c72655380d1b378f64f2e417a230c2cc (patch)
tree446cccac45ddb36852ccc72bede085e249aad372 /src/log.c
parent8e9def1b5a042b881a2d5fa8f29827c44d0373e7 (diff)
log: don't manipulate the umask
If the user wants the log files with a specific mode, he has to start MPD with the correct umask. Don't hard-code that. This fixes a bug: when log cycling failed, MPD would not restore the old umask.
Diffstat (limited to 'src/log.c')
-rw-r--r--src/log.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/log.c b/src/log.c
index fe7744d5..95a1fc5a 100644
--- a/src/log.c
+++ b/src/log.c
@@ -96,17 +96,9 @@ mpd_log_func(const gchar *log_domain,
static int
open_log_file(void)
{
- mode_t prev;
- int fd;
-
assert(out_filename != NULL);
- prev = umask(0066);
- fd = open(out_filename, O_CREAT | O_WRONLY | O_APPEND, 0666);
-
- umask(prev);
-
- return fd;
+ return open(out_filename, O_CREAT | O_WRONLY | O_APPEND, 0666);
}
void initLog(bool verbose)