From 2c5885e9c72655380d1b378f64f2e417a230c2cc Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 28 Dec 2008 19:48:52 +0100 Subject: 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. --- src/log.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/log.c b/src/log.c index fe7744d50..95a1fc5af 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) -- cgit v1.2.3