ID:               42560
 Comment by:       jeffersongranatto at mannesoft dot com dot br
 Reported By:      Bjorn dot Wiberg at its dot uu dot se
 Status:           Open
 Bug Type:         Safe Mode/open_basedir
 Operating System: IBM AIX 5.3 5300-08-01-0819
 PHP Version:      5.2.9
 New Comment:

I think... this will not cause side effects.

in the file: ext/standard/file.c
in the function: PHP_FUNCTION(tempnam)
remove:
        if (php_check_open_basedir(dir TSRMLS_CC)) {
                RETURN_FALSE;
        }

in the file: main/php_open_temporary_file.c
in the function: PHPAPI int php_open_temporary_fd_ex
include before the comment:
/* Try the directory given as parameter. */
this:
        if (php_check_open_basedir(dir TSRMLS_CC)) {
                return -1;
        }


And remove this:
        !open_basedir_check
It seems it does not work, and now it will be bad.


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

[2009-08-26 05:45:13] Bjorn dot Wiberg at its dot uu dot se

(Don't know about 5.2.10; bug #48276 hinders us from installing that
one on our systems, so personally I cannot verify any changes before
5.2.11 but I'm sure you or some of the other people who have reported
this can. The sample code is included with the original submission.)

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

[2009-08-26 05:36:04] Bjorn dot Wiberg at its dot uu dot se

I also verified this, the problem is still present in PHP 5.2.9:

Warning: tempnam(): open_basedir restriction in effect. File() is not
within the allowed path(s):
(.:/apache/php/lib/php:/opt/freeware/bin:/tmp:/usr/local/bin:/usr/local/etc/Counter/data:/apache/htdocs/bwiberg)
in /apache/htdocs/bwiberg/test/tempnam.php on line 2 

(and no /tmp/test file present)

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

[2009-08-25 19:16:53] rick dot g777 at gmail dot com

Still present in PHP 5.2.9

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

[2009-05-26 18:55:48] pub at perseguers dot ch

I confirm this bug on 5.2.6 on Debian Lenny

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

[2008-09-03 01:00:00] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

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

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/42560

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

  • #42560 [Com]: Empty director... jeffersongranatto at mannesoft dot com dot br

Reply via email to