[TYPO3-core] RFC: Treat symlinks as executable
Martin Kutschker
Martin.Kutschker at n0spam-blackbox.net
Tue Nov 7 12:29:45 CET 2006
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
More information about the TYPO3-team-core
mailing list