cvs: pecl /rar rar.cpp
| From: | Antony Dovgal | Date: | Thu, 30 Aug 2007 10:35:10 +0000 |
| Subject: | cvs: pecl /rar rar.cpp | ||
| Groups: | php.pecl.cvs | ||
| Request: | Send a blank email to pecl-cvs+get-8490@lists.php.net to get a copy of this message | ||
tony2001 Thu Aug 30 10:35:10 2007 UTC
Modified files:
/pecl/rar rar.cpp
Log:
ifdef safe_mode and fix build with HEAD
http://cvs.php.net/viewvc.cgi/pecl/rar/rar.cpp?r1=1.20&r2=1.21&diff_format=u
Index: pecl/rar/rar.cpp
diff -u pecl/rar/rar.cpp:1.20 pecl/rar/rar.cpp:1.21
--- pecl/rar/rar.cpp:1.20 Tue Aug 14 09:14:22 2007
+++ pecl/rar/rar.cpp Thu Aug 30 10:35:10 2007
@@ -24,7 +24,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: rar.cpp,v 1.20 2007/08/14 09:14:22 tony2001 Exp $ */
+/* $Id: rar.cpp,v 1.21 2007/08/30 10:35:10 tony2001 Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -258,10 +258,11 @@
return;
}
+#if PHP_MAJOR_VERSION < 6
if (PG(safe_mode) && (!php_checkuid(filename, NULL, CHECKUID_CHECK_FILE_AND_DIR))) {
RETURN_FALSE;
}
-
+#endif
if (php_check_open_basedir(filename TSRMLS_CC)) {
RETURN_FALSE;
}
@@ -417,19 +418,22 @@
RAR_GET_PROPERTY(tmp, "rarfile");
ZEND_FETCH_RESOURCE(rar, rar_file_t *, tmp, -1, "Rar file", le_rar_file);
+#if PHP_MAJOR_VERSION < 6
if (path_len && PG(safe_mode) && (!php_checkuid(path, NULL,
CHECKUID_CHECK_FILE_AND_DIR))) {
RETURN_FALSE;
}
-
+#endif
+
if (php_check_open_basedir(path TSRMLS_CC)) {
RETURN_FALSE;
}
if (filename_len) {
+#if PHP_MAJOR_VERSION < 6
if (PG(safe_mode) && (!php_checkuid(filename, NULL, CHECKUID_CHECK_FILE_AND_DIR))) {
RETURN_FALSE;
}
-
+#endif
if (php_check_open_basedir(filename TSRMLS_CC)) {
RETURN_FALSE;
}
@@ -666,7 +670,7 @@
{
php_info_print_table_start();
php_info_print_table_header(2, "Rar support", "enabled");
- php_info_print_table_row(2, "Revision", "$Revision: 1.20 $");
+ php_info_print_table_row(2, "Revision", "$Revision: 1.21 $");
php_info_print_table_end();
}
/* }}} */