cvs: php-src(PHP_5_2) / NEWS /ext/standard basic_functions.c basic_functions.h file.c

From: Date: Sun, 14 May 2006 16:06:48 +0000
Subject: cvs: php-src(PHP_5_2) / NEWS /ext/standard basic_functions.c basic_functions.h file.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-38205@lists.php.net to get a copy of this message
iliaa Sun May 14 16:06:48 2006 UTC Modified files: (Branch: PHP_5_2) /php-src NEWS /php-src/ext/standard file.c basic_functions.c basic_functions.h Log: MFH: Fixed bug #36630 (umask not reset at the end of the request). http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2027.2.547.2.19&r2=1.2027.2.547.2.20&diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.19 php-src/NEWS:1.2027.2.547.2.20 --- php-src/NEWS:1.2027.2.547.2.19 Sun May 14 02:00:04 2006 +++ php-src/NEWS Sun May 14 16:06:47 2006 @@ -39,6 +39,7 @@ - Fixed bug #37306 (max_execution_time = max_input_time). (Dmitry) - Fixed bug #37244 (Added strict flag to base64_decode() that enforces RFC3548 compliance). (Ilia) +- Fixed bug #36630 (umask not reset at the end of the request). (Ilia) 04 May 2006, PHP 5.1.4 - Added "capture_peer_cert" and "capture_peer_cert_chain" context options http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/file.c?r1=1.409.2.6&r2=1.409.2.6.2.1&diff_format=u Index: php-src/ext/standard/file.c diff -u php-src/ext/standard/file.c:1.409.2.6 php-src/ext/standard/file.c:1.409.2.6.2.1 --- php-src/ext/standard/file.c:1.409.2.6 Thu Apr 6 02:39:55 2006 +++ php-src/ext/standard/file.c Sun May 14 16:06:47 2006 @@ -21,7 +21,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: file.c,v 1.409.2.6 2006/04/06 02:39:55 iliaa Exp $ */ +/* $Id: file.c,v 1.409.2.6.2.1 2006/05/14 16:06:47 iliaa Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -1464,6 +1464,10 @@ oldumask = umask(077); + if (BG(umask) != -1) { + BG(umask) = oldumask; + } + if (arg_count == 0) { umask(oldumask); } else { @@ -1474,8 +1478,6 @@ umask(Z_LVAL_PP(arg1)); } - /* XXX we should maybe reset the umask after each request! */ - RETURN_LONG(oldumask); } http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.1&r2=1.725.2.31.2.2&diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.1 php-src/ext/standard/basic_functions.c:1.725.2.31.2.2 --- php-src/ext/standard/basic_functions.c:1.725.2.31.2.1 Sat May 13 17:58:58 2006 +++ php-src/ext/standard/basic_functions.c Sun May 14 16:06:48 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: basic_functions.c,v 1.725.2.31.2.1 2006/05/13 17:58:58 helly Exp $ */ +/* $Id: basic_functions.c,v 1.725.2.31.2.2 2006/05/14 16:06:48 iliaa Exp $ */ #include "php.h" #include "php_streams.h" @@ -944,6 +944,7 @@ { BG(rand_is_seeded) = 0; BG(mt_rand_is_seeded) = 0; + BG(umask) = -1; BG(next) = NULL; BG(left) = -1; @@ -1217,6 +1218,10 @@ zend_hash_destroy(&BG(putenv_ht)); #endif + if (BG(umask) != -1) { + umask(BG(umask)); + } + /* Check if locale was changed and change it back to the value in startup environment */ if (BG(locale_string) != NULL) { http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/basic_functions.h?r1=1.139.2.4&r2=1.139.2.4.2.1&diff_format=u Index: php-src/ext/standard/basic_functions.h diff -u php-src/ext/standard/basic_functions.h:1.139.2.4 php-src/ext/standard/basic_functions.h:1.139.2.4.2.1 --- php-src/ext/standard/basic_functions.h:1.139.2.4 Sat Feb 18 05:41:59 2006 +++ php-src/ext/standard/basic_functions.h Sun May 14 16:06:48 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: basic_functions.h,v 1.139.2.4 2006/02/18 05:41:59 rasmus Exp $ */ +/* $Id: basic_functions.h,v 1.139.2.4.2.1 2006/05/14 16:06:48 iliaa Exp $ */ #ifndef BASIC_FUNCTIONS_H #define BASIC_FUNCTIONS_H @@ -215,6 +215,8 @@ #if defined(_REENTRANT) && defined(HAVE_MBRLEN) && defined(HAVE_MBSTATE_T) mbstate_t mblen_state; #endif + + int umask; } php_basic_globals; #ifdef ZTS

« previous php.cvs (#38205) next »