[Pkg-php-commits] [php/debian-sid] updated patches for 5.3.0 -- note that suhosin is not official

Mark A. Hershberger (none) mah at debian.
Sun Feb 7 23:17:38 UTC 2010


---
 debian/patches/006-debian_quirks.patch         |  106 ++++-------------------
 debian/patches/047-zts_with_dl.patch           |   18 ++--
 debian/patches/052-phpinfo_no_configure.patch  |   32 ++++---
 debian/patches/056-mime_magic_liberal.patch    |   36 --------
 debian/patches/107-reflection_is_ext.patch     |   11 ---
 debian/patches/113-php.ini_securitynotes.patch |   21 ++---
 debian/patches/disable_dl_by_default.patch     |   25 ------
 debian/patches/fix_broken_upstream_tests.patch |   19 ----
 debian/patches/force_libmysqlclient_r.patch    |   32 ++++----
 debian/patches/series                          |    3 -
 debian/patches/suhosin.patch                   |  111 ++++++++++++------------
 11 files changed, 125 insertions(+), 289 deletions(-)
 delete mode 100644 debian/patches/056-mime_magic_liberal.patch
 delete mode 100644 debian/patches/107-reflection_is_ext.patch
 delete mode 100644 debian/patches/disable_dl_by_default.patch

diff --git a/debian/patches/006-debian_quirks.patch b/debian/patches/006-debian_quirks.patch
index bc12e67..8f27b77 100644
--- a/debian/patches/006-debian_quirks.patch
+++ b/debian/patches/006-debian_quirks.patch
@@ -53,8 +53,8 @@
  fi
  
  ## convert skel_dir to full path
---- php5-5.2.9.dfsg.1.orig/php.ini-dist
-+++ php5-5.2.9.dfsg.1/php.ini-dist
+--- php5-5.2.9.dfsg.1.orig/php.ini-development
++++ php5-5.2.9.dfsg.1/php.ini-development
 @@ -471,7 +471,7 @@ default_mimetype = "text/html"
  ;;;;;;;;;;;;;;;;;;;;;;;;;
  
@@ -64,76 +64,8 @@
  ;
  ; Windows: "\path1;\path2"
  ;include_path = ".;c:\php\includes"
-@@ -488,7 +488,7 @@ doc_root =
- user_dir =
- 
- ; Directory in which the loadable extensions (modules) reside.
--extension_dir = "./"
-+; extension_dir = "./"
- 
- ; Whether or not to enable the dl() function.  The dl() function does NOT work
- ; properly in multithreaded servers, such as IIS or Zeus, and is automatically
-@@ -601,58 +601,6 @@ default_socket_timeout = 60
- ; extension_dir directive above.
- 
- 
--; Windows Extensions
--; Note that ODBC support is built in, so no dll is needed for it.
--; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5)
--; extension folders as well as the separate PECL DLL download (PHP 5).
--; Be sure to appropriately set the extension_dir directive.
--
--;extension=php_bz2.dll
--;extension=php_curl.dll
--;extension=php_dba.dll
--;extension=php_dbase.dll
--;extension=php_exif.dll
--;extension=php_fdf.dll
--;extension=php_gd2.dll
--;extension=php_gettext.dll
--;extension=php_gmp.dll
--;extension=php_ifx.dll
--;extension=php_imap.dll
--;extension=php_interbase.dll
--;extension=php_ldap.dll
--;extension=php_mbstring.dll
--;extension=php_mcrypt.dll
--;extension=php_mhash.dll
--;extension=php_mime_magic.dll
--;extension=php_ming.dll
--;extension=php_msql.dll
--;extension=php_mssql.dll
--;extension=php_mysql.dll
--;extension=php_mysqli.dll
--;extension=php_oci8.dll
--;extension=php_openssl.dll
--;extension=php_pdo.dll
--;extension=php_pdo_firebird.dll
--;extension=php_pdo_mssql.dll
--;extension=php_pdo_mysql.dll
--;extension=php_pdo_oci.dll
--;extension=php_pdo_oci8.dll
--;extension=php_pdo_odbc.dll
--;extension=php_pdo_pgsql.dll
--;extension=php_pdo_sqlite.dll
--;extension=php_pgsql.dll
--;extension=php_pspell.dll
--;extension=php_shmop.dll
--;extension=php_snmp.dll
--;extension=php_soap.dll
--;extension=php_sockets.dll
--;extension=php_sqlite.dll
--;extension=php_sybase_ct.dll
--;extension=php_tidy.dll
--;extension=php_xmlrpc.dll
--;extension=php_xsl.dll
--;extension=php_zip.dll
--
- ;;;;;;;;;;;;;;;;;;;
- ; Module Settings ;
- ;;;;;;;;;;;;;;;;;;;
---- php5-5.2.9.dfsg.1.orig/php.ini-recommended
-+++ php5-5.2.9.dfsg.1/php.ini-recommended
+--- php5-5.2.9.dfsg.1.orig/php.ini-production
++++ php5-5.2.9.dfsg.1/php.ini-production
 @@ -522,7 +522,7 @@ default_mimetype = "text/html"
  ;;;;;;;;;;;;;;;;;;;;;;;;;
  
@@ -143,35 +75,28 @@
  ;
  ; Windows: "\path1;\path2"
  ;include_path = ".;c:\php\includes"
-@@ -539,7 +539,7 @@ doc_root =
- user_dir =
- 
- ; Directory in which the loadable extensions (modules) reside.
--extension_dir = "./"
-+;extension_dir = "./"
- 
- ; Whether or not to enable the dl() function.  The dl() function does NOT work
- ; properly in multithreaded servers, such as IIS or Zeus, and is automatically
-@@ -652,58 +652,6 @@ default_socket_timeout = 60
- ; extension_dir directive above.
- 
- 
+@@ -931,61 +931,6 @@ default_socket_timeout = 60
+ ; If you only provide the name of the extension, PHP will look for it in its
+ ; default extension directory.
+ ;
 -; Windows Extensions
 -; Note that ODBC support is built in, so no dll is needed for it.
 -; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5)
 -; extension folders as well as the separate PECL DLL download (PHP 5).
 -; Be sure to appropriately set the extension_dir directive.
--
+-; 
 -;extension=php_bz2.dll
 -;extension=php_curl.dll
 -;extension=php_dba.dll
 -;extension=php_dbase.dll
 -;extension=php_exif.dll
+-;extension=php_fileinfo.dll
 -;extension=php_fdf.dll
 -;extension=php_gd2.dll
 -;extension=php_gettext.dll
 -;extension=php_gmp.dll
 -;extension=php_ifx.dll
+-;extension=php_intl.dll
 -;extension=php_imap.dll
 -;extension=php_interbase.dll
 -;extension=php_ldap.dll
@@ -184,33 +109,34 @@
 -;extension=php_mssql.dll
 -;extension=php_mysql.dll
 -;extension=php_mysqli.dll
--;extension=php_oci8.dll
+-;extension=php_oci8.dll      ; Use with Oracle 10gR2 Instant Client
+-;extension=php_oci8_11g.dll  ; Use with Oracle 11g Instant Client
 -;extension=php_openssl.dll
 -;extension=php_pdo.dll
 -;extension=php_pdo_firebird.dll
 -;extension=php_pdo_mssql.dll
 -;extension=php_pdo_mysql.dll
 -;extension=php_pdo_oci.dll
--;extension=php_pdo_oci8.dll
 -;extension=php_pdo_odbc.dll
 -;extension=php_pdo_pgsql.dll
 -;extension=php_pdo_sqlite.dll
 -;extension=php_pgsql.dll
+-;extension=php_phar.dll
 -;extension=php_pspell.dll
 -;extension=php_shmop.dll
 -;extension=php_snmp.dll
 -;extension=php_soap.dll
 -;extension=php_sockets.dll
 -;extension=php_sqlite.dll
+-;extension=php_sqlite3.dll
 -;extension=php_sybase_ct.dll
 -;extension=php_tidy.dll
 -;extension=php_xmlrpc.dll
 -;extension=php_xsl.dll
 -;extension=php_zip.dll
--
+ 
  ;;;;;;;;;;;;;;;;;;;
  ; Module Settings ;
- ;;;;;;;;;;;;;;;;;;;
 --- php5-5.2.9.dfsg.1.orig/sapi/caudium/config.m4
 +++ php5-5.2.9.dfsg.1/sapi/caudium/config.m4
 @@ -26,8 +26,8 @@ if test "$PHP_CAUDIUM" != "no"; then
diff --git a/debian/patches/047-zts_with_dl.patch b/debian/patches/047-zts_with_dl.patch
index e2c3c3a..7717039 100644
--- a/debian/patches/047-zts_with_dl.patch
+++ b/debian/patches/047-zts_with_dl.patch
@@ -1,15 +1,15 @@
---- php5-5.2.9.dfsg.1.orig/ext/standard/dl.c
-+++ php5-5.2.9.dfsg.1/ext/standard/dl.c
-@@ -81,12 +81,7 @@ PHP_FUNCTION(dl)
- 	if ((strncmp(sapi_module.name, "cgi", 3)!=0) && 
- 		(strcmp(sapi_module.name, "cli")!=0) &&
- 		(strncmp(sapi_module.name, "embed", 5)!=0)) {
+--- a/ext/standard/dl.c
++++ b/ext/standard/dl.c
+@@ -77,12 +77,7 @@ PHPAPI PHP_FUNCTION(dl)
+ 		(strcmp(sapi_module.name, "cli") != 0) &&
+ 		(strncmp(sapi_module.name, "embed", 5) != 0)
+ 	) {
 -#ifdef ZTS
--		php_error_docref(NULL TSRMLS_CC, E_WARNING, "Not supported in multithreaded Web servers - use extension=%s in your php.ini", Z_STRVAL_PP(file));
+-		php_error_docref(NULL TSRMLS_CC, E_WARNING, "Not supported in multithreaded Web servers - use extension=%s in your php.ini", filename);
 -		RETURN_FALSE;
 -#else
- 		php_error_docref(NULL TSRMLS_CC, E_STRICT, "dl() is deprecated - use extension=%s in your php.ini", Z_STRVAL_PP(file));
+ 		php_error_docref(NULL TSRMLS_CC, E_DEPRECATED, "dl() is deprecated - use extension=%s in your php.ini", filename);
 -#endif
  	}
  
- 	php_dl(*file, MODULE_TEMPORARY, return_value, 0 TSRMLS_CC);
+ 	php_dl(filename, MODULE_TEMPORARY, return_value, 0 TSRMLS_CC);
diff --git a/debian/patches/052-phpinfo_no_configure.patch b/debian/patches/052-phpinfo_no_configure.patch
index a865fda..35d3b9b 100644
--- a/debian/patches/052-phpinfo_no_configure.patch
+++ b/debian/patches/052-phpinfo_no_configure.patch
@@ -1,21 +1,25 @@
---- php5-5.2.9.dfsg.1.orig/ext/standard/info.c
-+++ php5-5.2.9.dfsg.1/ext/standard/info.c
-@@ -487,7 +487,7 @@ PHPAPI void php_print_info(int flag TSRM
- 		php_info_print_table_start();
- 		php_info_print_table_row(2, "System", php_uname );
- 		php_info_print_table_row(2, "Build Date", __DATE__ " " __TIME__ );
--#ifdef CONFIGURE_COMMAND
-+#if 0
+Index: php5/ext/standard/info.c
+===================================================================
+--- php5.orig/ext/standard/info.c	2009-03-25 22:14:29.000000000 -0400
++++ php5/ext/standard/info.c	2009-03-25 22:18:15.000000000 -0400
+@@ -668,7 +668,7 @@
+ #ifdef ARCHITECTURE
+ 		php_info_print_table_row(2, "Architecture", ARCHITECTURE);
+ #endif
+-#ifdef 0
++#ifdef CONFIGURE_COMMAND
  		php_info_print_table_row(2, "Configure Command", CONFIGURE_COMMAND );
  #endif
- 		if (sapi_module.pretty_name) {
---- php5-5.2.9.dfsg.1.orig/ext/standard/tests/general_functions/phpinfo.phpt
-+++ php5-5.2.9.dfsg.1/ext/standard/tests/general_functions/phpinfo.phpt
-@@ -20,7 +20,6 @@ PHP Version => %s
+ 
+Index: php5/ext/standard/tests/general_functions/phpinfo.phpt
+===================================================================
+--- php5.orig/ext/standard/tests/general_functions/phpinfo.phpt	2009-03-25 22:15:07.000000000 -0400
++++ php5/ext/standard/tests/general_functions/phpinfo.phpt	2009-03-25 22:17:58.000000000 -0400
+@@ -20,6 +20,7 @@
  
  System => %s
- Build Date => %s
--Configure Command => %s
+ Build Date => %s%a
++Configure Command => %s
  Server API => Command Line Interface
  Virtual Directory Support => %s
  Configuration File (php.ini) Path => %s
diff --git a/debian/patches/056-mime_magic_liberal.patch b/debian/patches/056-mime_magic_liberal.patch
deleted file mode 100644
index 3e63f36..0000000
--- a/debian/patches/056-mime_magic_liberal.patch
+++ /dev/null
@@ -1,36 +0,0 @@
---- php5-5.2.9.dfsg.1.orig/ext/mime_magic/mime_magic.c
-+++ php5-5.2.9.dfsg.1/ext/mime_magic/mime_magic.c
-@@ -501,7 +501,7 @@ static int is_valid_mimetype(char *p, in
- 		} while (*(++p) != '/');
- 		++p;
- 		do {
--			if (!isalnum(*p) && (*p != '-') && (*p != '.') && !isspace(*p)) {
-+			if (!isalnum(*p) && (*p != '-') && (*p != '.') && (*p != '+') && !isspace(*p)) {
- 				return 0;
- 			}
- 		} while (*(++p));
-@@ -634,6 +634,15 @@ static int parse(char *l, int lineno)
-     else if (strncmp(l, "string", NSTRING) == 0) {
- 		m->type = STRING;
- 		l += NSTRING;
-+		if (*l == '/') {
-+			++l;
-+			if ((*l == 'B') || (*l == 'b') || (*l == 'c')) {
-+				++l;
-+				if ((*l == 'B') || (*l == 'b') || (*l == 'c')) {
-+					++l;
-+				}
-+			}
-+		}
-     }
-     else if (strncmp(l, "date", NDATE) == 0) {
- 		m->type = DATE;
-@@ -727,7 +736,7 @@ static int parse(char *l, int lineno)
- 	if (!is_valid_mimetype(l, strlen(l))) {
- 		if(MIME_MAGIC_G(debug))
- 			php_error_docref("http://www.php.net/mime_magic" TSRMLS_CC, E_WARNING, ": (%s:%d) '%s' is not a valid mimetype, entry skipped", MIME_MAGIC_G(magicfile), lineno, l);
--		return -1;
-+		return 0;
- 	}
- 	
- 	strlcpy(m->desc, l, sizeof(m->desc));
diff --git a/debian/patches/107-reflection_is_ext.patch b/debian/patches/107-reflection_is_ext.patch
deleted file mode 100644
index f62873c..0000000
--- a/debian/patches/107-reflection_is_ext.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- php5-5.2.9.dfsg.1.orig/ext/reflection/config.m4
-+++ php5-5.2.9.dfsg.1/ext/reflection/config.m4
-@@ -2,7 +2,7 @@ dnl $Id: config.m4,v 1.4.2.3.2.1 2006/08
- dnl config.m4 for extension reflection
- 
- PHP_ARG_ENABLE(reflection, whether to enable reflection support,
--[  --disable-reflection    Disable reflection support], yes, no)
-+[  --disable-reflection    Disable reflection support], yes)
- 
- if test "$PHP_REFLECTION" != "no"; then
-   AC_DEFINE(HAVE_REFLECTION, 1, [Whether Reflection is enabled])
diff --git a/debian/patches/113-php.ini_securitynotes.patch b/debian/patches/113-php.ini_securitynotes.patch
index 5d6d5df..19746f2 100644
--- a/debian/patches/113-php.ini_securitynotes.patch
+++ b/debian/patches/113-php.ini_securitynotes.patch
@@ -1,9 +1,9 @@
---- php5-5.2.9.dfsg.1.orig/php.ini-dist
-+++ php5-5.2.9.dfsg.1/php.ini-dist
-@@ -166,6 +166,11 @@ allow_call_time_pass_reference = On
- ;
+--- a/php.ini-development
++++ b/php.ini-development
+@@ -333,6 +333,11 @@ allow_call_time_pass_reference = Off
+ 
  ; Safe Mode
- ;
+ ; http://www.php.net/manual/en/ini.sect.safe-mode.php#ini.safe-mode
 +; NOTE: this is considered a "broken" security measure.
 +;       Applications relying on this feature will not recieve full
 +;       support by the security team.  For more information please
@@ -12,24 +12,23 @@
  safe_mode = Off
  
  ; By default, Safe Mode does a UID compare check when
-@@ -202,6 +207,13 @@ safe_mode_protected_env_vars = LD_LIBRAR
- ; and below.  This directive makes most sense if used in a per-directory
+@@ -374,6 +379,12 @@ safe_mode_protected_env_vars = LD_LIBRARY_PATH
  ; or per-virtualhost web server configuration file. This directive is
  ; *NOT* affected by whether Safe Mode is turned On or Off.
+ ; http://www.php.net/manual/en/ini.sect.safe-mode.php#ini.open-basedir
 +
 +; NOTE: this is considered a "broken" security measure.
 +;       Applications relying on this feature will not recieve full
 +;       support by the security team.  For more information please
 +;       see /usr/share/doc/php5-common/README.Debian.security
 +;
-+
  ;open_basedir =
  
  ; This directive allows you to disable certain functions for security reasons.
-@@ -416,6 +428,11 @@ variables_order = "EGPCS"
- ; You should do your best to write your scripts so that they do not require
+@@ -687,6 +698,11 @@ request_order = "GP"
  ; register_globals to be on;  Using form variables as globals can easily lead
  ; to possible security problems, if the code is not very well thought of.
+ ; http://www.php.net/manual/en/ini.core.php#ini.register-globals
 +
 +; NOTE: applications relying on this feature will not recieve full
 +;       support by the security team.  For more information please
@@ -37,4 +36,4 @@
 +;
  register_globals = Off
  
- ; Whether or not to register the old-style input arrays, HTTP_GET_VARS
+ ; Determines whether the deprecated long $HTTP_*_VARS type predefined variables
diff --git a/debian/patches/disable_dl_by_default.patch b/debian/patches/disable_dl_by_default.patch
deleted file mode 100644
index 6fc0cb6..0000000
--- a/debian/patches/disable_dl_by_default.patch
+++ /dev/null
@@ -1,25 +0,0 @@
---- php5-5.2.9.dfsg.1.orig/php.ini-dist
-+++ php5-5.2.9.dfsg.1/php.ini-dist
-@@ -510,7 +510,8 @@ user_dir =
- ; Whether or not to enable the dl() function.  The dl() function does NOT work
- ; properly in multithreaded servers, such as IIS or Zeus, and is automatically
- ; disabled on them.
--enable_dl = On
-+; NOTE: this is a potential security hole and is disabled by default in debian
-+enable_dl = Off
- 
- ; cgi.force_redirect is necessary to provide security running PHP as a CGI under
- ; most web servers.  Left undefined, PHP turns this on by default.  You can
---- php5-5.2.9.dfsg.1.orig/php.ini-recommended
-+++ php5-5.2.9.dfsg.1/php.ini-recommended
-@@ -544,7 +544,9 @@ user_dir =
- ; Whether or not to enable the dl() function.  The dl() function does NOT work
- ; properly in multithreaded servers, such as IIS or Zeus, and is automatically
- ; disabled on them.
--enable_dl = On
-+; NOTE: this is a potential security hole and is disabled by default in debian
-+enable_dl = Off
-+
- 
- ; cgi.force_redirect is necessary to provide security running PHP as a CGI under
- ; most web servers.  Left undefined, PHP turns this on by default.  You can
diff --git a/debian/patches/fix_broken_upstream_tests.patch b/debian/patches/fix_broken_upstream_tests.patch
index ea4a204..ef81f47 100644
--- a/debian/patches/fix_broken_upstream_tests.patch
+++ b/debian/patches/fix_broken_upstream_tests.patch
@@ -21,22 +21,3 @@
  --FILE--
  <?php
  var_dump(phpinfo());
-@@ -24,6 +26,7 @@ Server API => Command Line Interface
- Virtual Directory Support => %s
- Configuration File (php.ini) Path => %s
- Loaded Configuration File => %a
-+Scan this dir for additional .ini files => %s
- PHP API => %d
- PHP Extension => %d
- Zend Extension => %d
---- php5-5.2.9.dfsg.1.orig/ext/standard/tests/strings/moneyformat.phpt
-+++ php5-5.2.9.dfsg.1/ext/standard/tests/strings/moneyformat.phpt
-@@ -5,6 +5,8 @@ money_format test
- 	if (!function_exists('money_format') || !function_exists('setlocale')) {
- 		die("SKIP money_format - not supported\n");
- 	}
-+	if (!setlocale(LC_MONETARY, 'en_US'))
-+		die("SKIP money_format - en_US locale not available\n");
- ?>
- --FILE--
- <?php
diff --git a/debian/patches/force_libmysqlclient_r.patch b/debian/patches/force_libmysqlclient_r.patch
index a697f37..6029cb3 100644
--- a/debian/patches/force_libmysqlclient_r.patch
+++ b/debian/patches/force_libmysqlclient_r.patch
@@ -9,25 +9,25 @@
      MYSQL_LIBNAME=mysqlclient_r
    else
      MYSQL_LIBNAME=mysqlclient
---- php5-5.2.9.dfsg.1.orig/ext/mysqli/config.m4
-+++ php5-5.2.9.dfsg.1/ext/mysqli/config.m4
-@@ -26,7 +26,7 @@ dnl  fi
-   if test "$PHP_EMBEDDED_MYSQLI" = "yes"; then
-     AC_DEFINE(HAVE_EMBEDDED_MYSQLI, 1, [embedded MySQL support enabled])
+--- a/ext/mysqli/config.m4
++++ b/ext/mysqli/config.m4
+@@ -29,7 +29,7 @@ elif test "$PHP_MYSQLI" != "no"; then
      MYSQL_LIB_CFG='--libmysqld-libs'
+     dnl mysqlnd doesn't support embedded, so we have to add some extra stuff
+     mysqli_extra_sources="mysqli_embedded.c"
 -  elif test "$enable_maintainer_zts" = "yes"; then
 +  elif true || test "$enable_maintainer_zts" = "yes"; then
      MYSQL_LIB_CFG='--libs_r'
      MYSQL_LIB_NAME='mysqlclient_r'
    else
---- php5-5.2.9.dfsg.1.orig/ext/pdo_mysql/config.m4
-+++ php5-5.2.9.dfsg.1/ext/pdo_mysql/config.m4
-@@ -58,7 +58,7 @@ if test "$PHP_PDO_MYSQL" != "no"; then
-     if test "x$SED" = "x"; then
-       AC_PATH_PROG(SED, sed)
-     fi
--    if test "$enable_maintainer_zts" = "yes"; then
-+    if true || test "$enable_maintainer_zts" = "yes"; then
-       PDO_MYSQL_LIBNAME=mysqlclient_r
-       PDO_MYSQL_LIBS=`$PDO_MYSQL_CONFIG --libs_r | $SED -e "s/'//g"`
-     else
+--- a/ext/pdo_mysql/config.m4
++++ b/ext/pdo_mysql/config.m4
+@@ -68,7 +68,7 @@ if test "$PHP_PDO_MYSQL" != "no"; then
+         AC_PATH_PROG(SED, sed)
+       fi
+ 
+-      if test "$enable_maintainer_zts" = "yes"; then
++      if true || test "$enable_maintainer_zts" = "yes"; then
+         PDO_MYSQL_LIBNAME=mysqlclient_r
+         PDO_MYSQL_LIBS=`$PDO_MYSQL_CONFIG --libs_r | $SED -e "s/'//g"`
+       else
diff --git a/debian/patches/series b/debian/patches/series
index 22aa4db..89826e0 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -15,15 +15,12 @@
 047-zts_with_dl.patch
 052-phpinfo_no_configure.patch
 053-extension_api.patch
-056-mime_magic_liberal.patch
 057-no_apache_installed.patch
 100-recode_is_shared.patch
 101-sqlite_is_shared.patch
-107-reflection_is_ext.patch
 108-64_bit_datetime.patch
 112-proc_open.patch
 113-php.ini_securitynotes.patch
-disable_dl_by_default.patch
 libdb_is_-ldb
 suhosin.patch
 fix_broken_upstream_tests.patch
diff --git a/debian/patches/suhosin.patch b/debian/patches/suhosin.patch
index a4e5d45..c56d8ee 100644
--- a/debian/patches/suhosin.patch
+++ b/debian/patches/suhosin.patch
@@ -241,33 +241,33 @@
  CWD_API void virtual_cwd_startup(void);
  CWD_API void virtual_cwd_shutdown(void);
  CWD_API char *virtual_getcwd_ex(size_t *length TSRMLS_DC);
---- php5-5.2.9.dfsg.1.orig/Zend/Makefile.am
-+++ php5-5.2.9.dfsg.1/Zend/Makefile.am
-@@ -17,7 +17,7 @@ libZend_la_SOURCES=\
+--- a/Zend/Makefile.am
++++ b/Zend/Makefile.am
+@@ -16,8 +16,8 @@ libZend_la_SOURCES=\
+ 	zend_ini.c zend_qsort.c zend_objects.c zend_object_handlers.c \
  	zend_objects_API.c zend_ts_hash.c zend_stream.c \
  	zend_default_classes.c \
- 	zend_iterators.c zend_interfaces.c zend_exceptions.c \
--	zend_strtod.c zend_multibyte.c
-+	zend_strtod.c zend_multibyte.c zend_canary.c
+	zend_iterators.c zend_interfaces.c zend_exceptions.c \
+-	zend_strtod.c zend_closures.c zend_float.c
++	zend_strtod.c zend_closures.c zend_float.c zend_canary.c
  
  libZend_la_LDFLAGS =
  libZend_la_LIBADD = @ZEND_EXTRA_LIBS@
---- php5-5.2.9.dfsg.1.orig/Zend/zend.c
-+++ php5-5.2.9.dfsg.1/Zend/zend.c
-@@ -57,7 +57,9 @@ ZEND_API void (*zend_ticks_function)(int
- ZEND_API void (*zend_error_cb)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args);
- int (*zend_vspprintf)(char **pbuf, size_t max_len, const char *format, va_list ap);
+--- a/Zend/zend.c
++++ b/Zend/zend.c
+@@ -60,6 +60,9 @@ int (*zend_vspprintf)(char **pbuf, size_t max_len, const char *format, va_list a
  ZEND_API char *(*zend_getenv)(char *name, size_t name_len TSRMLS_DC);
--
+ ZEND_API char *(*zend_resolve_path)(const char *filename, int filename_len TSRMLS_DC);
+ 
 +#if SUHOSIN_PATCH
 +ZEND_API void (*zend_suhosin_log)(int loglevel, char *fmt, ...);
 +#endif
  void (*zend_on_timeout)(int seconds TSRMLS_DC);
  
- static void (*zend_message_dispatcher_p)(long message, void *data);
-@@ -74,9 +76,88 @@ static ZEND_INI_MH(OnUpdateErrorReportin
- 	return SUCCESS;
+ static void (*zend_message_dispatcher_p)(long message, void *data TSRMLS_DC);
+@@ -88,8 +91,88 @@ static ZEND_INI_MH(OnUpdateGCEnabled) /* {{{ */
  }
+ /* }}} */
  
 +#if SUHOSIN_PATCH
 +static ZEND_INI_MH(OnUpdateSuhosin_log_syslog)
@@ -336,7 +336,7 @@
 +	return SUCCESS;
 +}
 +#endif
- 
++
  ZEND_INI_BEGIN()
  	ZEND_INI_ENTRY("error_reporting",				NULL,		ZEND_INI_ALL,		OnUpdateErrorReporting)
 +#if SUHOSIN_PATCH
@@ -351,22 +351,22 @@
 +	STD_ZEND_INI_ENTRY("suhosin.log.phpscript.name",			NULL,		ZEND_INI_PERDIR|ZEND_INI_SYSTEM,	OnUpdateString, log_phpscriptname, suhosin_patch_globals_struct,	suhosin_patch_globals)
 +	STD_ZEND_INI_BOOLEAN("suhosin.log.phpscript.is_safe",			"0",		ZEND_INI_SYSTEM,	OnUpdateBool, log_phpscript_is_safe,	suhosin_patch_globals_struct,	suhosin_patch_globals)
 +#endif
- 	STD_ZEND_INI_BOOLEAN("zend.ze1_compatibility_mode",	"0",	ZEND_INI_ALL,		OnUpdateBool,	ze1_compatibility_mode,	zend_executor_globals,	executor_globals)
+ 	STD_ZEND_INI_BOOLEAN("zend.enable_gc",				"1",	ZEND_INI_ALL,		OnUpdateGCEnabled,      gc_enabled,     zend_gc_globals,        gc_globals)
  #ifdef ZEND_MULTIBYTE
- 	STD_ZEND_INI_BOOLEAN("detect_unicode", "1", ZEND_INI_ALL, OnUpdateBool, detect_unicode, zend_compiler_globals, compiler_globals)
---- php5-5.2.9.dfsg.1.orig/Zend/zend.h
-+++ php5-5.2.9.dfsg.1/Zend/zend.h
-@@ -532,6 +532,9 @@ extern void (*zend_on_timeout)(int secon
- extern ZEND_API int (*zend_stream_open_function)(const char *filename, zend_file_handle *handle TSRMLS_DC);
+  	STD_ZEND_INI_BOOLEAN("detect_unicode", "1", ZEND_INI_ALL, OnUpdateBool, detect_unicode, zend_compiler_globals, compiler_globals)
+--- a/Zend/zend.h
++++ b/Zend/zend.h
+@@ -634,6 +634,9 @@
  extern int (*zend_vspprintf)(char **pbuf, size_t max_len, const char *format, va_list ap);
  extern ZEND_API char *(*zend_getenv)(char *name, size_t name_len TSRMLS_DC);
+ extern ZEND_API char *(*zend_resolve_path)(const char *filename, int filename_len TSRMLS_DC);
 +#if SUHOSIN_PATCH
 +extern ZEND_API void (*zend_suhosin_log)(int loglevel, char *fmt, ...);
 +#endif
  
- 
  ZEND_API void zend_error(int type, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 2, 3);
-@@ -663,6 +666,13 @@ END_EXTERN_C()
+
+@@ -663,6 +666,13 @@
  #include "zend_operators.h"
  #include "zend_variables.h"
  
@@ -1374,21 +1374,21 @@
  
  divert(2)
  
-@@ -1371,7 +1372,7 @@ PHP_ADD_SOURCES(main, main.c snprintf.c 
+@@ -1424,7 +1428,7 @@ PHP_ADD_SOURCES(main, main.c snprintf.c spprintf.c php_sprintf.c \
         php_ini.c SAPI.c rfc1867.c php_content_types.c strlcpy.c \
         strlcat.c mergesort.c reentrancy.c php_variables.c php_ticks.c \
         network.c php_open_temporary_file.c php_logos.c \
--       output.c )
-+       output.c suhosin_patch.c )
+-       output.c getopt.c)
++       output.c getopt.c suhosin_patch.c )
  
  PHP_ADD_SOURCES(main/streams, streams.c cast.c memory.c filter.c \
-        plain_wrapper.c userspace.c transports.c xp_socket.c mmap.c)
-@@ -1397,7 +1398,7 @@ PHP_ADD_SOURCES(Zend, \
-     zend_variables.c zend.c zend_API.c zend_extensions.c zend_hash.c \
+        plain_wrapper.c userspace.c transports.c xp_socket.c mmap.c \
+@@ -1452,7 +1456,7 @@ PHP_ADD_SOURCES(Zend, \
      zend_list.c zend_indent.c zend_builtin_functions.c zend_sprintf.c \
      zend_ini.c zend_qsort.c zend_multibyte.c zend_ts_hash.c zend_stream.c \
--    zend_iterators.c zend_interfaces.c zend_exceptions.c zend_strtod.c)
-+    zend_iterators.c zend_interfaces.c zend_exceptions.c zend_strtod.c zend_canary.c )
+     zend_iterators.c zend_interfaces.c zend_exceptions.c zend_strtod.c zend_gc.c \
+-    zend_closures.c zend_float.c)
++    zend_closures.c zend_float.c zend_canary.c)
  
  if test -r "$abs_srcdir/Zend/zend_objects.c"; then
    PHP_ADD_SOURCES(Zend, zend_objects.c zend_object_handlers.c zend_objects_API.c zend_default_classes.c)
@@ -1408,7 +1408,7 @@
 --- php5-5.2.9.dfsg.1.orig/ext/standard/dl.c
 +++ php5-5.2.9.dfsg.1/ext/standard/dl.c
 @@ -241,6 +241,19 @@ void php_dl(zval *file, int type, zval *
- 			RETURN_FALSE;
+ 			return FAILURE;
  		}
  	}
 +#if SUHOSIN_PATCH
@@ -1424,7 +1424,7 @@
 +		}
 +	}
 +#endif	
- 	RETURN_TRUE;
+ 	return SUCCESS;
  }
  /* }}} */
 --- php5-5.2.9.dfsg.1.orig/ext/standard/file.c
@@ -2467,26 +2467,27 @@
  
 --- php5-5.2.9.dfsg.1.orig/sapi/cgi/cgi_main.c
 +++ php5-5.2.9.dfsg.1/sapi/cgi/cgi_main.c
-@@ -1797,11 +1797,19 @@ consult the installation file that came 
- 							SG(headers_sent) = 1;
- 							SG(request_info).no_headers = 1;
- 						}
+@@ -1859,10 +1859,18 @@ consult the installation file that came with this distribution, or visit \n\
+ 								SG(headers_sent) = 1;
+ 								SG(request_info).no_headers = 1;
+ 							}
 +#if SUHOSIN_PATCH
-+#if ZEND_DEBUG
+ #if ZEND_DEBUG
+-							php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2009 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
 +						php_printf("PHP %s with Suhosin-Patch %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2009 The PHP Group\n%s", PHP_VERSION, SUHOSIN_PATCH_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
-+#else
+ #else
+-							php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2009 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
 +						php_printf("PHP %s with Suhosin-Patch %s (%s) (built: %s %s)\nCopyright (c) 1997-2009 The PHP Group\n%s", PHP_VERSION, SUHOSIN_PATCH_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
 +#endif
 +#else
- #if ZEND_DEBUG
- 						php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2009 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
- #else
- 						php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2009 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
- #endif
++#if ZEND_DEBUG
++						php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2009 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
++#else
++						php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2009 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
 +#endif
- 						php_request_shutdown((void *) 0);
- 						exit_status = 0;
- 						goto out;
+ #endif
+ 							php_request_shutdown((void *) 0);
+ 							exit_status = 0;
 --- php5-5.2.9.dfsg.1.orig/sapi/cli/php_cli.c
 +++ php5-5.2.9.dfsg.1/sapi/cli/php_cli.c
 @@ -772,8 +772,14 @@ int main(int argc, char *argv[])
@@ -2506,16 +2507,16 @@
  #if ZEND_DEBUG && defined(HAVE_GCOV)
  					"(DEBUG GCOV)",
  #elif ZEND_DEBUG
---- php5-5.2.9.dfsg.1.orig/win32/build/config.w32
-+++ php5-5.2.9.dfsg.1/win32/build/config.w32
-@@ -305,7 +305,7 @@ ADD_SOURCES("Zend", "zend_language_parse
- 	zend_sprintf.c zend_ini.c zend_qsort.c zend_multibyte.c zend_ts_hash.c \
+--- a/win32/build/config.w32
++++ b/win32/build/config.w32
+@@ -312,7 +312,7 @@ ADD_SOURCES("Zend", "zend_language_parser.c zend_language_scanner.c \
  	zend_stream.c zend_iterators.c zend_interfaces.c zend_objects.c \
  	zend_object_handlers.c zend_objects_API.c \
--	zend_default_classes.c zend_execute.c zend_strtod.c");
-+	zend_default_classes.c zend_execute.c zend_strtod.c zend_canary.c");
+ 	zend_default_classes.c zend_execute.c zend_strtod.c zend_gc.c zend_closures.c \
+-	zend_float.c");
++	zend_float.c zend_canary.c");
  
- ADD_SOURCES("main", "main.c snprintf.c spprintf.c safe_mode.c fopen_wrappers.c \
+ ADD_SOURCES("main", "main.c snprintf.c spprintf.c safe_mode.c getopt.c fopen_wrappers.c \
  	php_scandir.c php_ini.c SAPI.c rfc1867.c php_content_types.c strlcpy.c \
 @@ -350,6 +350,8 @@ if (PHP_ZEND_MULTIBYTE == "yes") {
  AC_DEFINE('HAVE_USLEEP', 1);
-- 
1.6.3.3





More information about the Pkg-php-commits mailing list