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.
This commit is contained in:
Max Kellermann 2008-12-28 19:48:52 +01:00
parent 8e9def1b5a
commit 2c5885e9c7

View File

@ -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)