[TYPO3-core] RFC: Treat symlinks as executable

Michael Stucki michael at typo3.org
Thu Nov 9 11:15:22 CET 2006


OK, here comes a new proposal. If a file is a symlink, then the symlink will
be resolved, and the target needs to be executable.

I don't like negative AND operations, that's why I changed the order for the
sendmail-check in class.tx_install.php.

- michael

Martin Kutschker wrote:

> Michael Stucki schrieb:
>> This is a SVN patch request.
>> 
>> Problem:
>> There are various places where programs are checked for being executable.
>> However, this does not work if the program is just a symlink.
>> 
>> This is usually needed in larger hosting environments when
>> safe_mode_exec_dir is used and allowed programs are placed in a special
>> directory. Currently they would all need to be copied, hence they won't
>> be upgraded automatically by the systems package manager.
>> 
>> Solution:
>> If is_executable() is false, check using is_link() and accept this as
>> well.
> 
> No use readlink() to resolve the target first:
> 
> @is_executable($path.$cmd)
> ||
> (@is_link($path.$cmd) && @is_executable(readlink($path.$cmd))
> 
> Masi

-- 
Use a newsreader! Check out
http://typo3.org/community/mailing-lists/use-a-news-reader/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: php_isexecutable_fix_v2.diff
Type: text/x-diff
Size: 3165 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20061109/8747f5aa/attachment.bin 


More information about the TYPO3-team-core mailing list