Hi,
On Sat, 2010-11-06 at 13:37 -0700, Justin Martin wrote:
> So far as I can tell, from ext/standard/dir.c, chroot is only compiled
> in #if defined(HAVE_CHROOT) && !defined(ZTS) && ENABLE_CHROOT_FUNC
The relevant checks are in ext/standard/config.m4:
if test "$PHP_SAPI" = "cgi" || test "$PHP_SAPI" = "cli" || test
"$PHP_SAPI" = "embed"; then
AC_DEFINE(ENABLE_CHROOT_FUNC, 1, [Whether to enable chroot()
function])
fi
and configure.in:
AC_CHECK_FUNCS(
...
chroot \
...
)
The first test checks the sapi as we don't want to allow chroot() from
withina server module, like chroot()ing an apache child etc.
The later check sets HAVE_CHROOT if it can be found on the host OS. I
assume any used "Unix" system has chroot() in it's libc library.
johannes
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php