diff options
Diffstat (limited to 'ext/standard/filestat.c')
-rw-r--r-- | ext/standard/filestat.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/ext/standard/filestat.c b/ext/standard/filestat.c index 4cc224b81f..e01c814038 100644 --- a/ext/standard/filestat.c +++ b/ext/standard/filestat.c @@ -141,7 +141,9 @@ PHP_FUNCTION(disk_total_space) convert_to_string_ex(path); - if (php_check_open_basedir((*path)->value.str.val)) RETURN_FALSE; + if (php_check_open_basedir((*path)->value.str.val TSRMLS_CC)) { + RETURN_FALSE; + } #ifdef WINDOWS /* GetDiskFreeSpaceEx is only available in NT and Win95 post-OSR2, @@ -242,7 +244,9 @@ PHP_FUNCTION(disk_free_space) convert_to_string_ex(path); - if (php_check_open_basedir((*path)->value.str.val)) RETURN_FALSE; + if (php_check_open_basedir((*path)->value.str.val TSRMLS_CC)) { + RETURN_FALSE; + } #ifdef WINDOWS /* GetDiskFreeSpaceEx is only available in NT and Win95 post-OSR2, @@ -335,8 +339,9 @@ PHP_FUNCTION(chgrp) } /* Check the basedir */ - if (php_check_open_basedir((*filename)->value.str.val)) + if (php_check_open_basedir((*filename)->value.str.val TSRMLS_CC)) { RETURN_FALSE; + } ret = VCWD_CHOWN((*filename)->value.str.val, -1, gid); if (ret == -1) { @@ -382,8 +387,9 @@ PHP_FUNCTION(chown) } /* Check the basedir */ - if (php_check_open_basedir((*filename)->value.str.val)) + if (php_check_open_basedir((*filename)->value.str.val TSRMLS_CC)) { RETURN_FALSE; + } ret = VCWD_CHOWN((*filename)->value.str.val, uid, -1); if (ret == -1) { @@ -414,8 +420,9 @@ PHP_FUNCTION(chmod) } /* Check the basedir */ - if (php_check_open_basedir((*filename)->value.str.val)) + if (php_check_open_basedir((*filename)->value.str.val TSRMLS_CC)) { RETURN_FALSE; + } imode = (mode_t) (*mode)->value.lval; /* in safe mode, do not allow to setuid files. @@ -476,8 +483,10 @@ PHP_FUNCTION(touch) } /* Check the basedir */ - if (php_check_open_basedir((*filename)->value.str.val)) { - if (newtime) efree(newtime); + if (php_check_open_basedir((*filename)->value.str.val TSRMLS_CC)) { + if (newtime) { + efree(newtime); + } RETURN_FALSE; } |