[Pkg-php-commits] [php/debian-sid] Refreshed and updated suhosin.patch
Ondřej Surý
ondrej at sury.org
Fri Jan 8 13:50:24 UTC 2010
---
debian/patches/suhosin.patch | 184 +++++++++++++++++++++---------------------
1 files changed, 92 insertions(+), 92 deletions(-)
diff --git a/debian/patches/suhosin.patch b/debian/patches/suhosin.patch
index 07ab42b..be1367b 100644
--- a/debian/patches/suhosin.patch
+++ b/debian/patches/suhosin.patch
@@ -2,14 +2,14 @@ suhosin hardening patch
this patch was downloaded from:
- http://download.suhosin.org/suhosin-patch-5.2.10-0.9.7.patch.gz
+ http://download.suhosin.org/suhosin-patch-5.2.11-0.9.7.patch.gz
the following modifications have been made:
* removed changes to ./configure since this file is autogenerated
* "quilt refresh" has been run to clean up the offsets, etc
---- php.orig/TSRM/TSRM.h
-+++ php/TSRM/TSRM.h
+--- a/TSRM/TSRM.h
++++ b/TSRM/TSRM.h
@@ -38,6 +38,13 @@ typedef long tsrm_intptr_t;
typedef unsigned long tsrm_uintptr_t;
#endif
@@ -32,8 +32,8 @@ the following modifications have been made:
#ifdef __cplusplus
extern "C" {
#endif
---- php.orig/TSRM/tsrm_virtual_cwd.c
-+++ php/TSRM/tsrm_virtual_cwd.c
+--- a/TSRM/tsrm_virtual_cwd.c
++++ b/TSRM/tsrm_virtual_cwd.c
@@ -273,6 +273,191 @@ static char *tsrm_strndup(const char *s,
}
/* }}} */
@@ -226,8 +226,8 @@ the following modifications have been made:
CWD_API void virtual_cwd_startup(void) /* {{{ */
{
char cwd[MAXPATHLEN];
---- php.orig/TSRM/tsrm_virtual_cwd.h
-+++ php/TSRM/tsrm_virtual_cwd.h
+--- a/TSRM/tsrm_virtual_cwd.h
++++ b/TSRM/tsrm_virtual_cwd.h
@@ -139,6 +139,22 @@ typedef struct _cwd_state {
typedef int (*verify_path_func)(const cwd_state *);
@@ -251,8 +251,8 @@ the following modifications have been made:
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);
---- php.orig/Zend/Makefile.am
-+++ php/Zend/Makefile.am
+--- a/Zend/Makefile.am
++++ b/Zend/Makefile.am
@@ -17,7 +17,7 @@ libZend_la_SOURCES=\
zend_objects_API.c zend_ts_hash.c zend_stream.c \
zend_default_classes.c \
@@ -262,8 +262,8 @@ the following modifications have been made:
libZend_la_LDFLAGS =
libZend_la_LIBADD = @ZEND_EXTRA_LIBS@
---- php.orig/Zend/Zend.dsp
-+++ php/Zend/Zend.dsp
+--- a/Zend/Zend.dsp
++++ b/Zend/Zend.dsp
@@ -239,6 +239,10 @@ SOURCE=.\zend_strtod.c
# End Source File
# Begin Source File
@@ -275,8 +275,8 @@ the following modifications have been made:
SOURCE=.\zend_ts_hash.c
# End Source File
# Begin Source File
---- php.orig/Zend/ZendTS.dsp
-+++ php/Zend/ZendTS.dsp
+--- a/Zend/ZendTS.dsp
++++ b/Zend/ZendTS.dsp
@@ -273,6 +273,10 @@ SOURCE=.\zend_strtod.c
# End Source File
# Begin Source File
@@ -288,8 +288,8 @@ the following modifications have been made:
SOURCE=.\zend_ts_hash.c
# End Source File
# Begin Source File
---- php.orig/Zend/zend.c
-+++ php/Zend/zend.c
+--- a/Zend/zend.c
++++ b/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);
@@ -390,8 +390,8 @@ the following modifications have been made:
STD_ZEND_INI_BOOLEAN("zend.ze1_compatibility_mode", "0", ZEND_INI_ALL, OnUpdateBool, ze1_compatibility_mode, zend_executor_globals, executor_globals)
#ifdef ZEND_MULTIBYTE
STD_ZEND_INI_BOOLEAN("detect_unicode", "1", ZEND_INI_ALL, OnUpdateBool, detect_unicode, zend_compiler_globals, compiler_globals)
---- php.orig/Zend/zend.h
-+++ php/Zend/zend.h
+--- a/Zend/zend.h
++++ b/Zend/zend.h
@@ -550,6 +550,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);
extern int (*zend_vspprintf)(char **pbuf, size_t max_len, const char *format, va_list ap);
@@ -416,8 +416,8 @@ the following modifications have been made:
#endif /* ZEND_H */
/*
---- php.orig/Zend/zend_alloc.c
-+++ php/Zend/zend_alloc.c
+--- a/Zend/zend_alloc.c
++++ b/Zend/zend_alloc.c
@@ -316,13 +316,26 @@ static const zend_mm_mem_handlers mem_ha
#define MEM_BLOCK_GUARD 0x2A8FCC84
#define MEM_BLOCK_LEAK 0x6C5E8F2D
@@ -691,8 +691,8 @@ the following modifications have been made:
static void alloc_globals_ctor(zend_alloc_globals *alloc_globals TSRMLS_DC)
{
char *tmp;
---- php.orig/Zend/zend_alloc.h
-+++ php/Zend/zend_alloc.h
+--- a/Zend/zend_alloc.h
++++ b/Zend/zend_alloc.h
@@ -129,6 +129,9 @@ ZEND_API int zend_set_memory_limit(size_
ZEND_API void start_memory_manager(TSRMLS_D);
@@ -704,7 +704,7 @@ the following modifications have been made:
#if ZEND_DEBUG
--- /dev/null
-+++ php/Zend/zend_canary.c
++++ b/Zend/zend_canary.c
@@ -0,0 +1,64 @@
+/*
+ +----------------------------------------------------------------------+
@@ -770,8 +770,8 @@ the following modifications have been made:
+ * vim600: sw=4 ts=4 fdm=marker
+ * vim<600: sw=4 ts=4
+ */
---- php.orig/Zend/zend_compile.c
-+++ php/Zend/zend_compile.c
+--- a/Zend/zend_compile.c
++++ b/Zend/zend_compile.c
@@ -54,7 +54,6 @@ static void zend_duplicate_property_info
property_info->name = zend_strndup(property_info->name, property_info->name_length);
}
@@ -791,8 +791,8 @@ the following modifications have been made:
static void build_runtime_defined_function_key(zval *result, char *name, int name_length TSRMLS_DC)
{
---- php.orig/Zend/zend_compile.h
-+++ php/Zend/zend_compile.h
+--- a/Zend/zend_compile.h
++++ b/Zend/zend_compile.h
@@ -564,6 +564,11 @@ ZEND_API int zend_auto_global_disable_ji
int zendlex(znode *zendlval TSRMLS_DC);
@@ -813,8 +813,8 @@ the following modifications have been made:
END_EXTERN_C()
#define ZEND_CLONE_FUNC_NAME "__clone"
---- php.orig/Zend/zend_constants.c
-+++ php/Zend/zend_constants.c
+--- a/Zend/zend_constants.c
++++ b/Zend/zend_constants.c
@@ -110,6 +110,75 @@ void zend_register_standard_constants(TS
REGISTER_MAIN_LONG_CONSTANT("E_USER_NOTICE", E_USER_NOTICE, CONST_PERSISTENT | CONST_CS);
@@ -891,8 +891,8 @@ the following modifications have been made:
/* true/false constants */
{
---- php.orig/Zend/zend_errors.h
-+++ php/Zend/zend_errors.h
+--- a/Zend/zend_errors.h
++++ b/Zend/zend_errors.h
@@ -39,6 +39,20 @@
#define E_ALL (E_ERROR | E_WARNING | E_PARSE | E_NOTICE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_USER_ERROR | E_USER_WARNING | E_USER_NOTICE | E_RECOVERABLE_ERROR)
#define E_CORE (E_CORE_ERROR | E_CORE_WARNING)
@@ -914,8 +914,8 @@ the following modifications have been made:
#endif /* ZEND_ERRORS_H */
/*
---- php.orig/Zend/zend_hash.c
-+++ php/Zend/zend_hash.c
+--- a/Zend/zend_hash.c
++++ b/Zend/zend_hash.c
@@ -20,6 +20,7 @@
/* $Id: zend_hash.c 281779 2009-06-07 19:28:33Z mattwil $ */
@@ -1181,8 +1181,8 @@ the following modifications have been made:
if (ht->pDestructor) {
ht->pDestructor(p->pData);
}
---- php.orig/Zend/zend_llist.c
-+++ php/Zend/zend_llist.c
+--- a/Zend/zend_llist.c
++++ b/Zend/zend_llist.c
@@ -23,6 +23,184 @@
#include "zend_llist.h"
#include "zend_qsort.h"
@@ -1400,9 +1400,9 @@ the following modifications have been made:
if ((old_tail = l->tail)) {
if (old_tail->prev) {
old_tail->prev->next = NULL;
---- php.orig/configure.in
-+++ php/configure.in
-@@ -262,6 +262,7 @@ sinclude(Zend/Zend.m4)
+--- a/configure.in
++++ b/configure.in
+@@ -255,6 +255,7 @@ sinclude(Zend/Zend.m4)
sinclude(TSRM/threads.m4)
sinclude(TSRM/tsrm.m4)
@@ -1428,8 +1428,8 @@ the following modifications have been made:
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)
---- php.orig/ext/standard/basic_functions.c
-+++ php/ext/standard/basic_functions.c
+--- a/ext/standard/basic_functions.c
++++ b/ext/standard/basic_functions.c
@@ -3574,7 +3574,9 @@ zend_function_entry basic_functions[] =
PHP_FALIAS(socket_get_status, stream_get_meta_data, arginfo_stream_get_meta_data)
@@ -1441,8 +1441,8 @@ the following modifications have been made:
#endif
#ifdef HAVE_FNMATCH
---- php.orig/ext/standard/dl.c
-+++ php/ext/standard/dl.c
+--- a/ext/standard/dl.c
++++ b/ext/standard/dl.c
@@ -241,6 +241,19 @@ void php_dl(zval *file, int type, zval *
RETURN_FALSE;
}
@@ -1463,9 +1463,9 @@ the following modifications have been made:
RETURN_TRUE;
}
/* }}} */
---- php.orig/ext/standard/file.c
-+++ php/ext/standard/file.c
-@@ -2403,7 +2403,7 @@ out:
+--- a/ext/standard/file.c
++++ b/ext/standard/file.c
+@@ -2390,7 +2390,7 @@ out:
#if (!defined(__BEOS__) && !defined(NETWARE) && HAVE_REALPATH) || defined(ZTS)
/* {{{ proto string realpath(string path)
Return the resolved path */
@@ -1474,8 +1474,8 @@ the following modifications have been made:
{
zval **path;
char resolved_path_buff[MAXPATHLEN];
---- php.orig/ext/standard/file.h
-+++ php/ext/standard/file.h
+--- a/ext/standard/file.h
++++ b/ext/standard/file.h
@@ -61,7 +61,7 @@ PHP_FUNCTION(flock);
PHP_FUNCTION(fd_set);
PHP_FUNCTION(fd_isset);
@@ -1485,8 +1485,8 @@ the following modifications have been made:
#endif
#ifdef HAVE_FNMATCH
PHP_FUNCTION(fnmatch);
---- php.orig/ext/standard/info.c
-+++ php/ext/standard/info.c
+--- a/ext/standard/info.c
++++ b/ext/standard/info.c
@@ -648,6 +648,31 @@ PHPAPI void php_print_info(int flag TSRM
php_info_print_table_end();
@@ -1519,8 +1519,8 @@ the following modifications have been made:
/* Zend Engine */
php_info_print_box_start(0);
if (expose_php && !sapi_module.phpinfo_as_text) {
---- php.orig/ext/standard/syslog.c
-+++ php/ext/standard/syslog.c
+--- a/ext/standard/syslog.c
++++ b/ext/standard/syslog.c
@@ -42,6 +42,7 @@ static void start_syslog(TSRMLS_D);
*/
PHP_MINIT_FUNCTION(syslog)
@@ -1537,8 +1537,8 @@ the following modifications have been made:
BG(syslog_device)=NULL;
return SUCCESS;
---- php.orig/main/fopen_wrappers.c
-+++ php/main/fopen_wrappers.c
+--- a/main/fopen_wrappers.c
++++ b/main/fopen_wrappers.c
@@ -110,7 +110,7 @@ PHPAPI int php_check_specific_open_based
/* normalize and expand path */
@@ -1616,8 +1616,8 @@ the following modifications have been made:
ptr = end;
}
---- php.orig/main/main.c
-+++ php/main/main.c
+--- a/main/main.c
++++ b/main/main.c
@@ -90,6 +90,9 @@
#include "SAPI.h"
@@ -1628,7 +1628,7 @@ the following modifications have been made:
/* }}} */
#ifndef ZTS
-@@ -1371,7 +1374,7 @@ void php_request_shutdown_for_exec(void
+@@ -1386,7 +1389,7 @@ void php_request_shutdown_for_exec(void
/* used to close fd's in the 3..255 range here, but it's problematic
*/
@@ -1637,7 +1637,7 @@ the following modifications have been made:
}
/* }}} */
-@@ -1412,6 +1415,9 @@ void php_request_shutdown_for_hook(void
+@@ -1427,6 +1430,9 @@ void php_request_shutdown_for_hook(void
zend_try {
shutdown_memory_manager(CG(unclean_shutdown), 0 TSRMLS_CC);
@@ -1647,7 +1647,7 @@ the following modifications have been made:
} zend_end_try();
zend_try {
-@@ -1506,6 +1512,9 @@ void php_request_shutdown(void *dummy)
+@@ -1521,6 +1527,9 @@ void php_request_shutdown(void *dummy)
/* 11. Free Willy (here be crashes) */
zend_try {
shutdown_memory_manager(CG(unclean_shutdown) || !report_memleaks, 0 TSRMLS_CC);
@@ -1657,7 +1657,7 @@ the following modifications have been made:
} zend_end_try();
/* 12. Reset max_execution_time */
-@@ -1665,6 +1674,9 @@ int php_module_startup(sapi_module_struc
+@@ -1680,6 +1689,9 @@ int php_module_startup(sapi_module_struc
#ifdef ZTS
tsrm_ls = ts_resource(0);
#endif
@@ -1667,7 +1667,7 @@ the following modifications have been made:
module_shutdown = 0;
module_startup = 1;
-@@ -1806,6 +1818,10 @@ int php_module_startup(sapi_module_struc
+@@ -1821,6 +1833,10 @@ int php_module_startup(sapi_module_struc
REGISTER_MAIN_STRINGL_CONSTANT("PHP_CONFIG_FILE_PATH", PHP_CONFIG_FILE_PATH, strlen(PHP_CONFIG_FILE_PATH), CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_STRINGL_CONSTANT("PHP_CONFIG_FILE_SCAN_DIR", PHP_CONFIG_FILE_SCAN_DIR, sizeof(PHP_CONFIG_FILE_SCAN_DIR)-1, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_STRINGL_CONSTANT("PHP_SHLIB_SUFFIX", PHP_SHLIB_SUFFIX, sizeof(PHP_SHLIB_SUFFIX)-1, CONST_PERSISTENT | CONST_CS);
@@ -1678,7 +1678,7 @@ the following modifications have been made:
REGISTER_MAIN_STRINGL_CONSTANT("PHP_EOL", PHP_EOL, sizeof(PHP_EOL)-1, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("PHP_INT_MAX", LONG_MAX, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("PHP_INT_SIZE", sizeof(long), CONST_PERSISTENT | CONST_CS);
-@@ -1855,7 +1871,9 @@ int php_module_startup(sapi_module_struc
+@@ -1870,7 +1886,9 @@ int php_module_startup(sapi_module_struc
module_startup = 0;
shutdown_memory_manager(1, 0 TSRMLS_CC);
@@ -1689,7 +1689,7 @@ the following modifications have been made:
/* we're done */
return SUCCESS;
}
-@@ -1914,6 +1932,9 @@ void php_module_shutdown(TSRMLS_D)
+@@ -1929,6 +1947,9 @@ void php_module_shutdown(TSRMLS_D)
#ifndef ZTS
zend_ini_shutdown(TSRMLS_C);
shutdown_memory_manager(CG(unclean_shutdown), 1 TSRMLS_CC);
@@ -1699,8 +1699,8 @@ the following modifications have been made:
core_globals_dtor(&core_globals TSRMLS_CC);
#else
zend_ini_global_shutdown(TSRMLS_C);
---- php.orig/main/php.h
-+++ php/main/php.h
+--- a/main/php.h
++++ b/main/php.h
@@ -40,6 +40,13 @@
#undef sprintf
#define sprintf php_sprintf
@@ -1726,9 +1726,9 @@ the following modifications have been made:
#endif
/*
---- php.orig/main/php_config.h.in
-+++ php/main/php_config.h.in
-@@ -809,6 +809,9 @@
+--- a/main/php_config.h.in
++++ b/main/php_config.h.in
+@@ -815,6 +815,9 @@
/* Define if the target system has /dev/urandom device */
#undef HAVE_DEV_URANDOM
@@ -1738,8 +1738,8 @@ the following modifications have been made:
/* Whether you have AOLserver */
#undef HAVE_AOLSERVER
---- php.orig/main/php_logos.c
-+++ php/main/php_logos.c
+--- a/main/php_logos.c
++++ b/main/php_logos.c
@@ -50,6 +50,10 @@ PHPAPI int php_unregister_info_logo(char
return zend_hash_del(&phpinfo_logo_hash, logo_string, strlen(logo_string));
}
@@ -1761,8 +1761,8 @@ the following modifications have been made:
return SUCCESS;
}
---- php.orig/main/snprintf.c
-+++ php/main/snprintf.c
+--- a/main/snprintf.c
++++ b/main/snprintf.c
@@ -1077,7 +1077,11 @@ static int format_converter(register buf
@@ -1775,8 +1775,8 @@ the following modifications have been made:
goto skip_output;
/*
---- php.orig/main/spprintf.c
-+++ php/main/spprintf.c
+--- a/main/spprintf.c
++++ b/main/spprintf.c
@@ -683,7 +683,11 @@ static void xbuf_format_converter(smart_
@@ -1790,7 +1790,7 @@ the following modifications have been made:
/*
--- /dev/null
-+++ php/main/suhosin_globals.h
++++ b/main/suhosin_globals.h
@@ -0,0 +1,61 @@
+/*
+ +----------------------------------------------------------------------+
@@ -1854,7 +1854,7 @@ the following modifications have been made:
+ * End:
+ */
--- /dev/null
-+++ php/main/suhosin_logo.h
++++ b/main/suhosin_logo.h
@@ -0,0 +1,178 @@
+static unsigned char suhosin_logo[] =
+ "\xff\xd8\xff\xe0\x00\x10\x4a\x46\x49\x46\x00\x01\x01\x01\x00\x48"
@@ -2035,7 +2035,7 @@ the following modifications have been made:
+ "\x38\xc2\x53\x8c\x63\x18\xc7\x9d\xbe\x7f\xff\xd9"
+ ;
--- /dev/null
-+++ php/main/suhosin_patch.c
++++ b/main/suhosin_patch.c
@@ -0,0 +1,380 @@
+/*
+ +----------------------------------------------------------------------+
@@ -2418,7 +2418,7 @@ the following modifications have been made:
+ * vim<600: sw=4 ts=4
+ */
--- /dev/null
-+++ php/main/suhosin_patch.h
++++ b/main/suhosin_patch.h
@@ -0,0 +1,40 @@
+/*
+ +----------------------------------------------------------------------+
@@ -2461,7 +2461,7 @@ the following modifications have been made:
+ * End:
+ */
--- /dev/null
-+++ php/main/suhosin_patch.m4
++++ b/main/suhosin_patch.m4
@@ -0,0 +1,8 @@
+dnl
+dnl $Id: suhosin_patch.m4,v 1.1 2004/11/14 13:24:24 ionic Exp $
@@ -2471,8 +2471,8 @@ the following modifications have been made:
+
+AC_DEFINE(SUHOSIN_PATCH, 1, [Suhosin Patch])
+
---- php.orig/sapi/apache/mod_php5.c
-+++ php/sapi/apache/mod_php5.c
+--- a/sapi/apache/mod_php5.c
++++ b/sapi/apache/mod_php5.c
@@ -951,7 +951,11 @@ static void php_init_handler(server_rec
{
TSRMLS_FETCH();
@@ -2485,8 +2485,8 @@ the following modifications have been made:
}
}
#endif
---- php.orig/sapi/apache2filter/sapi_apache2.c
-+++ php/sapi/apache2filter/sapi_apache2.c
+--- a/sapi/apache2filter/sapi_apache2.c
++++ b/sapi/apache2filter/sapi_apache2.c
@@ -566,7 +566,11 @@ static void php_apache_add_version(apr_p
{
TSRMLS_FETCH();
@@ -2499,9 +2499,9 @@ the following modifications have been made:
}
}
---- php.orig/sapi/apache2handler/sapi_apache2.c
-+++ php/sapi/apache2handler/sapi_apache2.c
-@@ -370,7 +370,11 @@ static void php_apache_add_version(apr_p
+--- a/sapi/apache2handler/sapi_apache2.c
++++ b/sapi/apache2handler/sapi_apache2.c
+@@ -375,7 +375,11 @@ static void php_apache_add_version(apr_p
{
TSRMLS_FETCH();
if (PG(expose_php)) {
@@ -2513,9 +2513,9 @@ the following modifications have been made:
}
}
---- php.orig/sapi/cgi/cgi_main.c
-+++ php/sapi/cgi/cgi_main.c
-@@ -1801,11 +1801,19 @@ consult the installation file that came
+--- a/sapi/cgi/cgi_main.c
++++ b/sapi/cgi/cgi_main.c
+@@ -1803,11 +1803,19 @@ consult the installation file that came
SG(headers_sent) = 1;
SG(request_info).no_headers = 1;
}
@@ -2535,9 +2535,9 @@ the following modifications have been made:
php_request_shutdown((void *) 0);
exit_status = 0;
goto out;
---- php.orig/sapi/cli/php_cli.c
-+++ php/sapi/cli/php_cli.c
-@@ -801,8 +801,14 @@ int main(int argc, char *argv[])
+--- a/sapi/cli/php_cli.c
++++ b/sapi/cli/php_cli.c
+@@ -804,8 +804,14 @@ int main(int argc, char *argv[])
}
request_started = 1;
@@ -2554,8 +2554,8 @@ the following modifications have been made:
#if ZEND_DEBUG && defined(HAVE_GCOV)
"(DEBUG GCOV)",
#elif ZEND_DEBUG
---- php.orig/win32/build/config.w32
-+++ php/win32/build/config.w32
+--- a/win32/build/config.w32
++++ b/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 \
zend_stream.c zend_iterators.c zend_interfaces.c zend_objects.c \
--
1.6.3.3
More information about the Pkg-php-commits
mailing list