#29840 [Opn->Asn]: is_executable does not honor the safe_mode_exec_dir setting
| From: | sniper@php.net | Date: | Mon, 19 Dec 2005 17:17:30 +0000 |
| Subject: | #29840 [Opn->Asn]: is_executable does not honor the safe_mode_exec_dir setting | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-90676@lists.php.net to get a copy of this message | ||
ID: 29840
Updated by: sniper@php.net
Reported By: markus at cultcom dot de
-Status: Open
+Status: Assigned
Bug Type: Filesystem function related
Operating System: *
PHP Version: 5CVS, 4CVS (2005-01-04)
Assigned To: tony2001
New Comment:
tony2001: 2 words for you: Just commit! :)
Previous Comments:
------------------------------------------------------------------------
[2005-12-05 11:17:08] tomsommer@php.net
Any news on this?
Would appreciate this patch in PHP4 and PHP5
------------------------------------------------------------------------
[2005-08-12 01:00:33] tony2001@php.net
Please try this patch:
http://tony2001.phpclub.net/dev/tmp/bugs_29840_31618.diff
(with the latest snapshot/CVS).
------------------------------------------------------------------------
[2004-12-12 11:36:05] tony2001@php.net
Jani, I sent a patch for this problem to Wez long ago.
The problem is that is_executable() indeed doesn't respect
safe_mode_exec_dir as it should, so I'm assigning this to Wez.
------------------------------------------------------------------------
[2004-12-12 02:07:16] sniper@php.net
It works just fine. (it returns false always when in safe-mode..)
------------------------------------------------------------------------
[2004-08-25 18:06:12] markus at cultcom dot de
Description:
------------
Seems to be a common problem nobody complains about...
"is_executable()" does not work in safe_mode!
Some PHP-Projects check for sendmail using this function and don't work
in safe_mode even if sendmail acutally IS executable (i.e. PEAR:
Mail.php).
is_executable() should at least honor the safe_mode_exec_dir directive!
Reproduce code:
---------------
<?php
if( is_executable( "/usr/sbin/sendmail" ) ) {
print ("no probs!\n");
}
else {
print ("this really sucks!\n");
}
?>
Try with PHP/CGI and suexec + safe_mode
where example-UID != sendmail-UID
Expected result:
----------------
true, what else?
Actual result:
--------------
false.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=29840&edit=1