From: Arnaud Le Blanc Date: Mon, 11 Aug 2008 23:16:41 +0000 (+0000) Subject: MFH: clear stat cache in chroot() X-Git-Tag: php-5.2.7RC1~121 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=43709499f94a9e8c94d0fed4eed0987b4d3becfa;p=php MFH: clear stat cache in chroot() --- diff --git a/ext/standard/dir.c b/ext/standard/dir.c index ad0f5037cb..06f8a2bb6d 100644 --- a/ext/standard/dir.c +++ b/ext/standard/dir.c @@ -295,7 +295,7 @@ PHP_FUNCTION(chroot) RETURN_FALSE; } - realpath_cache_clean(TSRMLS_C); + php_clear_stat_cache(TSRMLS_C); ret = chdir("/"); diff --git a/ext/standard/tests/file/chroot_001.phpt b/ext/standard/tests/file/chroot_001.phpt new file mode 100644 index 0000000000..b42b17b892 --- /dev/null +++ b/ext/standard/tests/file/chroot_001.phpt @@ -0,0 +1,30 @@ +--TEST-- +chroot() +--SKIPIF-- + +--FILE-- + +--CLEAN-- + +--EXPECTF-- +bool(true) +bool(true) +bool(false) +string(1) "/"