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:
parent
8e9def1b5a
commit
2c5885e9c7
10
src/log.c
10
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)
|
||||
|
Loading…
Reference in New Issue
Block a user