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

From: Date: Mon, 06 Mar 2006 14:27:46 +0000
Subject: cvs: php-src / NEWS /ext/standard basic_functions.c basic_functions.h file.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-37152@lists.php.net to get a copy of this message
iliaa Mon Mar 6 14:27:46 2006 UTC Modified files: /php-src/ext/standard basic_functions.c basic_functions.h file.c /php-src NEWS Log: Fixed bug #36630 (umask not reset at the end of the request). # This needs to be MFHed, but since it requires an API break it has to wait # until the next minor release. http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/basic_functions.c?r1=1.758&r2=1.759&diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.758 php-src/ext/standard/basic_functions.c:1.759 --- php-src/ext/standard/basic_functions.c:1.758 Thu Feb 23 03:48:30 2006 +++ php-src/ext/standard/basic_functions.c Mon Mar 6 14:27:45 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: basic_functions.c,v 1.758 2006/02/23 03:48:30 bfrance Exp $ */ +/* $Id: basic_functions.c,v 1.759 2006/03/06 14:27:45 iliaa Exp $ */ #include "php.h" #include "php_streams.h" @@ -909,6 +909,7 @@ { BG(rand_is_seeded) = 0; BG(mt_rand_is_seeded) = 0; + BG(umask) = -1; BG(next) = NULL; BG(left) = -1; @@ -1177,6 +1178,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.143&r2=1.144&diff_format=u Index: php-src/ext/standard/basic_functions.h diff -u php-src/ext/standard/basic_functions.h:1.143 php-src/ext/standard/basic_functions.h:1.144 --- php-src/ext/standard/basic_functions.h:1.143 Sat Jan 28 06:16:32 2006 +++ php-src/ext/standard/basic_functions.h Mon Mar 6 14:27:45 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: basic_functions.h,v 1.143 2006/01/28 06:16:32 fmk Exp $ */ +/* $Id: basic_functions.h,v 1.144 2006/03/06 14:27:45 iliaa Exp $ */ #ifndef BASIC_FUNCTIONS_H #define BASIC_FUNCTIONS_H @@ -212,6 +212,8 @@ #if defined(_REENTRANT) && defined(HAVE_MBRLEN) && defined(HAVE_MBSTATE_T) mbstate_t mblen_state; #endif + + int umask; } php_basic_globals; #ifdef ZTS http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/file.c?r1=1.421&r2=1.422&diff_format=u Index: php-src/ext/standard/file.c diff -u php-src/ext/standard/file.c:1.421 php-src/ext/standard/file.c:1.422 --- php-src/ext/standard/file.c:1.421 Thu Mar 2 13:12:45 2006 +++ php-src/ext/standard/file.c Mon Mar 6 14:27:45 2006 @@ -21,7 +21,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: file.c,v 1.421 2006/03/02 13:12:45 dmitry Exp $ */ +/* $Id: file.c,v 1.422 2006/03/06 14:27:45 iliaa Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -1473,6 +1473,10 @@ oldumask = umask(077); + if (BG(umask) != -1) { + BG(umask) = oldumask; + } + if (arg_count == 0) { umask(oldumask); } else { @@ -1483,8 +1487,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/NEWS?r1=1.2093&r2=1.2094&diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2093 php-src/NEWS:1.2094 --- php-src/NEWS:1.2093 Sun Mar 5 19:20:12 2006 +++ php-src/NEWS Mon Mar 6 14:27:45 2006 @@ -29,4 +29,5 @@ the part of haystack before or after first occurence of needle. (Johannes) - Added possibility to check in which extension an internal function was defined using reflection API. (Johannes) +- Fixed bug #36630 (umask not reset at the end of the request). (Ilia) - Fixed bug #34286 (__toString() behavior is inconsistent). (Marcus)

« previous php.cvs (#37152) next »