From 3f1f065d4ecb212bc5b4825dc059ffdbac474aee Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Tue, 23 Apr 2013 12:02:56 +0200 Subject: [PATCH] Fix: log must use the mask defined into setup Conflicts: htdocs/core/modules/syslog/mod_syslog_file.php --- htdocs/core/modules/syslog/mod_syslog_file.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/htdocs/core/modules/syslog/mod_syslog_file.php b/htdocs/core/modules/syslog/mod_syslog_file.php index b0e1bd550b4..4d482f017cf 100644 --- a/htdocs/core/modules/syslog/mod_syslog_file.php +++ b/htdocs/core/modules/syslog/mod_syslog_file.php @@ -96,7 +96,12 @@ class mod_syslog_file extends LogHandler implements LogHandlerInterface /** * Return the parsed logfile path * +<<<<<<< OURS * @return string +======= + * @param string $suffixinfilename When output is a file, append this suffix into default log filename. + * @return string +>>>>>>> THEIRS */ private function getFilename() { @@ -111,6 +116,8 @@ class mod_syslog_file extends LogHandler implements LogHandlerInterface */ public function export($content) { + global $conf; + $logfile = $this->getFilename(); if (defined("SYSLOG_FILE_NO_ERROR")) $filefd = @fopen($logfile, 'a+'); @@ -142,6 +149,7 @@ class mod_syslog_file extends LogHandler implements LogHandlerInterface fwrite($filefd, $message."\n"); fclose($filefd); + @chmod($logfile, octdec($conf->global->MAIN_UMASK)); } } -} \ No newline at end of file +} -- GitLab