Changeset 9890

Show
Ignore:
Timestamp:
11/13/08 04:35:49 (2 months ago)
Author:
afz
Message:

better checking permission

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/jaws/html/include/Jaws/Utils.php

    r9888 r9890  
    186186            /* GID check */ 
    187187            if (ini_get('safe_mode_gid')) { 
    188                 if (filegroup($path) == filegroup(__FILE__)) { 
     188                if (filegroup($path) == getmygid()) { 
    189189                    return (@fileperms($path) & 0020) ? is_writeable($path) : false; 
    190190                } 
    191191            } else { 
    192                 if (fileowner($path) == fileowner(__FILE__)) { 
     192                if (fileowner($path) == getmyuid()) { 
    193193                    return (@fileperms($path) & 0200) ? is_writeable($path) : false; 
    194194                } 
     
    242242            /* GID check */ 
    243243            if (ini_get('safe_mode_gid')) { 
    244                 if (filegroup($path) == filegroup(__FILE__)) { 
     244                if (filegroup($path) == getmygid()) { 
    245245                    $result = @chmod($path, $mode); 
    246246                } 
    247247            } else { 
    248                 if (fileowner($path) == fileowner(__FILE__)) { 
     248                if (fileowner($path) == getmyuid()) { 
    249249                    $result = @chmod($path, $mode); 
    250250                }