On Nov 15, 2012, at 22:45, Ferenc Kovacs <tyr...@gmail.com> wrote: > why not using create_directories() from open_basedir.inc ?
We need a directory we can use in the phpt INI section. It has to exist during PHP startup. What we might do is add preprocessing to the INI section so we could I.e. set open_basedir=$PHP_SRC/ext and depend on PHP's source tree layout. I fear this opens a can of worms of new issues though. If you have a good solution: Feel free to apply it! :) Skipping a security test is bad (as is a failing security test) Thinking about it more: /tmp might work. We might set open_basedir to /tmp and create a directory /tmp/php_open_basedir_12456 inside the test and use that inside the test. Will try that when home. johannes > On Thu, Nov 15, 2012 at 12:49 PM, Pierre Joye <pierre....@gmail.com> wrote: >> it would be much better to use the current directory or root tests >> directory for this kind of tests. Maybe adding a kind of constant we >> can expand in run-tests.php? >> >> On Thu, Nov 15, 2012 at 12:28 PM, Johannes Schlüter <johan...@php.net> wrote: >> > Commit: 7468fc0e374ad8cd8db482e6c228cdaae8aed075 >> > Author: Johannes Schlüter <johan...@php.net> Thu, 15 Nov 2012 >> > 12:28:19 +0100 >> > Parents: f5d8b638c7864150db3e7d39ecf3808850c82e0f >> > Branches: PHP-5.3 PHP-5.4 PHP-5.5 master >> > >> > Link: >> > http://git.php.net/?p=php-src.git;a=commitdiff;h=7468fc0e374ad8cd8db482e6c228cdaae8aed075 >> > >> > Log: >> > Skip test if directory does not exist >> > >> > Would be good to run this using a directory which is existing >> > everywhere. >> > >> > Changed paths: >> > M tests/security/open_basedir_001.phpt >> > >> > >> > Diff: >> > diff --git a/tests/security/open_basedir_001.phpt >> > b/tests/security/open_basedir_001.phpt >> > index e05861a..9ea9559 100644 >> > --- a/tests/security/open_basedir_001.phpt >> > +++ b/tests/security/open_basedir_001.phpt >> > @@ -5,6 +5,9 @@ openbase_dir runtime tightning >> > if (substr(PHP_OS, 0, 3) == 'WIN') { >> > die('skip.. only for unix'); >> > } >> > +if (!is_dir("/usr/local/bin")) { >> > + die('skip.. no /usr/local/bin on this machine'); >> > +} >> > --INI-- >> > open_basedir=/usr/local >> > --FILE-- >> > >> > >> > -- >> > PHP CVS Mailing List (http://www.php.net/) >> > To unsubscribe, visit: http://www.php.net/unsub.php >> > >> >> >> >> -- >> Pierre >> >> @pierrejoye | http://blog.thepimp.net | http://www.libgd.org >> >> -- >> PHP CVS Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php > > > > -- > Ferenc Kovács > @Tyr43l - http://tyrael.hu