From 43709499f94a9e8c94d0fed4eed0987b4d3becfa Mon Sep 17 00:00:00 2001 From: Arnaud Le Blanc Date: Mon, 11 Aug 2008 23:16:41 +0000 Subject: [PATCH] MFH: clear stat cache in chroot() --- ext/standard/dir.c | 2 +- ext/standard/tests/file/chroot_001.phpt | 30 +++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 ext/standard/tests/file/chroot_001.phpt 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) "/" -- 2.50.1