From fbe252063bfa5b60bcdde2e05e496d5ff4743110 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 30 Dec 2014 15:39:03 +0100 Subject: [PATCH] IniWriter: Do not use umask(0) chmod is not affected in any way by the umask. --- library/Icinga/File/Ini/IniWriter.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/library/Icinga/File/Ini/IniWriter.php b/library/Icinga/File/Ini/IniWriter.php index 94a20faa5..28ca53ff0 100644 --- a/library/Icinga/File/Ini/IniWriter.php +++ b/library/Icinga/File/Ini/IniWriter.php @@ -90,11 +90,9 @@ class IniWriter extends Zend_Config_Writer_FileAbstract if ($setMode) { $mode = isset($this->options['filemode']) ? $this->options['filemode'] : static::$fileMode; - $old = umask(0); // Make sure that the mode we're going to set doesn't get mangled if (is_int($mode) && false === @chmod($filePath, $mode)) { throw new Zend_Config_Exception(sprintf('Failed to set file mode "%o" on file "%s"', $mode, $filePath)); } - umask($old); } } @@ -234,7 +232,7 @@ class IniWriter extends Zend_Config_Writer_FileAbstract /** * Getter for filename - * + * * @return string */ public function getFilename()