]> granicus.if.org Git - php/commitdiff
* apply umask when installing files
authorStig Bakken <ssb@php.net>
Fri, 3 May 2002 00:01:54 +0000 (00:01 +0000)
committerStig Bakken <ssb@php.net>
Fri, 3 May 2002 00:01:54 +0000 (00:01 +0000)
pear/PEAR/Installer.php

index 4b4eb54dc9d6b7f004c4dd2df298e19cafc4be1f..92191ee89422122891f14432b9a5b61160bd923a 100644 (file)
@@ -229,10 +229,10 @@ class PEAR_Installer extends PEAR_Common
         }
         if (!OS_WINDOWS) {
             if ($atts['role'] == 'script') {
-                $mode = 0755;
+                $mode = 0777 & ~$this->config->get('umask');
                 $this->log(2, "+ chmod +x $dest_file");
             } else {
-                $mode = 0644;
+                $mode = 0666 & ~$this->config->get('umask');
             }
             if (!@chmod($dest_file, $mode)) {
                 $this->log(0, "failed to change mode of $dest_file");