andi Sun Feb 19 03:07:39 2006 UTC
Modified files:
/php-src/ext/curl interface.c
/php-src/ext/openssl openssl.c
/php-src/ext/standard file.c ftok.c iptc.c
Log:
- More safe_mode nuking
http://cvs.php.net/viewcvs.cgi/php-src/ext/curl/interface.c?r1=1.75&r2=1.76&diff_format=u
Index: php-src/ext/curl/interface.c
diff -u php-src/ext/curl/interface.c:1.75 php-src/ext/curl/interface.c:1.76
--- php-src/ext/curl/interface.c:1.75 Sun Feb 19 00:55:19 2006
+++ php-src/ext/curl/interface.c Sun Feb 19 03:07:38 2006
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: interface.c,v 1.75 2006/02/19 00:55:19 andi Exp $ */
+/* $Id: interface.c,v 1.76 2006/02/19 03:07:38 andi Exp $ */
#define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
@@ -1281,7 +1281,7 @@
* use since curl needs a long not an
int. */
if (*postval == '@') {
++postval;
- /* safe_mode / open_basedir
check */
+ /* open_basedir check */
if
(php_check_open_basedir(postval TSRMLS_CC)) {
RETURN_FALSE;
}
http://cvs.php.net/viewcvs.cgi/php-src/ext/openssl/openssl.c?r1=1.103&r2=1.104&diff_format=u
Index: php-src/ext/openssl/openssl.c
diff -u php-src/ext/openssl/openssl.c:1.103 php-src/ext/openssl/openssl.c:1.104
--- php-src/ext/openssl/openssl.c:1.103 Sun Feb 19 00:55:20 2006
+++ php-src/ext/openssl/openssl.c Sun Feb 19 03:07:38 2006
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: openssl.c,v 1.103 2006/02/19 00:55:20 andi Exp $ */
+/* $Id: openssl.c,v 1.104 2006/02/19 03:07:38 andi Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -179,17 +179,6 @@
}
/* }}} */
-/* {{{ openssl open_basedir checks */
-inline static int php_openssl_safe_mode_chk(char *filename TSRMLS_DC)
-{
- if (php_check_open_basedir(filename TSRMLS_CC)) {
- return -1;
- }
-
- return 0;
-}
-/* }}} */
-
/* {{{ openssl -> PHP "bridging" */
/* true global; readonly after module startup */
static char default_ssl_conf_filename[MAXPATHLEN];
@@ -439,7 +428,7 @@
/* read in the oids */
str = CONF_get_string(req->req_config, NULL, "oid_file");
- if (str && !php_openssl_safe_mode_chk(str TSRMLS_CC)) {
+ if (str && !php_check_open_basedir(str TSRMLS_CC)) {
BIO *oid_bio = BIO_new_file(str, "r");
if (oid_bio) {
OBJ_create_objects(oid_bio);
@@ -748,7 +737,7 @@
/* read cert from the named file */
BIO *in;
- if (php_openssl_safe_mode_chk(Z_STRVAL_PP(val) +
(sizeof("file://") - 1) TSRMLS_CC)) {
+ if (php_check_open_basedir(Z_STRVAL_PP(val) +
(sizeof("file://") - 1) TSRMLS_CC)) {
return NULL;
}
@@ -800,7 +789,7 @@
return;
}
- if (php_openssl_safe_mode_chk(filename TSRMLS_CC)) {
+ if (php_check_open_basedir(filename TSRMLS_CC)) {
return;
}
@@ -1000,7 +989,7 @@
goto end;
}
- if (php_openssl_safe_mode_chk(certfile TSRMLS_CC)) {
+ if (php_check_open_basedir(certfile TSRMLS_CC)) {
goto end;
}
@@ -1400,7 +1389,7 @@
filename = Z_STRVAL_PP(val) + (sizeof("file://") - 1);
}
if (filename) {
- if (php_openssl_safe_mode_chk(filename TSRMLS_CC)) {
+ if (php_check_open_basedir(filename TSRMLS_CC)) {
return NULL;
}
in = BIO_new_file(filename, "r");
@@ -1436,7 +1425,7 @@
return;
}
- if (php_openssl_safe_mode_chk(filename TSRMLS_CC)) {
+ if (php_check_open_basedir(filename TSRMLS_CC)) {
return;
}
@@ -1833,7 +1822,7 @@
BIO *in;
if (filename) {
- if (php_openssl_safe_mode_chk(filename
TSRMLS_CC)) {
+ if (php_check_open_basedir(filename TSRMLS_CC))
{
return NULL;
}
in = BIO_new_file(filename, "r");
@@ -2002,7 +1991,7 @@
RETURN_FALSE;
}
- if (php_openssl_safe_mode_chk(filename TSRMLS_CC)) {
+ if (php_check_open_basedir(filename TSRMLS_CC)) {
RETURN_FALSE;
}
@@ -2188,7 +2177,7 @@
if (!store) {
goto clean_exit;
}
- if (php_openssl_safe_mode_chk(filename TSRMLS_CC)) {
+ if (php_check_open_basedir(filename TSRMLS_CC)) {
goto clean_exit;
}
@@ -2206,7 +2195,7 @@
if (datafilename) {
- if (php_openssl_safe_mode_chk(datafilename TSRMLS_CC)) {
+ if (php_check_open_basedir(datafilename TSRMLS_CC)) {
goto clean_exit;
}
@@ -2226,7 +2215,7 @@
if (signersfilename) {
BIO *certout;
- if (php_openssl_safe_mode_chk(signersfilename
TSRMLS_CC)) {
+ if (php_check_open_basedir(signersfilename TSRMLS_CC)) {
goto clean_exit;
}
@@ -2286,7 +2275,7 @@
return;
- if (php_openssl_safe_mode_chk(infilename TSRMLS_CC) ||
php_openssl_safe_mode_chk(outfilename TSRMLS_CC)) {
+ if (php_check_open_basedir(infilename TSRMLS_CC) ||
php_check_open_basedir(outfilename TSRMLS_CC)) {
return;
}
@@ -2463,7 +2452,7 @@
goto clean_exit;
}
- if (php_openssl_safe_mode_chk(infilename TSRMLS_CC) ||
php_openssl_safe_mode_chk(outfilename TSRMLS_CC)) {
+ if (php_check_open_basedir(infilename TSRMLS_CC) ||
php_check_open_basedir(outfilename TSRMLS_CC)) {
goto clean_exit;
}
@@ -2557,7 +2546,7 @@
goto clean_exit;
}
- if (php_openssl_safe_mode_chk(infilename TSRMLS_CC) ||
php_openssl_safe_mode_chk(outfilename TSRMLS_CC)) {
+ if (php_check_open_basedir(infilename TSRMLS_CC) ||
php_check_open_basedir(outfilename TSRMLS_CC)) {
goto clean_exit;
}
http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/file.c?r1=1.417&r2=1.418&diff_format=u
Index: php-src/ext/standard/file.c
diff -u php-src/ext/standard/file.c:1.417 php-src/ext/standard/file.c:1.418
--- php-src/ext/standard/file.c:1.417 Sun Feb 19 00:55:20 2006
+++ php-src/ext/standard/file.c Sun Feb 19 03:07:39 2006
@@ -21,7 +21,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: file.c,v 1.417 2006/02/19 00:55:20 andi Exp $ */
+/* $Id: file.c,v 1.418 2006/02/19 03:07:39 andi Exp $ */
/* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
@@ -1742,10 +1742,6 @@
convert_to_string_ex(source);
convert_to_string_ex(target);
- if (PG(safe_mode) &&(!php_checkuid(Z_STRVAL_PP(source), NULL,
CHECKUID_CHECK_FILE_AND_DIR))) {
- RETURN_FALSE;
- }
-
if (php_check_open_basedir(Z_STRVAL_PP(source) TSRMLS_CC)) {
RETURN_FALSE;
}
http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/ftok.c?r1=1.17&r2=1.18&diff_format=u
Index: php-src/ext/standard/ftok.c
diff -u php-src/ext/standard/ftok.c:1.17 php-src/ext/standard/ftok.c:1.18
--- php-src/ext/standard/ftok.c:1.17 Sun Jan 1 13:09:55 2006
+++ php-src/ext/standard/ftok.c Sun Feb 19 03:07:39 2006
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: ftok.c,v 1.17 2006/01/01 13:09:55 sniper Exp $ */
+/* $Id: ftok.c,v 1.18 2006/02/19 03:07:39 andi Exp $ */
#include "php.h"
@@ -51,10 +51,6 @@
RETURN_LONG(-1);
}
- if ((PG(safe_mode) && (!php_checkuid(Z_STRVAL_PP(pathname), NULL,
CHECKUID_CHECK_FILE_AND_DIR))) || php_check_open_basedir(Z_STRVAL_PP(pathname)
TSRMLS_CC)) {
- RETURN_LONG(-1);
- }
-
k = ftok(Z_STRVAL_PP(pathname),Z_STRVAL_PP(proj)[0]);
if (k == -1) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "ftok() failed -
%s", strerror(errno));
http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/iptc.c?r1=1.52&r2=1.53&diff_format=u
Index: php-src/ext/standard/iptc.c
diff -u php-src/ext/standard/iptc.c:1.52 php-src/ext/standard/iptc.c:1.53
--- php-src/ext/standard/iptc.c:1.52 Sun Jan 1 13:09:55 2006
+++ php-src/ext/standard/iptc.c Sun Feb 19 03:07:39 2006
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: iptc.c,v 1.52 2006/01/01 13:09:55 sniper Exp $ */
+/* $Id: iptc.c,v 1.53 2006/02/19 03:07:39 andi Exp $ */
/*
* Functions to parse & compse IPTC data.
@@ -208,10 +208,6 @@
break;
}
- if (PG(safe_mode) && (!php_checkuid(Z_STRVAL_PP(jpeg_file), NULL,
CHECKUID_CHECK_FILE_AND_DIR))) {
- RETURN_FALSE;
- }
-
if (php_check_open_basedir(Z_STRVAL_PP(jpeg_file) TSRMLS_CC)) {
RETURN_FALSE;
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php