Use chmod() instead of umask()

This commit is contained in:
Jakub Vrana 2014-06-27 08:15:15 -07:00
parent 7e3f2d9b1d
commit 52eee61247

View file

@ -1083,9 +1083,9 @@ function password_file($create) {
if ($return || !$create) {
return $return;
}
umask(066);
$fp = @fopen($filename, "w"); // @ - can have insufficient rights //! is not atomic
if ($fp) {
chmod($filename, 0600);
$return = rand_string();
fwrite($fp, $return);
fclose($fp);