Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:32644 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60422 invoked by uid 1010); 5 Oct 2007 07:26:22 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 60407 invoked from network); 5 Oct 2007 07:26:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Oct 2007 07:26:22 -0000 Authentication-Results: pb1.pair.com header.from=tony@daylessday.org; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=tony@daylessday.org; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain daylessday.org designates 89.208.40.236 as permitted sender) X-PHP-List-Original-Sender: tony@daylessday.org X-Host-Fingerprint: 89.208.40.236 mail.daylessday.org Linux 2.6 Received: from [89.208.40.236] ([89.208.40.236:51034] helo=daylessday.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 47/F4-25026-D17E5074 for ; Fri, 05 Oct 2007 03:26:21 -0400 Received: from [192.168.3.167] (unknown [212.42.62.198]) by daylessday.org (Postfix) with ESMTP id 0BCD76400EF; Fri, 5 Oct 2007 11:26:18 +0400 (MSD) Message-ID: <4705E72B.3080708@daylessday.org> Date: Fri, 05 Oct 2007 11:26:35 +0400 User-Agent: Thunderbird 2.0.0.6 (X11/20070801) MIME-Version: 1.0 To: Rob Thompson CC: internals@lists.php.net References: <4705E338.4020707@wayne.edu> In-Reply-To: <4705E338.4020707@wayne.edu> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Patch for bug# 41822 From: tony@daylessday.org (Antony Dovgal) On 05.10.2007 11:09, Rob Thompson wrote: > Here is a patch for bug 41822. The expand_filepath() function will not > work in Solaris if a non-root user attempts to read a file under a > directory with only (--x) permissions. > > Currently expand_path() returns NULL and no FD is opened, although the > file is readable. This patch adds a last-ditch effort to open includes > using a relative path and returns NULL if it still can't get a file > descriptor. Rob, I believe you're looking into wrong place. You should be patching virtual_file_ex() in TSRM/tsrm_virtual_cwd.c, the root of all evils is there as this function is used by expand_filepath() and in all other places. Also, as you might have noticed, we do not use system calls like open() directly, we use VCWD_xxx() wrappers for that. They are defined in TSRM/ either. -- Wbr, Antony Dovgal