Re: Patch for bug# 41822

From: Date: Fri, 05 Oct 2007 07:26:35 +0000
Subject: Re: Patch for bug# 41822
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-32644@lists.php.net to get a copy of this message
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

« previous php.internals (#32644) next »