diff options
author | Kalle Sommer Nielsen <kalle@php.net> | 2010-04-26 23:53:30 +0000 |
---|---|---|
committer | Kalle Sommer Nielsen <kalle@php.net> | 2010-04-26 23:53:30 +0000 |
commit | dd8e59da8f5aafd9d77a0f1f17e5e272d09f643f (patch) | |
tree | 6c3e808cb0300c72f869478fbbc9dea69e5cf697 /ext/fileinfo/fileinfo.c | |
parent | 3c78ad763ebb0e09ad5524ba08fa6e83feffe102 (diff) | |
download | php-git-dd8e59da8f5aafd9d77a0f1f17e5e272d09f643f.tar.gz |
Removed safe_mode
* Removed ini options, safe_mode*
* Removed --enable-safe-mode --with-exec-dir configure options on Unix
* Updated extensions, SAPI's and core
* php_get_current_user() is now declared in main.c, thrus no need to include safe_mode.h anymore
Diffstat (limited to 'ext/fileinfo/fileinfo.c')
-rw-r--r-- | ext/fileinfo/fileinfo.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ext/fileinfo/fileinfo.c b/ext/fileinfo/fileinfo.c index e0e9868897..75862e7e52 100644 --- a/ext/fileinfo/fileinfo.c +++ b/ext/fileinfo/fileinfo.c @@ -297,7 +297,11 @@ PHP_FUNCTION(finfo_open) } file = resolved_path; +#if PHP_API_VERSION < 20100412 if ((PG(safe_mode) && (!php_checkuid(file, NULL, CHECKUID_CHECK_FILE_AND_DIR))) || php_check_open_basedir(file TSRMLS_CC)) { +#else + if (php_check_open_basedir(file TSRMLS_CC)) { +#endif RETURN_FALSE; } } @@ -492,8 +496,11 @@ static void _php_finfo_get_type(INTERNAL_FUNCTION_PARAMETERS, int mode, int mime if (wrap) { php_stream_context *context = php_stream_context_from_zval(zcontext, 0); - +#if PHP_API_VERSION < 20100412 php_stream *stream = php_stream_open_wrapper_ex(buffer, "rb", ENFORCE_SAFE_MODE | REPORT_ERRORS, NULL, context); +#else + php_stream *stream = php_stream_open_wrapper_ex(buffer, "rb", REPORT_ERRORS, NULL, context); +#endif if (!stream) { RETVAL_FALSE; |