all functions based on php_stat are now safe mode aware...

This commit is contained in:
Stefan Esser 2002-07-26 08:04:42 +00:00
parent a0aa59e738
commit 02e6cd022a

View 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;
}