WordPress.org

Make WordPress Core

Ticket #7779: getmyuidbad.patch

File getmyuidbad.patch, 606 bytes (added by jamuraa, 13 years ago)

Patch to use posix_getuid() instead of getmyuid()

  • wp-admin/includes/file.php

     
    482482
    483483function get_filesystem_method($args = array()) {
    484484        $method = false;
    485         if( function_exists('getmyuid') && function_exists('fileowner') ){
     485        if( function_exists('posix_getuid') && function_exists('fileowner') ){
    486486                $temp_file = wp_tempnam();
    487                 if ( getmyuid() == fileowner($temp_file) )
     487                if ( posix_getuid() == fileowner($temp_file) )
    488488                        $method = 'direct';
    489489                unlink($temp_file);
    490490        }