]> git.joonet.de Git - adminer.git/commitdiff
Use chmod() instead of umask()
authorJakub Vrana <jakub@vrana.cz>
Fri, 27 Jun 2014 15:15:15 +0000 (08:15 -0700)
committerJakub Vrana <jakub@vrana.cz>
Fri, 27 Jun 2014 15:15:15 +0000 (08:15 -0700)
adminer/include/functions.inc.php

index 8e6a35a61fd554d2282d7ed7f96addf0e87378ee..7cbbc599cf48cfb081037425ac82fd6c732bc560 100644 (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);