Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:50115 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 49024 invoked from network); 6 Nov 2010 21:29:08 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Nov 2010 21:29:08 -0000 Authentication-Results: pb1.pair.com header.from=johannes@schlueters.de; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=johannes@schlueters.de; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain schlueters.de from 217.114.211.66 cause and error) X-PHP-List-Original-Sender: johannes@schlueters.de X-Host-Fingerprint: 217.114.211.66 unknown Solaris 10 (beta) Received: from [217.114.211.66] ([217.114.211.66:60999] helo=config.schlueters.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F3/39-19689-798C5DC4 for ; Sat, 06 Nov 2010 16:28:56 -0500 Received: from [192.168.1.31] (ppp-93-104-98-89.dynamic.mnet-online.de [93.104.98.89]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by config.schlueters.de (Postfix) with ESMTPSA id CFAEA44C08; Sat, 6 Nov 2010 22:28:51 +0100 (CET) To: Justin Martin Cc: internals@lists.php.net In-Reply-To: <9B.48.19689.5ACB5DC4@pb1.pair.com> References: <9B.48.19689.5ACB5DC4@pb1.pair.com> Content-Type: text/plain; charset="UTF-8" Date: Sat, 06 Nov 2010 22:27:39 +0100 Message-ID: <1289078859.19273.10.camel@guybrush> Mime-Version: 1.0 X-Mailer: Evolution 2.30.2 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] chroot function availability disqualifiers From: johannes@schlueters.de (Johannes =?ISO-8859-1?Q?Schl=FCter?=) 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