summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2014-12-21 19:11:00 +0100
committerOndřej Surý <ondrej@sury.org>2014-12-21 19:11:00 +0100
commitf14ae32e4d353acd476c090c1fa4966e889480e9 (patch)
treee400ef8bcf02b598ee445081acadbd7341cac283
parentf24acee90af81b332ecfaec17682afcc5ce033bb (diff)
downloadphp-f14ae32e4d353acd476c090c1fa4966e889480e9.tar.gz
Update patches for 5.6.4+dfsg release
-rw-r--r--debian/patches/006-debian_quirks.patch6
-rw-r--r--debian/patches/113-php.ini_securitynotes.patch6
-rw-r--r--debian/patches/bug68381.patch19
-rw-r--r--debian/patches/bug68420.patch33
-rw-r--r--debian/patches/bug68421.patch64
-rw-r--r--debian/patches/bug68423.patch38
-rw-r--r--debian/patches/bug68428.patch148
-rw-r--r--debian/patches/fpm-config.patch2
-rw-r--r--debian/patches/fpm-ipv6-comments.patch19
-rw-r--r--debian/patches/php-fpm-listen-on-unix-socket.patch4
-rw-r--r--debian/patches/php-fpm-man-section-and-cleanup.patch4
-rw-r--r--debian/patches/php-fpm-sysconfdir.patch2
-rw-r--r--debian/patches/php5-fpm-do-reload-on-SIGHUP.patch2
-rw-r--r--debian/patches/php68104.patch53
-rw-r--r--debian/patches/series7
-rw-r--r--debian/patches/session_save_path.patch6
-rw-r--r--debian/patches/zlib-largefile-function-renaming.patch6
17 files changed, 19 insertions, 400 deletions
diff --git a/debian/patches/006-debian_quirks.patch b/debian/patches/006-debian_quirks.patch
index 19314716c..9c7ed7486 100644
--- a/debian/patches/006-debian_quirks.patch
+++ b/debian/patches/006-debian_quirks.patch
@@ -61,7 +61,7 @@ Last-Update: 2010-01-18
## convert skel_dir to full path
--- php5.orig/php.ini-development
+++ php5/php.ini-development
-@@ -711,7 +711,7 @@ default_charset = "UTF-8"
+@@ -708,7 +708,7 @@ default_charset = "UTF-8"
;;;;;;;;;;;;;;;;;;;;;;;;;
; UNIX: "/path1:/path2"
@@ -72,7 +72,7 @@ Last-Update: 2010-01-18
;include_path = ".;c:\php\includes"
--- php5.orig/php.ini-production
+++ php5/php.ini-production
-@@ -709,7 +709,7 @@ default_charset = "UTF-8"
+@@ -708,7 +708,7 @@ default_charset = "UTF-8"
;;;;;;;;;;;;;;;;;;;;;;;;;
; UNIX: "/path1:/path2"
@@ -81,7 +81,7 @@ Last-Update: 2010-01-18
;
; Windows: "\path1;\path2"
;include_path = ".;c:\php\includes"
-@@ -870,49 +870,6 @@ default_socket_timeout = 60
+@@ -869,49 +869,6 @@ default_socket_timeout = 60
; If you only provide the name of the extension, PHP will look for it in its
; default extension directory.
;
diff --git a/debian/patches/113-php.ini_securitynotes.patch b/debian/patches/113-php.ini_securitynotes.patch
index 692de768e..6940204b1 100644
--- a/debian/patches/113-php.ini_securitynotes.patch
+++ b/debian/patches/113-php.ini_securitynotes.patch
@@ -5,9 +5,9 @@ Last-Update: 2010-01-18
--- php5.orig/php.ini-development
+++ php5/php.ini-development
-@@ -296,6 +296,12 @@ serialize_precision = 17
- ; or per-virtualhost web server configuration file. This directive is
- ; *NOT* affected by whether Safe Mode is turned On or Off.
+@@ -295,6 +295,12 @@ serialize_precision = 17
+ ; and below. This directive makes most sense if used in a per-directory
+ ; or per-virtualhost web server configuration file.
; http://php.net/open-basedir
+
+; NOTE: this is considered a "broken" security measure.
diff --git a/debian/patches/bug68381.patch b/debian/patches/bug68381.patch
deleted file mode 100644
index 2974b5382..000000000
--- a/debian/patches/bug68381.patch
+++ /dev/null
@@ -1,19 +0,0 @@
---- php5.orig/sapi/fpm/fpm/fpm_unix.c
-+++ php5/sapi/fpm/fpm/fpm_unix.c
-@@ -266,6 +266,8 @@ int fpm_unix_init_main() /* {{{ */
- struct fpm_worker_pool_s *wp;
- int is_root = !geteuid();
-
-+ zlog_set_level(fpm_globals.log_level);
-+
- if (fpm_global_config.rlimit_files) {
- struct rlimit r;
-
-@@ -396,7 +398,6 @@ int fpm_unix_init_main() /* {{{ */
- }
- }
-
-- zlog_set_level(fpm_globals.log_level);
- return 0;
- }
- /* }}} */
diff --git a/debian/patches/bug68420.patch b/debian/patches/bug68420.patch
deleted file mode 100644
index 533cf0abc..000000000
--- a/debian/patches/bug68420.patch
+++ /dev/null
@@ -1,33 +0,0 @@
---- php5.orig/sapi/fpm/fpm/fpm_sockets.c
-+++ php5/sapi/fpm/fpm/fpm_sockets.c
-@@ -274,13 +274,23 @@ static int fpm_socket_af_inet_listening_
- return -1;
- }
-
-- // strip brackets from address for getaddrinfo
-- if (addr != NULL) {
-- addr_len = strlen(addr);
-- if (addr[0] == '[' && addr[addr_len - 1] == ']') {
-- addr[addr_len - 1] = '\0';
-- addr++;
-- }
-+ if (!addr) {
-+ /* no address: default documented behavior, all IPv4 addresses */
-+ struct sockaddr_in sa_in;
-+
-+ memset(&sa_in, 0, sizeof(sa_in));
-+ sa_in.sin_family = AF_INET;
-+ sa_in.sin_port = htons(port);
-+ sa_in.sin_addr.s_addr = htonl(INADDR_ANY);
-+ free(dup_address);
-+ return fpm_sockets_get_listening_socket(wp, (struct sockaddr *) &sa_in, sizeof(struct sockaddr_in));
-+ }
-+
-+ /* strip brackets from address for getaddrinfo */
-+ addr_len = strlen(addr);
-+ if (addr[0] == '[' && addr[addr_len - 1] == ']') {
-+ addr[addr_len - 1] = '\0';
-+ addr++;
- }
-
- memset(&hints, 0, sizeof hints);
diff --git a/debian/patches/bug68421.patch b/debian/patches/bug68421.patch
deleted file mode 100644
index e02145a81..000000000
--- a/debian/patches/bug68421.patch
+++ /dev/null
@@ -1,64 +0,0 @@
---- php5.orig/sapi/fpm/fpm/fastcgi.c
-+++ php5/sapi/fpm/fpm/fastcgi.c
-@@ -137,6 +137,7 @@ typedef union _sa_t {
- struct sockaddr sa;
- struct sockaddr_un sa_unix;
- struct sockaddr_in sa_inet;
-+ struct sockaddr_in6 sa_inet6;
- } sa_t;
-
- static HashTable fcgi_mgmt_vars;
-@@ -1094,12 +1095,27 @@ void fcgi_free_mgmt_var_cb(void * ptr)
- pefree(*var, 1);
- }
-
--char *fcgi_get_last_client_ip() /* {{{ */
-+const char *fcgi_get_last_client_ip() /* {{{ */
- {
-- if (client_sa.sa.sa_family == AF_UNIX) {
-- return NULL;
-+ static char str[INET6_ADDRSTRLEN];
-+
-+ /* Ipv4 */
-+ if (client_sa.sa.sa_family == AF_INET) {
-+ return inet_ntop(client_sa.sa.sa_family, &client_sa.sa_inet.sin_addr, str, INET6_ADDRSTRLEN);
-+ }
-+#ifdef IN6_IS_ADDR_V4MAPPED
-+ /* Ipv4-Mapped-Ipv6 */
-+ if (client_sa.sa.sa_family == AF_INET6
-+ && IN6_IS_ADDR_V4MAPPED(&client_sa.sa_inet6.sin6_addr)) {
-+ return inet_ntop(AF_INET, ((char *)&client_sa.sa_inet6.sin6_addr)+12, str, INET6_ADDRSTRLEN);
- }
-- return inet_ntoa(client_sa.sa_inet.sin_addr);
-+#endif
-+ /* Ipv6 */
-+ if (client_sa.sa.sa_family == AF_INET6) {
-+ return inet_ntop(client_sa.sa.sa_family, &client_sa.sa_inet6.sin6_addr, str, INET6_ADDRSTRLEN);
-+ }
-+ /* Unix socket */
-+ return NULL;
- }
- /* }}} */
- /*
---- php5.orig/sapi/fpm/fpm/fastcgi.h
-+++ php5/sapi/fpm/fpm/fastcgi.h
-@@ -133,7 +133,7 @@ int fcgi_flush(fcgi_request *req, int cl
- void fcgi_set_mgmt_var(const char * name, size_t name_len, const char * value, size_t value_len);
- void fcgi_free_mgmt_var_cb(void * ptr);
-
--char *fcgi_get_last_client_ip();
-+const char *fcgi_get_last_client_ip();
-
- /*
- * Local variables:
---- php5.orig/sapi/fpm/fpm/fpm_log.c
-+++ php5/sapi/fpm/fpm/fpm_log.c
-@@ -367,7 +367,7 @@ int fpm_log_write(char *log_format TSRML
-
- case 'R': /* remote IP address */
- if (!test) {
-- char *tmp = fcgi_get_last_client_ip();
-+ const char *tmp = fcgi_get_last_client_ip();
- len2 = snprintf(b, FPM_LOG_BUFFER - len, "%s", tmp ? tmp : "-");
- }
- break;
diff --git a/debian/patches/bug68423.patch b/debian/patches/bug68423.patch
deleted file mode 100644
index 6de7a6c92..000000000
--- a/debian/patches/bug68423.patch
+++ /dev/null
@@ -1,38 +0,0 @@
---- php5.orig/sapi/fpm/fpm/fpm_sockets.c
-+++ php5/sapi/fpm/fpm/fpm_sockets.c
-@@ -85,13 +85,24 @@ static void *fpm_get_in_addr(struct sock
- }
- /* }}} */
-
-+static int fpm_get_in_port(struct sockaddr *sa) /* {{{ */
-+{
-+ if (sa->sa_family == AF_INET) {
-+ return ntohs(((struct sockaddr_in*)sa)->sin_port);
-+ }
-+
-+ return ntohs(((struct sockaddr_in6*)sa)->sin6_port);
-+}
-+/* }}} */
-+
- static int fpm_sockets_hash_op(int sock, struct sockaddr *sa, char *key, int type, int op) /* {{{ */
- {
- if (key == NULL) {
- switch (type) {
- case FPM_AF_INET : {
-- key = alloca(INET6_ADDRSTRLEN);
-- inet_ntop(sa->sa_family, fpm_get_in_addr(sa), key, sizeof key);
-+ key = alloca(INET6_ADDRSTRLEN+10);
-+ inet_ntop(sa->sa_family, fpm_get_in_addr(sa), key, INET6_ADDRSTRLEN);
-+ sprintf(key+strlen(key), ":%d", fpm_get_in_port(sa));
- break;
- }
-
-@@ -246,7 +257,7 @@ static int fpm_socket_af_inet_listening_
- char *addr = NULL;
- int addr_len;
- int port = 0;
-- int sock;
-+ int sock = -1;
- int status;
-
- if (port_str) { /* this is host:port pair */
diff --git a/debian/patches/bug68428.patch b/debian/patches/bug68428.patch
deleted file mode 100644
index fa10d86a1..000000000
--- a/debian/patches/bug68428.patch
+++ /dev/null
@@ -1,148 +0,0 @@
---- php5.orig/Zend/zend_execute_API.c
-+++ php5/Zend/zend_execute_API.c
-@@ -1236,6 +1236,10 @@ ZEND_API void zend_timeout(int dummy) /*
- #ifdef ZEND_WIN32
- static LRESULT CALLBACK zend_timeout_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) /* {{{ */
- {
-+#ifdef ZTS
-+ THREAD_T thread_id = (THREAD_T)wParam;
-+#endif
-+
- switch (message) {
- case WM_DESTROY:
- PostQuitMessage(0);
-@@ -1250,7 +1254,7 @@ static LRESULT CALLBACK zend_timeout_Wnd
- #endif
- SetTimer(timeout_window, wParam, lParam*1000, NULL);
- #ifdef ZTS
-- tsrm_ls = ts_resource_ex(0, &wParam);
-+ tsrm_ls = ts_resource_ex(0, &thread_id);
- if (!tsrm_ls) {
- /* shouldn't normally happen */
- break;
-@@ -1267,7 +1271,7 @@ static LRESULT CALLBACK zend_timeout_Wnd
- #ifdef ZTS
- void ***tsrm_ls;
-
-- tsrm_ls = ts_resource_ex(0, &wParam);
-+ tsrm_ls = ts_resource_ex(0, &thread_id);
- if (!tsrm_ls) {
- /* Thread died before receiving its timeout? */
- break;
---- php5.orig/sapi/fpm/fpm/fastcgi.c
-+++ php5/sapi/fpm/fpm/fastcgi.c
-@@ -144,7 +144,7 @@ static HashTable fcgi_mgmt_vars;
-
- static int is_initialized = 0;
- static int in_shutdown = 0;
--static in_addr_t *allowed_clients = NULL;
-+static sa_t *allowed_clients = NULL;
-
- static sa_t client_sa;
-
-@@ -267,14 +267,18 @@ void fcgi_set_allowed_clients(char *ip)
- *end = 0;
- end++;
- }
-- allowed_clients[n] = inet_addr(cur);
-- if (allowed_clients[n] == INADDR_NONE) {
-+ if (inet_pton(AF_INET, cur, &allowed_clients[n].sa_inet.sin_addr)>0) {
-+ allowed_clients[n].sa.sa_family = AF_INET;
-+ n++;
-+ } else if (inet_pton(AF_INET6, cur, &allowed_clients[n].sa_inet6.sin6_addr)>0) {
-+ allowed_clients[n].sa.sa_family = AF_INET6;
-+ n++;
-+ } else {
- zlog(ZLOG_ERROR, "Wrong IP address '%s' in listen.allowed_clients", cur);
- }
-- n++;
- cur = end;
- }
-- allowed_clients[n] = INADDR_NONE;
-+ allowed_clients[n].sa.sa_family = 0;
- free(ip);
- }
- }
-@@ -760,6 +764,43 @@ void fcgi_close(fcgi_request *req, int f
- }
- }
-
-+static int fcgi_is_allowed() {
-+ int i;
-+
-+ if (client_sa.sa.sa_family == AF_UNIX) {
-+ return 1;
-+ }
-+ if (!allowed_clients) {
-+ return 1;
-+ }
-+ if (client_sa.sa.sa_family == AF_INET) {
-+ for (i=0 ; allowed_clients[i].sa.sa_family ; i++) {
-+ if (allowed_clients[i].sa.sa_family == AF_INET
-+ && !memcmp(&client_sa.sa_inet.sin_addr, &allowed_clients[i].sa_inet.sin_addr, 4)) {
-+ return 1;
-+ }
-+ }
-+ }
-+ if (client_sa.sa.sa_family == AF_INET6) {
-+ for (i=0 ; allowed_clients[i].sa.sa_family ; i++) {
-+ if (allowed_clients[i].sa.sa_family == AF_INET6
-+ && !memcmp(&client_sa.sa_inet6.sin6_addr, &allowed_clients[i].sa_inet6.sin6_addr, 12)) {
-+ return 1;
-+ }
-+#ifdef IN6_IS_ADDR_V4MAPPED
-+ if (allowed_clients[i].sa.sa_family == AF_INET
-+ && IN6_IS_ADDR_V4MAPPED(&client_sa.sa_inet6.sin6_addr)
-+ && !memcmp(((char *)&client_sa.sa_inet6.sin6_addr)+12, &allowed_clients[i].sa_inet.sin_addr, 4)) {
-+ return 1;
-+ }
-+#endif
-+ }
-+ }
-+
-+ zlog(ZLOG_ERROR, "Connection disallowed: IP address '%s' has been dropped.", fcgi_get_last_client_ip());
-+ return 0;
-+}
-+
- int fcgi_accept_request(fcgi_request *req)
- {
- #ifdef _WIN32
-@@ -810,23 +851,10 @@ int fcgi_accept_request(fcgi_request *re
- FCGI_UNLOCK(req->listen_socket);
-
- client_sa = sa;
-- if (sa.sa.sa_family == AF_INET && req->fd >= 0 && allowed_clients) {
-- int n = 0;
-- int allowed = 0;
--
-- while (allowed_clients[n] != INADDR_NONE) {
-- if (allowed_clients[n] == sa.sa_inet.sin_addr.s_addr) {
-- allowed = 1;
-- break;
-- }
-- n++;
-- }
-- if (!allowed) {
-- zlog(ZLOG_ERROR, "Connection disallowed: IP address '%s' has been dropped.", inet_ntoa(sa.sa_inet.sin_addr));
-- closesocket(req->fd);
-- req->fd = -1;
-- continue;
-- }
-+ if (req->fd >= 0 && !fcgi_is_allowed()) {
-+ closesocket(req->fd);
-+ req->fd = -1;
-+ continue;
- }
- }
-
---- php5.orig/sapi/fpm/php-fpm.conf.in
-+++ php5/sapi/fpm/php-fpm.conf.in
-@@ -177,7 +177,7 @@ listen = /var/run/php5-fpm.sock
- ;listen.group = @php_fpm_group@
- ;listen.mode = 0660
-
--; List of ipv4 addresses of FastCGI clients which are allowed to connect.
-+; List of addresses (IPv4/IPv6) of FastCGI clients which are allowed to connect.
- ; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original
- ; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address
- ; must be separated by a comma. If this value is left blank, connections will be
diff --git a/debian/patches/fpm-config.patch b/debian/patches/fpm-config.patch
index 129df4969..0d07c524e 100644
--- a/debian/patches/fpm-config.patch
+++ b/debian/patches/fpm-config.patch
@@ -43,7 +43,7 @@ Last-Update: 2010-07-30
; Start a new pool named 'www'.
; the variable $pool can we used in any directive and will be replaced by the
; pool name ('www' here)
-@@ -468,7 +472,7 @@ pm.max_spare_servers = 3
+@@ -471,7 +475,7 @@ pm.max_spare_servers = 3
; Chdir to this directory at the start.
; Note: relative path can be used.
; Default Value: current directory or / when chroot
diff --git a/debian/patches/fpm-ipv6-comments.patch b/debian/patches/fpm-ipv6-comments.patch
deleted file mode 100644
index da38ade37..000000000
--- a/debian/patches/fpm-ipv6-comments.patch
+++ /dev/null
@@ -1,19 +0,0 @@
---- php5.orig/sapi/fpm/php-fpm.conf.in
-+++ php5/sapi/fpm/php-fpm.conf.in
-@@ -154,12 +154,14 @@ group = @php_fpm_group@
-
- ; The address on which to accept FastCGI requests.
- ; Valid syntaxes are:
--; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific address on
-+; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific IPv4 address on
- ; a specific port;
- ; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on
- ; a specific port;
--; 'port' - to listen on a TCP socket to all addresses on a
-+; 'port' - to listen on a TCP socket to all IPv4 addresses on a
- ; specific port;
-+; '[::]:port' - to listen on a TCP socket to all addresses
-+; (IPv6 and IPv4-mapped) on a specific port;
- ; '/path/to/unix/socket' - to listen on a unix socket.
- ; Note: This value is mandatory.
- listen = /var/run/php5-fpm.sock
diff --git a/debian/patches/php-fpm-listen-on-unix-socket.patch b/debian/patches/php-fpm-listen-on-unix-socket.patch
index ab5afe8b8..c5e20a618 100644
--- a/debian/patches/php-fpm-listen-on-unix-socket.patch
+++ b/debian/patches/php-fpm-listen-on-unix-socket.patch
@@ -1,7 +1,7 @@
--- php5.orig/sapi/fpm/php-fpm.conf.in
+++ php5/sapi/fpm/php-fpm.conf.in
-@@ -162,7 +162,7 @@ group = @php_fpm_group@
- ; specific port;
+@@ -165,7 +165,7 @@ group = @php_fpm_group@
+ ; (IPv6 and IPv4-mapped) on a specific port;
; '/path/to/unix/socket' - to listen on a unix socket.
; Note: This value is mandatory.
-listen = 127.0.0.1:9000
diff --git a/debian/patches/php-fpm-man-section-and-cleanup.patch b/debian/patches/php-fpm-man-section-and-cleanup.patch
index 07f5b8d0f..c271b4eef 100644
--- a/debian/patches/php-fpm-man-section-and-cleanup.patch
+++ b/debian/patches/php-fpm-man-section-and-cleanup.patch
@@ -7,7 +7,7 @@ Last-Update: 2010-07-29
--- php5.orig/sapi/fpm/php-fpm.8.in
+++ php5/sapi/fpm/php-fpm.8.in
-@@ -126,22 +126,8 @@ The configuration file for the php-fpm d
+@@ -139,22 +139,8 @@ The configuration file for the php-fpm d
.TP
.B php.ini
The standard php configuration file.
@@ -32,7 +32,7 @@ Last-Update: 2010-07-29
.P
.PD 0
.RS
-@@ -155,10 +141,6 @@ If your installation has no appropriate
+@@ -168,10 +154,6 @@ If your installation has no appropriate
.RE
.PD 1
.P
diff --git a/debian/patches/php-fpm-sysconfdir.patch b/debian/patches/php-fpm-sysconfdir.patch
index 12f6ed4d8..79ed4b6d2 100644
--- a/debian/patches/php-fpm-sysconfdir.patch
+++ b/debian/patches/php-fpm-sysconfdir.patch
@@ -1,6 +1,6 @@
--- php5.orig/sapi/fpm/fpm/fpm_conf.c
+++ php5/sapi/fpm/fpm/fpm_conf.c
-@@ -1650,7 +1650,7 @@ int fpm_conf_init_main(int test_conf, in
+@@ -1651,7 +1651,7 @@ int fpm_conf_init_main(int test_conf, in
char *tmp;
if (fpm_globals.prefix == NULL) {
diff --git a/debian/patches/php5-fpm-do-reload-on-SIGHUP.patch b/debian/patches/php5-fpm-do-reload-on-SIGHUP.patch
index 6a111d7a7..2a13f4454 100644
--- a/debian/patches/php5-fpm-do-reload-on-SIGHUP.patch
+++ b/debian/patches/php5-fpm-do-reload-on-SIGHUP.patch
@@ -40,7 +40,7 @@
--- php5.orig/sapi/fpm/php-fpm.8.in
+++ php5/sapi/fpm/php-fpm.8.in
-@@ -137,7 +137,7 @@ Once started, php-fpm then responds to s
+@@ -150,7 +150,7 @@ Once started, php-fpm then responds to s
.TP
.B SIGUSR1 \fPre-open log file
.TP
diff --git a/debian/patches/php68104.patch b/debian/patches/php68104.patch
deleted file mode 100644
index 5157699ae..000000000
--- a/debian/patches/php68104.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 1b742a2e9f73c3ae57fbe7939932e22b619ce65e Mon Sep 17 00:00:00 2001
-From: manuel <manuel@mausz.at>
-Date: Fri, 26 Sep 2014 18:11:10 +0200
-Subject: [PATCH] Opcache: Fix segfault while pre-evaluating a disabled
- function
-
----
- Zend/zend_API.c | 13 +++++++++++--
- ext/opcache/tests/bug68104.phpt | 13 +++++++++++++
- 2 files changed, 24 insertions(+), 2 deletions(-)
- create mode 100644 ext/opcache/tests/bug68104.phpt
-
---- php5.orig/Zend/zend_API.c
-+++ php5/Zend/zend_API.c
-@@ -2642,11 +2642,20 @@ static zend_function_entry disabled_func
-
- ZEND_API int zend_disable_function(char *function_name, uint function_name_length TSRMLS_DC) /* {{{ */
- {
-- if (zend_hash_del(CG(function_table), function_name, function_name_length+1)==FAILURE) {
-+ zend_internal_function *func;
-+ int retval;
-+
-+ if (zend_hash_find(CG(function_table), function_name, function_name_length+1, (void *)&func) == FAILURE) {
- return FAILURE;
- }
-+
-+ zend_hash_del(CG(function_table), function_name, function_name_length+1);
-+
-+ EG(current_module) = func->module;
- disabled_function[0].fname = function_name;
-- return zend_register_functions(NULL, disabled_function, CG(function_table), MODULE_PERSISTENT TSRMLS_CC);
-+ retval = zend_register_functions(NULL, disabled_function, CG(function_table), MODULE_PERSISTENT TSRMLS_CC);
-+ EG(current_module) = NULL;
-+ return retval;
- }
- /* }}} */
-
---- /dev/null
-+++ php5/ext/opcache/tests/bug68104.phpt
-@@ -0,0 +1,13 @@
-+--TEST--
-+Bug #68104 (Segfault while pre-evaluating a disabled function)
-+--INI--
-+opcache.enable=1
-+opcache.enable_cli=1
-+disable_functions=dl
-+--SKIPIF--
-+<?php require_once('skipif.inc'); ?>
-+--FILE--
-+<?php
-+var_dump(is_callable("dl"));
-+--EXPECT--
-+bool(true)
diff --git a/debian/patches/series b/debian/patches/series
index ac0c31b26..3b94cb46a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -45,10 +45,3 @@ php-5.6.0-oldpcre.patch
hack-phpdbg-to-explicitly-link-with-libedit.patch
php-fpm-getallheaders.patch
0001-Fix-ZEND_MM_ALIGNMENT-on-m64k.patch
-php68104.patch
-bug68421.patch
-bug68423.patch
-bug68420.patch
-bug68428.patch
-bug68381.patch
-fpm-ipv6-comments.patch
diff --git a/debian/patches/session_save_path.patch b/debian/patches/session_save_path.patch
index 295e237cd..c79502250 100644
--- a/debian/patches/session_save_path.patch
+++ b/debian/patches/session_save_path.patch
@@ -7,7 +7,7 @@ Last-Update: 2010-05-01
--- php5.orig/ext/session/session.c
+++ php5/ext/session/session.c
-@@ -803,7 +803,7 @@ static ZEND_INI_MH(OnUpdateSmartStr) /*
+@@ -782,7 +782,7 @@ static ZEND_INI_MH(OnUpdateSmartStr) /*
/* {{{ PHP_INI
*/
PHP_INI_BEGIN()
@@ -18,7 +18,7 @@ Last-Update: 2010-05-01
STD_PHP_INI_BOOLEAN("session.auto_start", "0", PHP_INI_PERDIR, OnUpdateBool, auto_start, php_ps_globals, ps_globals)
--- php5.orig/php.ini-development
+++ php5/php.ini-development
-@@ -1423,7 +1423,7 @@ session.save_handler = files
+@@ -1420,7 +1420,7 @@ session.save_handler = files
; where MODE is the octal representation of the mode. Note that this
; does not overwrite the process's umask.
; http://php.net/session.save-path
@@ -29,7 +29,7 @@ Last-Update: 2010-05-01
; Strict session mode does not accept uninitialized session ID and regenerate
--- php5.orig/php.ini-production
+++ php5/php.ini-production
-@@ -1372,7 +1372,7 @@ session.save_handler = files
+@@ -1371,7 +1371,7 @@ session.save_handler = files
; where MODE is the octal representation of the mode. Note that this
; does not overwrite the process's umask.
; http://php.net/session.save-path
diff --git a/debian/patches/zlib-largefile-function-renaming.patch b/debian/patches/zlib-largefile-function-renaming.patch
index ce13a31c7..5506df61d 100644
--- a/debian/patches/zlib-largefile-function-renaming.patch
+++ b/debian/patches/zlib-largefile-function-renaming.patch
@@ -1,8 +1,8 @@
--- php5.orig/ext/zlib/zlib.c
+++ php5/ext/zlib/zlib.c
-@@ -34,6 +34,18 @@
- #include "ext/standard/php_string.h"
- #include "php_zlib.h"
+@@ -46,6 +46,18 @@
+ #undef gzseek
+ #undef gztell
+/*
+ * zlib include files can define the following preprocessor defines which rename