diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2006-05-14 16:06:48 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2006-05-14 16:06:48 +0000 |
commit | 4ab6eb3d199b0b111fff24a9bf6b05d1d10259b5 (patch) | |
tree | f09f51db2bf0970a30b12f65d1adeb50a4f9f388 /ext/standard/basic_functions.c | |
parent | ad16c0a37521d086d31f374e711a34abcf3abc4d (diff) | |
download | php-git-4ab6eb3d199b0b111fff24a9bf6b05d1d10259b5.tar.gz |
MFH: Fixed bug #36630 (umask not reset at the end of the request).
Diffstat (limited to 'ext/standard/basic_functions.c')
-rw-r--r-- | ext/standard/basic_functions.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 424687df9a..e495de48e9 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -944,6 +944,7 @@ static void basic_globals_ctor(php_basic_globals *basic_globals_p TSRMLS_DC) { BG(rand_is_seeded) = 0; BG(mt_rand_is_seeded) = 0; + BG(umask) = -1; BG(next) = NULL; BG(left) = -1; @@ -1217,6 +1218,10 @@ PHP_RSHUTDOWN_FUNCTION(basic) 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) { |