From:             support at nethost dot cz
Operating system: unix-gentoo
PHP version:      5.2.1
PHP Bug Type:     *Directory/Filesystem functions
Bug description:  umask is not being restored when each request is finished. no 
fixed bug #36630 

Description:
------------
>> Bug #36630   umask is not being restored when each equest is finished.
see for details in bug #36630.
  
this bug not fixed successfully, in file.c is bug in 
        if (BG(umask) != -1) {
                BG(umask) = oldumask;
        }
instead 
        if (BG(umask) == -1) {  /* yes == , no != */
                BG(umask) = oldumask;
        }
it fixes, but for clean code i move initializing 
BG(umask) = -1; from basic_globals_ctor to PHP_RINIT_FUNCTION(basic)  
(finalizing is in PHP_RSHUTDOWN_FUNCTION(basic))

this bug is only for sapi apache2 handler-module (apache1 has workaround
in sapi code). Or may implement same workaround in apache2 handler
module.

i try daily snapshot, and last version, all is bad fixed. after fixing all
is ok for testing code 
<?=echo sprintf("%04o",umask(0111));?>



Reproduce code:
---------------
<?=echo sprintf("%04o",umask(0111));?>


-- 
Edit bug report at http://bugs.php.net/?id=40606&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=40606&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=40606&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=40606&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=40606&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=40606&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=40606&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=40606&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=40606&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=40606&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=40606&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=40606&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=40606&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=40606&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=40606&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=40606&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=40606&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=40606&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=40606&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=40606&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=40606&r=mysqlcfg

Reply via email to