Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:non7top
php4
php-4.3.6-umask.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File php-4.3.6-umask.patch of Package php4
Save and restore umask across requests correctly. --- php-4.3.10/sapi/apache2handler/sapi_apache2.c.umask +++ php-4.3.10/sapi/apache2handler/sapi_apache2.c @@ -399,6 +399,19 @@ return APR_SUCCESS; } +static int saved_umask; + +static void php_save_umask(void) +{ + saved_umask = umask(077); + umask(saved_umask); +} + +static void php_restore_umask(void) +{ + umask(saved_umask); +} + static int php_apache_request_ctor(request_rec *r, php_struct *ctx TSRMLS_DC) { char *content_type; @@ -533,6 +546,8 @@ } else { zend_file_handle zfd = {0}; + php_save_umask(); + zfd.type = ZEND_HANDLE_FILENAME; zfd.filename = (char *) r->filename; zfd.free_filename = 0; @@ -543,6 +558,9 @@ } else { zend_execute_scripts(ZEND_INCLUDE TSRMLS_CC, NULL, 1, &zfd); } + + php_restore_umask(); + #if MEMORY_LIMIT { char *mem_usage;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor