Use chmod() instead of umask()
This commit is contained in:
parent
7e3f2d9b1d
commit
52eee61247
|
@ -1083,9 +1083,9 @@ function password_file($create) {
|
||||||
if ($return || !$create) {
|
if ($return || !$create) {
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
umask(066);
|
|
||||||
$fp = @fopen($filename, "w"); // @ - can have insufficient rights //! is not atomic
|
$fp = @fopen($filename, "w"); // @ - can have insufficient rights //! is not atomic
|
||||||
if ($fp) {
|
if ($fp) {
|
||||||
|
chmod($filename, 0600);
|
||||||
$return = rand_string();
|
$return = rand_string();
|
||||||
fwrite($fp, $return);
|
fwrite($fp, $return);
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
|
|
Loading…
Reference in a new issue