summaryrefslogtreecommitdiff
path: root/ext/gd
diff options
context:
space:
mode:
authorKalle Sommer Nielsen <kalle@php.net>2010-04-26 23:53:30 +0000
committerKalle Sommer Nielsen <kalle@php.net>2010-04-26 23:53:30 +0000
commitdd8e59da8f5aafd9d77a0f1f17e5e272d09f643f (patch)
tree6c3e808cb0300c72f869478fbbc9dea69e5cf697 /ext/gd
parent3c78ad763ebb0e09ad5524ba08fa6e83feffe102 (diff)
downloadphp-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/gd')
-rw-r--r--ext/gd/gd.c4
-rw-r--r--ext/gd/php_gd.h10
2 files changed, 6 insertions, 8 deletions
diff --git a/ext/gd/gd.c b/ext/gd/gd.c
index 7b4d780c7b..a4d7cc6ac0 100644
--- a/ext/gd/gd.c
+++ b/ext/gd/gd.c
@@ -1470,7 +1470,7 @@ PHP_FUNCTION(imageloadfont)
return;
}
- stream = php_stream_open_wrapper(file, "rb", ENFORCE_SAFE_MODE | IGNORE_PATH | IGNORE_URL_WIN | REPORT_ERRORS, NULL);
+ stream = php_stream_open_wrapper(file, "rb", IGNORE_PATH | IGNORE_URL_WIN | REPORT_ERRORS, NULL);
if (stream == NULL) {
RETURN_FALSE;
}
@@ -2422,7 +2422,7 @@ static void _php_image_create_from(INTERNAL_FUNCTION_PARAMETERS, int image_type,
}
}
- stream = php_stream_open_wrapper(file, "rb", ENFORCE_SAFE_MODE|REPORT_ERRORS|IGNORE_PATH|IGNORE_URL_WIN, NULL);
+ stream = php_stream_open_wrapper(file, "rb", REPORT_ERRORS|IGNORE_PATH|IGNORE_URL_WIN, NULL);
if (stream == NULL) {
RETURN_FALSE;
}
diff --git a/ext/gd/php_gd.h b/ext/gd/php_gd.h
index 10a18fbf6e..7fbedbe4e0 100644
--- a/ext/gd/php_gd.h
+++ b/ext/gd/php_gd.h
@@ -33,12 +33,10 @@
#if HAVE_LIBGD
/* open_basedir and safe_mode checks */
-#define PHP_GD_CHECK_OPEN_BASEDIR(filename, errormsg) \
- if (!filename || php_check_open_basedir(filename TSRMLS_CC) || \
- (PG(safe_mode) && !php_checkuid(filename, NULL, CHECKUID_CHECK_FILE_AND_DIR)) \
- ) { \
- php_error_docref(NULL TSRMLS_CC, E_WARNING, errormsg); \
- RETURN_FALSE; \
+#define PHP_GD_CHECK_OPEN_BASEDIR(filename, errormsg) \
+ if (!filename || php_check_open_basedir(filename TSRMLS_CC)) { \
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, errormsg); \
+ RETURN_FALSE; \
}
#define PHP_GDIMG_TYPE_GIF 1