ID:               40455
 User updated by:  richton at nbcs dot rutgers dot edu
 Reported By:      richton at nbcs dot rutgers dot edu
-Status:           Feedback
+Status:           Open
 Bug Type:         Safe Mode/open_basedir
 Operating System: Solaris
 PHP Version:      5CVS-2007-02-13 (snap)
 New Comment:

That patch makes my test case better, thanks.


Previous Comments:
------------------------------------------------------------------------

[2007-02-13 14:29:10] [EMAIL PROTECTED]

Please try this patch:
http://tony2001.phpclub.net/dev/tmp/bug40455.diff

------------------------------------------------------------------------

[2007-02-13 13:51:01] richton at nbcs dot rutgers dot edu

OK, gotcha. The expected result of
$process = proc_open("/bin/bash", $descriptorspec, $pipes);

is that PHP will attempt to execute "/bin/bash". This is the actual
result with Safe Mode off. The actual result of that code with safe
mode on is that it ignores "/bin/bash" and attempts to execute the
safe_mode_exec_dir (absurd, really; you can't run a directory),
*silently throwing away* my "/bin/bash" parameter.

This would be like going to a command prompt, and (let's just assume
that the safe_mode_exec_dir is /bin) typing "/bin/bash", and getting
the message "/bin: is a directory." While that may be a true output,
it's not what you typed -- if you type "/bin/bash", you expect
"/bin/bash" to be attempted, and you certainly don't expect your input
to be thrown away silently.

------------------------------------------------------------------------

[2007-02-13 13:08:08] [EMAIL PROTECTED]

>Assuming you're on a system with /bin/bash existing, it's
>all you need to go.
Sorry, I've failed to guess what should be the expected result of this
code and what is the actual result you get.
(Please no truss output. Thank you.)

------------------------------------------------------------------------

[2007-02-13 13:02:20] richton at nbcs dot rutgers dot edu

> To properly diagnose the problem, we
> need a short but complete example script to be able 
> to reproduce this bug ourselves.

And the script filed under "Reproduce code" doesn't meet 
this description how? I even show command lines with which 
to run it. Just in case it's not obvious: What was filed 
under "Reproduce code" in the original report is what I 
placed in "execdir.php" for the Result sections. Assuming 
you're on a system with /bin/bash existing, it's all you 
need to go.

------------------------------------------------------------------------

[2007-02-13 09:07:20] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.



------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/40455

-- 
Edit this bug report at http://bugs.php.net/?id=40455&edit=1

Reply via email to