]> granicus.if.org Git - php/commitdiff
all functions based on php_stat are now safe mode aware...
authorStefan Esser <sesser@php.net>
Fri, 26 Jul 2002 08:04:42 +0000 (08:04 +0000)
committerStefan Esser <sesser@php.net>
Fri, 26 Jul 2002 08:04:42 +0000 (08:04 +0000)
ext/standard/filestat.c

index 382847344ad7e3f9ec30e95d467505706993027a..2218e59b43981c3caf5e290d70361f8d27ce465a 100644 (file)
@@ -553,6 +553,10 @@ static void php_stat(const char *filename, php_stat_len filename_length, int typ
        char *stat_sb_names[13]={"dev", "ino", "mode", "nlink", "uid", "gid", "rdev",
                              "size", "atime", "mtime", "ctime", "blksize", "blocks"};
 
+       if (PG(safe_mode) &&(!php_checkuid(filename, NULL, CHECKUID_CHECK_FILE_AND_DIR))) {
+               RETURN_FALSE;
+       }
+
        if (php_check_open_basedir(filename TSRMLS_CC)) {
                RETURN_FALSE;
        }