[Pkg-php-commits] [php/debian-sid] Removed debian/patches/suhosin_page_size_fixes.patch.

Ondřej Surý ondrej at sury.org
Tue Mar 9 14:22:59 UTC 2010


Description: Proper fix was implemented by upstream.
Bug-Debian: http://bugs.debian.org/571974

Closes: #571974
---
 debian/patches/series                        |    1 -
 debian/patches/suhosin_page_size_fixes.patch |   83 --------------------------
 2 files changed, 0 insertions(+), 84 deletions(-)
 delete mode 100644 debian/patches/suhosin_page_size_fixes.patch

diff --git a/debian/patches/series b/debian/patches/series
index 06ad0df..84eeed2 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -27,7 +27,6 @@ libtool2.2.patch
 libdb_is_-ldb
 page_size_fixes.patch
 suhosin.patch
-suhosin_page_size_fixes.patch
 fix_broken_upstream_tests.patch
 use_embedded_timezonedb.patch
 force_libmysqlclient_r.patch
diff --git a/debian/patches/suhosin_page_size_fixes.patch b/debian/patches/suhosin_page_size_fixes.patch
deleted file mode 100644
index 3b00e5f..0000000
--- a/debian/patches/suhosin_page_size_fixes.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-Description: Don't assume the value of PAGE_SIZE.
- The len argument of mprotect(2) is rounded up if necessary to result
- in an integer number of pages.  If PAGE_SIZE is lower than the real
- page size, the call to mprotect(2) marks more memory as non-writeable
- than desired, leading to all sorts of errors.
-Origin: vendor
-Forwarded: yes
-Last-Update: 2010-02-18
-
-Index: php/main/suhosin_patch.c
-===================================================================
---- php.orig/main/suhosin_patch.c
-+++ php/main/suhosin_patch.c
-@@ -21,6 +21,7 @@
- 
- #include <stdio.h>
- #include <stdlib.h>
-+#include <sys/mman.h>
- 
- #if HAVE_UNISTD_H
- #include <unistd.h>
-@@ -59,19 +60,7 @@ int suhosin_patch_globals_id;
- struct _suhosin_patch_globals suhosin_patch_globals;
- #endif
- 
--/* hack that needs to be fixed */
--#ifndef PAGE_SIZE
--#define PAGE_SIZE 4096
--#endif
--
--#ifdef ZEND_WIN32
--__declspec(align(PAGE_SIZE))
--#endif
--char suhosin_config[PAGE_SIZE] 
--#if defined(__GNUC__) 
--    __attribute__ ((aligned(PAGE_SIZE)))
--#endif
--;
-+char *suhosin_config = NULL;
- 
- static void php_security_log(int loglevel, char *fmt, ...);
- 
-@@ -135,7 +124,7 @@ static void suhosin_read_configuration_f
- static void suhosin_write_protect_configuration()
- {
- #if defined(__GNUC__)
--        mprotect(suhosin_config, PAGE_SIZE, PROT_READ);
-+        mprotect(suhosin_config, sysconf(_SC_PAGESIZE), PROT_READ);
- #endif
- }
- 
-@@ -148,6 +137,13 @@ PHPAPI void suhosin_startup()
- #endif
- 	zend_suhosin_log = php_security_log;
- 	
-+	if (!suhosin_config) {
-+		suhosin_config = mmap(NULL, sysconf(_SC_PAGESIZE), PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
-+		if (suhosin_config == MAP_FAILED) {
-+			perror("suhosin");
-+			_exit(1);
-+		}
-+	}
- 	if (!SUHOSIN_CONFIG(SUHOSIN_CONFIG_SET)) {
-         suhosin_read_configuration_from_environment();
-         suhosin_write_protect_configuration();
-Index: php/main/suhosin_patch.h
-===================================================================
---- php.orig/main/suhosin_patch.h
-+++ php/main/suhosin_patch.h
-@@ -44,12 +44,7 @@
- #include <mach/vm_param.h>
- #endif
- 
--/* hack that needs to be fixed */
--#ifndef PAGE_SIZE
--#define PAGE_SIZE 4096
--#endif
--
--extern char suhosin_config[PAGE_SIZE];
-+extern char *suhosin_config;
- 
- #endif
- 
-- 
1.6.3.3





More information about the Pkg-php-commits mailing list