]> granicus.if.org Git - php/commitdiff
MFB: Disable realpath cache when open_basedir or safe_mode are enabled on a
authorIlia Alshanetsky <iliaa@php.net>
Tue, 16 May 2006 00:40:36 +0000 (00:40 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Tue, 16 May 2006 00:40:36 +0000 (00:40 +0000)
per-request basis.

main/main.c

index d67a80155b11a281d8efa116c9e2d43e98c5c7d8..0fc8da9940b2577ef44eb9a6ae30c721e89df2b2 100644 (file)
@@ -1197,6 +1197,11 @@ int php_request_startup(TSRMLS_D)
                        zend_set_timeout(PG(max_input_time));
                }
 
+               /* Disable realpath cache if safe_mode or open_basedir are set */
+               if (PG(open_basedir) && *PG(open_basedir)) {
+                       CWDG(realpath_cache_size_limit) = 0;
+               }
+
                if (PG(expose_php)) {
                        sapi_add_header(SAPI_PHP_VERSION_HEADER, sizeof(SAPI_PHP_VERSION_HEADER)-1, 1);
                }