diff options
author | Max Kellermann <max@duempel.org> | 2008-12-28 19:48:52 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-12-28 19:48:52 +0100 |
commit | 2c5885e9c72655380d1b378f64f2e417a230c2cc (patch) | |
tree | 446cccac45ddb36852ccc72bede085e249aad372 /src | |
parent | 8e9def1b5a042b881a2d5fa8f29827c44d0373e7 (diff) | |
download | mpd-2c5885e9c72655380d1b378f64f2e417a230c2cc.tar.gz mpd-2c5885e9c72655380d1b378f64f2e417a230c2cc.tar.xz mpd-2c5885e9c72655380d1b378f64f2e417a230c2cc.zip |
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')
-rw-r--r-- | src/log.c | 10 |
1 files changed, 1 insertions, 9 deletions
@@ -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) |