diff options
author | Eric Wong <normalperson@yhbt.net> | 2008-09-22 02:48:40 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-09-22 02:48:40 -0700 |
commit | 8dc17ab196d30802b9a3c61dfef66c398ca01603 (patch) | |
tree | 0cea612e75385e523c0dd0481194009cedf9ec22 | |
parent | 862c5bd6ddc794e658770cfe5283e2833e70712f (diff) | |
download | mpd-8dc17ab196d30802b9a3c61dfef66c398ca01603.tar.gz mpd-8dc17ab196d30802b9a3c61dfef66c398ca01603.tar.xz mpd-8dc17ab196d30802b9a3c61dfef66c398ca01603.zip |
log: remove umask() calls, just change open(2) args
The umask calls were remants of when we used fopen().
-rw-r--r-- | src/log.c | 10 |
1 files changed, 2 insertions, 8 deletions
@@ -215,8 +215,6 @@ mpd_printf mpd_noreturn void FATAL(const char *fmt, ...) int cycle_log_files(void) { - mode_t prev; - if (stdout_mode) return 0; assert(out_filename); @@ -225,22 +223,18 @@ int cycle_log_files(void) DEBUG("Cycling log files...\n"); close_log_files(); - prev = umask(0066); - - out_fd = open(out_filename, O_CREAT | O_WRONLY | O_APPEND, 0666); + out_fd = open(out_filename, O_CREAT | O_WRONLY | O_APPEND, 0600); if (out_fd < 0) { ERROR("error re-opening log file: %s\n", out_filename); return -1; } - err_fd = open(err_filename, O_CREAT | O_WRONLY | O_APPEND, 0666); + err_fd = open(err_filename, O_CREAT | O_WRONLY | O_APPEND, 0600); if (err_fd < 0) { ERROR("error re-opening error file: %s\n", err_filename); return -1; } - umask(prev); - redirect_logs(); DEBUG("Done cycling log files\n"); return 0; |