Re: [PHP-DEV] open_basedir_for_include

2006-03-26 Thread Peter Brodersen
Hi, On Sun, 26 Mar 2006 12:42:57 -0500, in php.internals [EMAIL PROTECTED] (Ilia Alshanetsky) wrote: >If you don't trust your users to execute external commands, which is >perfectly valid concern, PHP provides you with a way (disable_functions) > INI setting to restrict the functionality. I h

Re: [PHP-DEV] open_basedir_for_include

2006-03-26 Thread Ilia Alshanetsky
If you don't trust your users to execute external commands, which is perfectly valid concern, PHP provides you with a way (disable_functions) INI setting to restrict the functionality. Ilia Peter Brodersen wrote: On Sat, 25 Mar 2006 12:14:52 -0500, in php.internals [EMAIL PROTECTED] (Ilia Al

Re: [PHP-DEV] open_basedir_for_include

2006-03-26 Thread Peter Brodersen
On Sat, 25 Mar 2006 12:14:52 -0500, in php.internals [EMAIL PROTECTED] (Ilia Alshanetsky) wrote: >Plus is you leave the file writable, what's to say you couldn't do: >shell_exec("cp foo /lib/file/inc.php") ? The possible exec restriction salvaged from safe_mode mentioned in <[EMAIL PROTECTED]> ?

Re: [PHP-DEV] open_basedir_for_include

2006-03-25 Thread Sara Golemon
The PDM recommendation covering the removal of safe_mode included a note on expanding the role of open_basedir. To that end, I'd like to propose introducing a new ini option: open_basedir_for_include which would allow using include/require(_once) on an expanded set of directories than what ope

Re: [PHP-DEV] open_basedir_for_include

2006-03-25 Thread Ilia Alshanetsky
Rasmus Lerdorf wrote: Yes, and in normal circumstances you wouldn't accidentally write to places you aren't supposed to, just like in normal circumstances you will have all your file permissions set correctly. And in normal circumstances you would never have bugs in your code. Attempts to mo

Re: [PHP-DEV] open_basedir_for_include

2006-03-25 Thread Rasmus Lerdorf
Ilia Alshanetsky wrote: Rasmus Lerdorf wrote: But it does prevent writing to those dirs. That should be the job of file permissions, let's use PEAR directory as an example. In normal circumstances only the root user can write to those dirs and everyone else has read-only access, therefor wri

Re: [PHP-DEV] open_basedir_for_include

2006-03-25 Thread Ilia Alshanetsky
Rasmus Lerdorf wrote: But it does prevent writing to those dirs. That should be the job of file permissions, let's use PEAR directory as an example. In normal circumstances only the root user can write to those dirs and everyone else has read-only access, therefor write permission would alre

Re: [PHP-DEV] open_basedir_for_include

2006-03-25 Thread Rasmus Lerdorf
But it does prevent writing to those dirs. Ilia Alshanetsky wrote: Why not just add the dirs you intend to include from to open_basedir directly? It does not prevent arbitrary files from being loaded anyway from those dirs. A simple ob_start() include "file"; ob_get_clean() will happily give y

Re: [PHP-DEV] open_basedir_for_include

2006-03-25 Thread Ilia Alshanetsky
Why not just add the dirs you intend to include from to open_basedir directly? It does not prevent arbitrary files from being loaded anyway from those dirs. A simple ob_start() include "file"; ob_get_clean() will happily give you the data. And if you wanted to see the source code, highlight_fil

RE: [PHP-DEV] open_basedir_for_include

2006-03-25 Thread Jared Williams
> > Sara Golemon wrote: > > The PDM recommendation covering the removal of safe_mode included a > > note on expanding the role of open_basedir. To that end, > I'd like to > > propose introducing a new ini option: > open_basedir_for_include which > > would allow using include/require(_once)

Re: [PHP-DEV] open_basedir_for_include

2006-03-25 Thread Rasmus Lerdorf
Sara Golemon wrote: The PDM recommendation covering the removal of safe_mode included a note on expanding the role of open_basedir. To that end, I'd like to propose introducing a new ini option: open_basedir_for_include which would allow using include/require(_once) on an expanded set of direc

[PHP-DEV] open_basedir_for_include

2006-03-24 Thread Sara Golemon
The PDM recommendation covering the removal of safe_mode included a note on expanding the role of open_basedir. To that end, I'd like to propose introducing a new ini option: open_basedir_for_include which would allow using include/require(_once) on an expanded set of directories than what ope