You are free to use the images below on Apache and Fedora powered HTTP servers. Thanks for using Apache and Fedora!
-
+
From 35f1318a481b6e353f1749fa72df84ce5e408f73 Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Tue, 19 Sep 2017 12:46:35 +0100
Subject: [PATCH 054/359] httpd.service(5) update: show how to ungracefully
stop/restart
---
httpd.service.xml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/httpd.service.xml b/httpd.service.xml
index d03e133..8f82e59 100644
--- a/httpd.service.xml
+++ b/httpd.service.xml
@@ -143,6 +143,11 @@ Wants=network-online.target
which terminates the server only once active connections have
been processed.
+ To "ungracefully" stop the server without waiting for
+ requests to complete, use systemctl kill
+ --kill-who=main httpd; similarly to "ungracefully"
+ reload the configuration, use systemctl kill
+ --kill-who=main --signal=HUP httpd.
From e0e3d5e91caf82d9893aeefd732aac21e92f55c2 Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Tue, 18 Jul 2017 09:25:14 +0100
Subject: [PATCH 055/359] update mod_systemd (r1802251)
---
httpd-2.4.26-r1800306.patch | 86 -------------------
...ystemd.patch => httpd-2.4.27-systemd.patch | 40 ++++++---
httpd.spec | 3 +-
3 files changed, 30 insertions(+), 99 deletions(-)
delete mode 100644 httpd-2.4.26-r1800306.patch
rename httpd-2.4.10-mod_systemd.patch => httpd-2.4.27-systemd.patch (79%)
diff --git a/httpd-2.4.26-r1800306.patch b/httpd-2.4.26-r1800306.patch
deleted file mode 100644
index 4a8bc2d..0000000
--- a/httpd-2.4.26-r1800306.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-# ./pullrev.sh 1800306
-
-http://svn.apache.org/viewvc?view=revision&revision=1800306
-
-diff -uap httpd-2.4.26/modules/mappers/mod_actions.c.r1800306 httpd-2.4.26/modules/mappers/mod_actions.c
---- httpd-2.4.26/modules/mappers/mod_actions.c.r1800306
-+++ httpd-2.4.26/modules/mappers/mod_actions.c
-@@ -186,8 +186,7 @@
- ap_field_noparam(r->pool, r->content_type);
-
- if (action && (t = apr_table_get(conf->action_types, action))) {
-- int virtual = (*t++ == '0' ? 0 : 1);
-- if (!virtual && r->finfo.filetype == APR_NOFILE) {
-+ if (*t++ == '0' && r->finfo.filetype == APR_NOFILE) {
- ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(00652)
- "File does not exist: %s", r->filename);
- return HTTP_NOT_FOUND;
-@@ -198,9 +197,6 @@
- * (will be REDIRECT_HANDLER there)
- */
- apr_table_setn(r->subprocess_env, "HANDLER", action);
-- if (virtual) {
-- apr_table_setn(r->notes, "virtual_script", "1");
-- }
- }
-
- if (script == NULL)
-diff -uap httpd-2.4.26/modules/proxy/mod_proxy_fcgi.c.r1800306 httpd-2.4.26/modules/proxy/mod_proxy_fcgi.c
---- httpd-2.4.26/modules/proxy/mod_proxy_fcgi.c.r1800306
-+++ httpd-2.4.26/modules/proxy/mod_proxy_fcgi.c
-@@ -321,7 +321,6 @@
- apr_status_t rv;
- apr_size_t avail_len, len, required_len;
- int next_elem, starting_elem;
-- int fpm = 0;
- fcgi_req_config_t *rconf = ap_get_module_config(r->request_config, &proxy_fcgi_module);
- fcgi_dirconf_t *dconf = ap_get_module_config(r->per_dir_config, &proxy_fcgi_module);
-
-@@ -354,8 +353,6 @@
- *qs = '\0';
- }
- }
-- } else {
-- fpm = 1;
- }
-
- if (newfname) {
-@@ -364,38 +361,9 @@
- }
- }
-
--#if 0
-- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(09999)
-- "r->filename: %s", (r->filename ? r->filename : "nil"));
-- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(09999)
-- "r->uri: %s", (r->uri ? r->uri : "nil"));
-- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(09999)
-- "r->path_info: %s", (r->path_info ? r->path_info : "nil"));
--#endif
--
- ap_add_common_vars(r);
- ap_add_cgi_vars(r);
-
-- if (fpm || apr_table_get(r->notes, "virtual_script")) {
-- /*
-- * Adjust SCRIPT_NAME, PATH_INFO and PATH_TRANSLATED for PHP-FPM
-- * TODO: Right now, PATH_INFO and PATH_TRANSLATED look OK...
-- */
-- const char *pend;
-- const char *script_name = apr_table_get(r->subprocess_env, "SCRIPT_NAME");
-- pend = script_name + strlen(script_name);
-- if (r->path_info && *r->path_info) {
-- pend = script_name + ap_find_path_info(script_name, r->path_info) - 1;
-- }
-- while (pend != script_name && *pend != '/') {
-- pend--;
-- }
-- apr_table_setn(r->subprocess_env, "SCRIPT_NAME", pend);
-- ap_log_rerror(APLOG_MARK, APLOG_TRACE4, 0, r,
-- "fpm:virtual_script: Modified SCRIPT_NAME to: %s",
-- pend);
-- }
--
- /* XXX are there any FastCGI specific env vars we need to send? */
-
- /* Give admins final option to fine-tune env vars */
diff --git a/httpd-2.4.10-mod_systemd.patch b/httpd-2.4.27-systemd.patch
similarity index 79%
rename from httpd-2.4.10-mod_systemd.patch
rename to httpd-2.4.27-systemd.patch
index 88d76ac..26aac48 100644
--- a/httpd-2.4.10-mod_systemd.patch
+++ b/httpd-2.4.27-systemd.patch
@@ -1,8 +1,10 @@
-diff --git a/modules/arch/unix/config5.m4 b/modules/arch/unix/config5.m4
-index 77027a8..7a13d5a 100644
---- a/modules/arch/unix/config5.m4
-+++ b/modules/arch/unix/config5.m4
-@@ -18,6 +18,16 @@ APACHE_MODULE(privileges, Per-virtualhost Unix UserIDs and enhanced security for
+diff -uap httpd-2.4.27/modules/arch/unix/config5.m4.systemd httpd-2.4.27/modules/arch/unix/config5.m4
+diff -uap httpd-2.4.27/modules/arch/unix/config5.m4.systemd httpd-2.4.27/modules/arch/unix/config5.m4
+diff -uap httpd-2.4.27/modules/arch/unix/config5.m4.systemd httpd-2.4.27/modules/arch/unix/config5.m4
+diff -uap httpd-2.4.27/modules/arch/unix/config5.m4.systemd httpd-2.4.27/modules/arch/unix/config5.m4
+--- httpd-2.4.27/modules/arch/unix/config5.m4.systemd
++++ httpd-2.4.27/modules/arch/unix/config5.m4
+@@ -18,6 +18,16 @@
fi
])
@@ -19,12 +21,10 @@ index 77027a8..7a13d5a 100644
APR_ADDTO(INCLUDES, [-I\$(top_srcdir)/$modpath_current])
APACHE_MODPATH_FINISH
-diff --git a/modules/arch/unix/mod_systemd.c b/modules/arch/unix/mod_systemd.c
-new file mode 100644
-index 0000000..5381c98
---- /dev/null
-+++ b/modules/arch/unix/mod_systemd.c
-@@ -0,0 +1,145 @@
+diff -uap httpd-2.4.27/modules/arch/unix/mod_systemd.c.systemd httpd-2.4.27/modules/arch/unix/mod_systemd.c
+--- httpd-2.4.27/modules/arch/unix/mod_systemd.c.systemd
++++ httpd-2.4.27/modules/arch/unix/mod_systemd.c
+@@ -0,0 +1,161 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
@@ -66,11 +66,20 @@ index 0000000..5381c98
+static unsigned long bytes_served;
+static pid_t mainpid;
+
++static int systemd_pre_config(apr_pool_t *pconf, apr_pool_t *plog,
++ apr_pool_t *ptemp)
++{
++ sd_notify(0,
++ "RELOADING=1\n"
++ "STATUS=Reading configuration...\n");
++ ap_extended_status = 1;
++ return OK;
++}
++
+static int systemd_pre_mpm(apr_pool_t *p, ap_scoreboard_e sb_type)
+{
+ int rv;
+
-+ ap_extended_status = 1;
+ mainpid = getpid();
+
+ rv = sd_notifyf(0, "READY=1\n"
@@ -91,6 +100,11 @@ index 0000000..5381c98
+ char bps[5];
+ int rv;
+
++ if (!ap_extended_status) {
++ /* Nothing useful to report if ExtendedStatus disabled. */
++ return DECLINED;
++ }
++
+ ap_get_sload(&sload);
+ /* up_time in seconds */
+ up_time = (apr_uint32_t) apr_time_sec(apr_time_now() -
@@ -136,6 +150,8 @@ index 0000000..5381c98
+
+static void systemd_register_hooks(apr_pool_t *p)
+{
++ /* Enable ap_extended_status. */
++ ap_hook_pre_config(systemd_pre_config, NULL, NULL, APR_HOOK_LAST);
+ /* We know the PID in this hook ... */
+ ap_hook_pre_mpm(systemd_pre_mpm, NULL, NULL, APR_HOOK_LAST);
+ /* Used to update httpd's status line using sd_notifyf */
diff --git a/httpd.spec b/httpd.spec
index 86bad76..1e3abf6 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -57,7 +57,7 @@ Patch24: httpd-2.4.1-corelimit.patch
Patch25: httpd-2.4.25-selinux.patch
Patch26: httpd-2.4.4-r1337344+.patch
Patch27: httpd-2.4.2-icons.patch
-Patch29: httpd-2.4.10-mod_systemd.patch
+Patch29: httpd-2.4.27-systemd.patch
Patch30: httpd-2.4.4-cachehardmax.patch
Patch31: httpd-2.4.18-sslmultiproxy.patch
Patch34: httpd-2.4.17-socket-activation.patch
@@ -699,6 +699,7 @@ rm -rf $RPM_BUILD_ROOT
* Tue Sep 19 2017 Joe Orton - 2.4.27-3.1
- move httpd.service.d, httpd.socket.d dirs to -filesystem
- add new content-length filter (upstream PR 61222)
+- update mod_systemd (r1802251)
* Thu Sep 21 2017 Jeroen van Meeuwen - 2.4.27-3
- Address CVE-2017-9798 by applying patch from upstream (#1490344)
From 7c50471725536b88b7bd0cfc23d397dc81ca4ea8 Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Fri, 14 Jul 2017 12:55:47 +0100
Subject: [PATCH 056/359] Fix grammar.
---
httpd.service | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/httpd.service b/httpd.service
index 1f707e8..011df3b 100644
--- a/httpd.service
+++ b/httpd.service
@@ -3,7 +3,7 @@
# Modifying this file in-place is not recommended, because changes
# will be overwritten during package upgrades. If you want to
# customize the behaviour, the best way is to use "systemctl edit"
-# command to create an override unit.
+# to create an override unit.
# For example, to pass additional options (such as -D definitions) to
# the httpd binary at startup, create an override unit (as is done by
From c96d33c29448223b65d68b1cd21dd4734acd4437 Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Fri, 14 Jul 2017 12:57:27 +0100
Subject: [PATCH 057/359] Shorter text in httpd.service.
---
httpd.service | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/httpd.service b/httpd.service
index 011df3b..1b779e9 100644
--- a/httpd.service
+++ b/httpd.service
@@ -1,9 +1,8 @@
# See httpd.service(8) for more information on using the httpd service.
# Modifying this file in-place is not recommended, because changes
-# will be overwritten during package upgrades. If you want to
-# customize the behaviour, the best way is to use "systemctl edit"
-# to create an override unit.
+# will be overwritten during package upgrades. To customize the
+# behaviour, run "systemctl edit httpd" to create an override unit.
# For example, to pass additional options (such as -D definitions) to
# the httpd binary at startup, create an override unit (as is done by
From 4f4a88bbca916c3aec829af113dc13bc54eb54be Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Mon, 9 Oct 2017 17:36:00 +0100
Subject: [PATCH 058/359] Fix changelog chronology.
---
httpd.spec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/httpd.spec b/httpd.spec
index 1e3abf6..684d071 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -696,7 +696,7 @@ rm -rf $RPM_BUILD_ROOT
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
-* Tue Sep 19 2017 Joe Orton - 2.4.27-3.1
+* Mon Oct 9 2017 Joe Orton - 2.4.27-7
- move httpd.service.d, httpd.socket.d dirs to -filesystem
- add new content-length filter (upstream PR 61222)
- update mod_systemd (r1802251)
From 6ebb5a2203de9f5cf7c3d9f9a1e7bf026cfa8dc2 Mon Sep 17 00:00:00 2001
From: Patrick Uiterwijk
Date: Tue, 10 Oct 2017 13:31:46 +0200
Subject: [PATCH 059/359] Backport patch for fixing ticket key usage
Signed-off-by: Patrick Uiterwijk
---
httpd-2.4.27-fixticketkeys.patch | 65 ++++++++++++++++++++++++++++++++
httpd.spec | 10 ++++-
2 files changed, 74 insertions(+), 1 deletion(-)
create mode 100644 httpd-2.4.27-fixticketkeys.patch
diff --git a/httpd-2.4.27-fixticketkeys.patch b/httpd-2.4.27-fixticketkeys.patch
new file mode 100644
index 0000000..3769da9
--- /dev/null
+++ b/httpd-2.4.27-fixticketkeys.patch
@@ -0,0 +1,65 @@
+From 4171fbfcb249e63f934471054d7a0752272fb8ee Mon Sep 17 00:00:00 2001
+From: Yann Ylavic
+Date: Tue, 22 Mar 2016 13:09:17 +0000
+Subject: [PATCH] mod_ssl: return non ambigous value in
+ ssl_callback_SessionTicket() for encryption mode (we used to return 0,
+ OpenSSL documents returning 1 instead).
+
+Practically this does not change anything since OpenSSL will only check for
+>= 0 return value (non error) for encryption mode (the other possible return
+values are only relevant for decryption mode).
+
+However the OpenSSL documentation for SSL_CTX_set_tlsext_ticket_key_cb()
+states:
+"
+The return value of the cb function is used by OpenSSL to determine what
+further processing will occur. The following return values have meaning:
+
+2
+ This indicates that the ctx and hctx have been set and the session can
+ continue on those parameters. Additionally it indicates that the session
+ ticket is in a renewal period and should be replaced. The OpenSSL library
+ will call cb again with an enc argument of 1 to set the new ticket (see
+ RFC5077 3.3 paragraph 2).
+
+1
+ This indicates that the ctx and hctx have been set and the session can
+ continue on those parameters.
+
+0
+ This indicates that it was not possible to set/retrieve a session ticket
+ and the SSL/TLS session will continue by by negotiating a set of
+ cryptographic parameters or using the alternate SSL/TLS resumption
+ mechanism, session ids.
+ If called with enc equal to 0 the library will call the cb again to get a
+ new set of parameters.
+
+less than 0
+ This indicates an error.
+"
+
+So 0 is not appropriate in our code, 1 is what we really want (and it won't
+break if OpenSSL later changes its checks on the callback return value).
+
+Reported by: oknet on github, pull request #18.
+
+
+
+git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1736186 13f79535-47bb-0310-9956-ffa450edef68
+---
+ modules/ssl/ssl_engine_kernel.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/modules/ssl/ssl_engine_kernel.c b/modules/ssl/ssl_engine_kernel.c
+index 91da94c4f58..91d5e926d66 100644
+--- a/modules/ssl/ssl_engine_kernel.c
++++ b/modules/ssl/ssl_engine_kernel.c
+@@ -2303,7 +2303,7 @@ int ssl_callback_SessionTicket(SSL *ssl,
+ "TLS session ticket key for %s successfully set, "
+ "creating new session ticket", sc->vhost_id);
+
+- return 0;
++ return 1;
+ }
+ else if (mode == 0) {
+ /*
diff --git a/httpd.spec b/httpd.spec
index d780615..3c25596 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -13,7 +13,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.28
-Release: 1%{?dist}
+Release: 2%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -76,6 +76,9 @@ Patch58: httpd-2.4.25-r1738878.patch
Patch60: httpd-2.4.27-r1808230.patch
# Security fixes
+# https://github.com/apache/httpd/commit/4171fbfcb249e63f934471054d7a0752272fb8ee
+Patch61: httpd-2.4.27-fixticketkeys.patch
+
License: ASL 2.0
Group: System Environment/Daemons
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
@@ -221,6 +224,8 @@ interface for storing and accessing per-user session data.
%patch58 -p1 -b .r1738878
%patch60 -p1 -b .r1808230
+%patch61 -p1 -b .ticketkeys
+
# Patch in the vendor string
sed -i '/^#define PLATFORM/s/Unix/%{vstring}/' os/unix/os.h
@@ -687,6 +692,9 @@ rm -rf $RPM_BUILD_ROOT
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Tue Oct 10 2017 Patrick Uiterwijk - 2.4.28-2
+- Backport patch for fixing ticket key usage
+
* Fri Oct 06 2017 Luboš Uhliarik - 2.4.28-1
- new version 2.4.28
From 41db69f9b8fcb76650e41bc356f505629dd40dfd Mon Sep 17 00:00:00 2001
From: Patrick Uiterwijk
Date: Tue, 10 Oct 2017 13:31:46 +0200
Subject: [PATCH 060/359] Backport patch for fixing ticket key usage
Signed-off-by: Patrick Uiterwijk
---
httpd-2.4.27-fixticketkeys.patch | 65 ++++++++++++++++++++++++++++++++
httpd.spec | 10 ++++-
2 files changed, 74 insertions(+), 1 deletion(-)
create mode 100644 httpd-2.4.27-fixticketkeys.patch
diff --git a/httpd-2.4.27-fixticketkeys.patch b/httpd-2.4.27-fixticketkeys.patch
new file mode 100644
index 0000000..3769da9
--- /dev/null
+++ b/httpd-2.4.27-fixticketkeys.patch
@@ -0,0 +1,65 @@
+From 4171fbfcb249e63f934471054d7a0752272fb8ee Mon Sep 17 00:00:00 2001
+From: Yann Ylavic
+Date: Tue, 22 Mar 2016 13:09:17 +0000
+Subject: [PATCH] mod_ssl: return non ambigous value in
+ ssl_callback_SessionTicket() for encryption mode (we used to return 0,
+ OpenSSL documents returning 1 instead).
+
+Practically this does not change anything since OpenSSL will only check for
+>= 0 return value (non error) for encryption mode (the other possible return
+values are only relevant for decryption mode).
+
+However the OpenSSL documentation for SSL_CTX_set_tlsext_ticket_key_cb()
+states:
+"
+The return value of the cb function is used by OpenSSL to determine what
+further processing will occur. The following return values have meaning:
+
+2
+ This indicates that the ctx and hctx have been set and the session can
+ continue on those parameters. Additionally it indicates that the session
+ ticket is in a renewal period and should be replaced. The OpenSSL library
+ will call cb again with an enc argument of 1 to set the new ticket (see
+ RFC5077 3.3 paragraph 2).
+
+1
+ This indicates that the ctx and hctx have been set and the session can
+ continue on those parameters.
+
+0
+ This indicates that it was not possible to set/retrieve a session ticket
+ and the SSL/TLS session will continue by by negotiating a set of
+ cryptographic parameters or using the alternate SSL/TLS resumption
+ mechanism, session ids.
+ If called with enc equal to 0 the library will call the cb again to get a
+ new set of parameters.
+
+less than 0
+ This indicates an error.
+"
+
+So 0 is not appropriate in our code, 1 is what we really want (and it won't
+break if OpenSSL later changes its checks on the callback return value).
+
+Reported by: oknet on github, pull request #18.
+
+
+
+git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1736186 13f79535-47bb-0310-9956-ffa450edef68
+---
+ modules/ssl/ssl_engine_kernel.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/modules/ssl/ssl_engine_kernel.c b/modules/ssl/ssl_engine_kernel.c
+index 91da94c4f58..91d5e926d66 100644
+--- a/modules/ssl/ssl_engine_kernel.c
++++ b/modules/ssl/ssl_engine_kernel.c
+@@ -2303,7 +2303,7 @@ int ssl_callback_SessionTicket(SSL *ssl,
+ "TLS session ticket key for %s successfully set, "
+ "creating new session ticket", sc->vhost_id);
+
+- return 0;
++ return 1;
+ }
+ else if (mode == 0) {
+ /*
diff --git a/httpd.spec b/httpd.spec
index 684d071..d0564d3 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -8,7 +8,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.27
-Release: 7%{?dist}
+Release: 8%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -71,6 +71,9 @@ Patch59: httpd-2.4.27-CVE-2017-9798.patch
Patch60: httpd-2.4.27-r1808230.patch
# Security fixes
+# https://github.com/apache/httpd/commit/4171fbfcb249e63f934471054d7a0752272fb8ee
+Patch61: httpd-2.4.27-fixticketkeys.patch
+
License: ASL 2.0
Group: System Environment/Daemons
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
@@ -218,6 +221,8 @@ interface for storing and accessing per-user session data.
%patch59 -p4 -b .cve-2017-9798
%patch60 -p1 -b .r1808230
+%patch61 -p1 -b .ticketkeys
+
# Patch in the vendor string
sed -i '/^#define PLATFORM/s/Unix/%{vstring}/' os/unix/os.h
@@ -696,6 +701,9 @@ rm -rf $RPM_BUILD_ROOT
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Tue Oct 10 2017 Patrick Uiterwijk - 2.4.27-8
+- Backport patch for fixing ticket key usage
+
* Mon Oct 9 2017 Joe Orton - 2.4.27-7
- move httpd.service.d, httpd.socket.d dirs to -filesystem
- add new content-length filter (upstream PR 61222)
From ff612b7eda5a2d2002bf31038e9348362ebfa3ae Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lubo=C5=A1=20Uhliarik?=
Date: Tue, 10 Oct 2017 16:06:57 +0200
Subject: [PATCH 061/359] new version 2.4.28
---
.gitignore | 1 +
httpd-2.4.10-sigint.patch | 28 ----------------------------
httpd-2.4.17-socket-activation.patch | 19 +++++++++----------
httpd-2.4.27-CVE-2017-9798.patch | 15 ---------------
httpd.spec | 11 +++++------
sources | 2 +-
6 files changed, 16 insertions(+), 60 deletions(-)
delete mode 100644 httpd-2.4.10-sigint.patch
delete mode 100644 httpd-2.4.27-CVE-2017-9798.patch
diff --git a/.gitignore b/.gitignore
index e364382..2f07a6e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -28,3 +28,4 @@ x86_64
/httpd.service.8
/httpd-2.4.26.tar.bz2
/httpd-2.4.27.tar.bz2
+/httpd-2.4.28.tar.bz2
diff --git a/httpd-2.4.10-sigint.patch b/httpd-2.4.10-sigint.patch
deleted file mode 100644
index ecdd82e..0000000
--- a/httpd-2.4.10-sigint.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-diff --git a/server/mpm/prefork/prefork.c b/server/mpm/prefork/prefork.c
-index 559f90a..a386a75 100644
---- a/server/mpm/prefork/prefork.c
-+++ b/server/mpm/prefork/prefork.c
-@@ -220,6 +220,9 @@ static void clean_child_exit(int code)
- {
- retained->mpm->mpm_state = AP_MPMQ_STOPPING;
-
-+ apr_signal(SIGHUP, SIG_IGN);
-+ apr_signal(SIGTERM, SIG_IGN);
-+
- if (pchild) {
- apr_pool_destroy(pchild);
- }
-@@ -699,6 +702,13 @@ static int make_child(server_rec *s, int slot, int bucket)
- */
- apr_signal(SIGHUP, just_die);
- apr_signal(SIGTERM, just_die);
-+ /* Ignore SIGINT in child. This fixes race-condition in signals
-+ * handling when httpd is runnning on foreground and user hits ctrl+c.
-+ * In this case, SIGINT is sent to all children followed by SIGTERM
-+ * from the main process, which interrupts the SIGINT handler and
-+ * leads to inconsistency.
-+ */
-+ apr_signal(SIGINT, SIG_IGN);
- /* The child process just closes listeners on AP_SIG_GRACEFUL.
- * The pod is used for signalling the graceful restart.
- */
diff --git a/httpd-2.4.17-socket-activation.patch b/httpd-2.4.17-socket-activation.patch
index d5cbdf2..dbdd80c 100644
--- a/httpd-2.4.17-socket-activation.patch
+++ b/httpd-2.4.17-socket-activation.patch
@@ -1,5 +1,5 @@
diff --git a/server/listen.c b/server/listen.c
-index 1d9be83..f5f7754 100644
+index a8e9e6f..1a6c1d3 100644
--- a/server/listen.c
+++ b/server/listen.c
@@ -34,6 +34,10 @@
@@ -100,11 +100,10 @@ index 1d9be83..f5f7754 100644
}
#ifdef WIN32
-@@ -277,6 +286,124 @@ static apr_status_t close_listeners_on_exec(void *v)
- return APR_SUCCESS;
+@@ -315,6 +324,123 @@ static int find_listeners(ap_listen_rec **from, ap_listen_rec **to,
+ return found;
}
-+
+#ifdef HAVE_SYSTEMD
+
+static int find_systemd_socket(process_rec * process, apr_port_t port) {
@@ -222,10 +221,10 @@ index 1d9be83..f5f7754 100644
+
+#endif /* HAVE_SYSTEMD */
+
- static const char *alloc_listener(process_rec *process, char *addr,
+ static const char *alloc_listener(process_rec *process, const char *addr,
apr_port_t port, const char* proto,
void *slave)
-@@ -479,7 +606,7 @@ static int open_listeners(apr_pool_t *pool)
+@@ -495,7 +621,7 @@ static int open_listeners(apr_pool_t *pool)
}
}
#endif
@@ -234,7 +233,7 @@ index 1d9be83..f5f7754 100644
++num_open;
}
else {
-@@ -591,8 +718,28 @@ AP_DECLARE(int) ap_setup_listeners(server_rec *s)
+@@ -607,8 +733,28 @@ AP_DECLARE(int) ap_setup_listeners(server_rec *s)
}
}
@@ -265,7 +264,7 @@ index 1d9be83..f5f7754 100644
}
for (lr = ap_listeners; lr; lr = lr->next) {
-@@ -682,7 +829,7 @@ AP_DECLARE(apr_status_t) ap_duplicate_listeners(apr_pool_t *p, server_rec *s,
+@@ -698,7 +844,7 @@ AP_DECLARE(apr_status_t) ap_duplicate_listeners(apr_pool_t *p, server_rec *s,
duplr->bind_addr);
return stat;
}
@@ -274,7 +273,7 @@ index 1d9be83..f5f7754 100644
#if AP_NONBLOCK_WHEN_MULTI_LISTEN
use_nonblock = (ap_listeners && ap_listeners->next);
stat = apr_socket_opt_set(duplr->sd, APR_SO_NONBLOCK, use_nonblock);
-@@ -809,6 +956,11 @@ AP_DECLARE_NONSTD(const char *) ap_set_listener(cmd_parms *cmd, void *dummy,
+@@ -825,6 +971,11 @@ AP_DECLARE_NONSTD(const char *) ap_set_listener(cmd_parms *cmd, void *dummy,
if (argc < 1 || argc > 2) {
return "Listen requires 1 or 2 arguments.";
}
@@ -286,7 +285,7 @@ index 1d9be83..f5f7754 100644
rv = apr_parse_addr_port(&host, &scope_id, &port, argv[0], cmd->pool);
if (rv != APR_SUCCESS) {
-@@ -840,6 +992,12 @@ AP_DECLARE_NONSTD(const char *) ap_set_listener(cmd_parms *cmd, void *dummy,
+@@ -856,6 +1007,12 @@ AP_DECLARE_NONSTD(const char *) ap_set_listener(cmd_parms *cmd, void *dummy,
ap_str_tolower(proto);
}
diff --git a/httpd-2.4.27-CVE-2017-9798.patch b/httpd-2.4.27-CVE-2017-9798.patch
deleted file mode 100644
index be590f2..0000000
--- a/httpd-2.4.27-CVE-2017-9798.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- httpd/httpd/branches/2.4.x/server/core.c 2017/08/16 16:50:29 1805223
-+++ httpd/httpd/branches/2.4.x/server/core.c 2017/09/08 13:13:11 1807754
-@@ -2266,6 +2266,12 @@
- /* method has not been registered yet, but resource restriction
- * is always checked before method handling, so register it.
- */
-+ if (cmd->pool == cmd->temp_pool) {
-+ /* In .htaccess, we can't globally register new methods. */
-+ return apr_psprintf(cmd->pool, "Could not register method '%s' "
-+ "for %s from .htaccess configuration",
-+ method, cmd->cmd->name);
-+ }
- methnum = ap_method_register(cmd->pool,
- apr_pstrdup(cmd->pool, method));
- }
diff --git a/httpd.spec b/httpd.spec
index d0564d3..379021a 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -7,8 +7,8 @@
Summary: Apache HTTP Server
Name: httpd
-Version: 2.4.27
-Release: 8%{?dist}
+Version: 2.4.28
+Release: 1%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -64,10 +64,8 @@ Patch34: httpd-2.4.17-socket-activation.patch
Patch35: httpd-2.4.17-sslciphdefault.patch
# Bug fixes
Patch56: httpd-2.4.4-mod_unique_id.patch
-Patch57: httpd-2.4.10-sigint.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1397243
Patch58: httpd-2.4.25-r1738878.patch
-Patch59: httpd-2.4.27-CVE-2017-9798.patch
Patch60: httpd-2.4.27-r1808230.patch
# Security fixes
@@ -216,9 +214,7 @@ interface for storing and accessing per-user session data.
%patch35 -p1 -b .sslciphdefault
%patch56 -p1 -b .uniqueid
-%patch57 -p1 -b .sigint
%patch58 -p1 -b .r1738878
-%patch59 -p4 -b .cve-2017-9798
%patch60 -p1 -b .r1808230
%patch61 -p1 -b .ticketkeys
@@ -701,6 +697,9 @@ rm -rf $RPM_BUILD_ROOT
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Tue Oct 10 2017 Luboš Uhliarik - 2.4.28-1
+- new version 2.4.28
+
* Tue Oct 10 2017 Patrick Uiterwijk - 2.4.27-8
- Backport patch for fixing ticket key usage
diff --git a/sources b/sources
index dafe33c..2db6285 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (httpd-2.4.27.tar.bz2) = 7e7e8070715b74cb6890096a74e194f4c6a49c14bda685b1ad832e84312f1ac4316ea03a430e679502bfd8e1853aefa544ee002a20d0f7e994b9a590c74bc42c
+SHA512 (httpd-2.4.28.tar.bz2) = 8de8e32b87e6de220e492e74db9df0882fae11c3b9732f3d3316da048c04767ac4429c0433c36f87d8705263e3376f97a7e1f66a9d7a518632a67b6fe617590a
From 596b5fc517852e60be8e61e1e83a048d1218f575 Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Tue, 10 Oct 2017 15:23:11 +0100
Subject: [PATCH 062/359] drop obsolete Obsoletes update docs, Summary trim
%changelog
---
httpd.spec | 147 +++++------------------------------------------------
1 file changed, 14 insertions(+), 133 deletions(-)
diff --git a/httpd.spec b/httpd.spec
index 3c25596..ded11c5 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -13,7 +13,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.28
-Release: 2%{?dist}
+Release: 3%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -106,8 +106,7 @@ web server.
%package devel
Group: Development/Libraries
-Summary: Development interfaces for the Apache HTTP server
-Obsoletes: secureweb-devel, apache-devel, stronghold-apache-devel
+Summary: Development interfaces for the Apache HTTP Server
Requires: apr-devel, apr-util-devel, pkgconfig
Requires: httpd = %{version}-%{release}
@@ -116,31 +115,30 @@ The httpd-devel package contains the APXS binary and other files
that you need to build Dynamic Shared Objects (DSOs) for the
Apache HTTP Server.
-If you are installing the Apache HTTP server and you want to be
+If you are installing the Apache HTTP Server and you want to be
able to compile or develop additional modules for Apache, you need
to install this package.
%package manual
Group: Documentation
-Summary: Documentation for the Apache HTTP server
+Summary: Documentation for the Apache HTTP Server
Requires: httpd = %{version}-%{release}
-Obsoletes: secureweb-manual, apache-manual
BuildArch: noarch
%description manual
The httpd-manual package contains the complete manual and
-reference guide for the Apache HTTP server. The information can
-also be found at http://httpd.apache.org/docs/2.2/.
+reference guide for the Apache HTTP Server. The information can
+also be found at https://httpd.apache.org/docs/2.4/.
%package filesystem
Group: System Environment/Daemons
-Summary: The basic directory layout for the Apache HTTP server
+Summary: The basic directory layout for the Apache HTTP Server
BuildArch: noarch
Requires(pre): /usr/sbin/useradd
%description filesystem
The httpd-filesystem package contains the basic directory layout
-for the Apache HTTP server including the correct permissions
+for the Apache HTTP Server including the correct permissions
for the directories.
%package tools
@@ -159,7 +157,6 @@ BuildRequires: openssl-devel
Requires(pre): httpd-filesystem
Requires: httpd = 0:%{version}-%{release}, httpd-mmn = %{mmnisa}
Requires: sscg >= 2.2.0
-Obsoletes: stronghold-mod_ssl
# Require an OpenSSL which supports PROFILE=SYSTEM
Conflicts: openssl-libs < 1:1.0.1h-4
@@ -692,6 +689,11 @@ rm -rf $RPM_BUILD_ROOT
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Tue Oct 10 2017 Joe Orton - 2.4.28-3
+- drop obsolete Obsoletes
+- update docs, Summary
+- trim %%changelog
+
* Tue Oct 10 2017 Patrick Uiterwijk - 2.4.28-2
- Backport patch for fixing ticket key usage
@@ -718,7 +720,7 @@ rm -rf $RPM_BUILD_ROOT
- document httpd-init.service in httpd-init.service(8)
* Wed Sep 20 2017 Stephen Gallagher - 2.4.27-8.1
-- Generate SSL certificates on service start, not %posttrans
+- Generate SSL certificates on service start, not %%posttrans
* Tue Sep 19 2017 Joe Orton - 2.4.27-8
- move httpd.service.d, httpd.socket.d dirs to -filesystem
@@ -1203,124 +1205,3 @@ rm -rf $RPM_BUILD_ROOT
- split all LoadModules to conf.modules.d/*.conf
- include conf.d/*.conf at end of httpd.conf
- trim %%changelog
-
-* Mon Feb 13 2012 Joe Orton - 2.2.22-2
-- fix build against PCRE 8.30
-
-* Mon Feb 13 2012 Joe Orton - 2.2.22-1
-- update to 2.2.22
-
-* Fri Feb 10 2012 Petr Pisar - 2.2.21-8
-- Rebuild against PCRE 8.30
-
-* Mon Jan 23 2012 Jan Kaluza - 2.2.21-7
-- fix #783629 - start httpd after named
-
-* Mon Jan 16 2012 Joe Orton - 2.2.21-6
-- complete conversion to systemd, drop init script (#770311)
-- fix comments in /etc/sysconfig/httpd (#771024)
-- enable PrivateTmp in service file (#781440)
-- set LANG=C in /etc/sysconfig/httpd
-
-* Fri Jan 13 2012 Fedora Release Engineering - 2.2.21-5
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
-
-* Tue Dec 06 2011 Jan Kaluza - 2.2.21-4
-- fix #751591 - start httpd after remote-fs
-
-* Mon Oct 24 2011 Jan Kaluza - 2.2.21-3
-- allow change state of BalancerMember in mod_proxy_balancer web interface
-
-* Thu Sep 22 2011 Ville Skyttä - 2.2.21-2
-- Make mmn available as %%{_httpd_mmn}.
-- Add .svgz to AddEncoding x-gzip example in httpd.conf.
-
-* Tue Sep 13 2011 Joe Orton - 2.2.21-1
-- update to 2.2.21
-
-* Mon Sep 5 2011 Joe Orton - 2.2.20-1
-- update to 2.2.20
-- fix MPM stub man page generation
-
-* Wed Aug 10 2011 Jan Kaluza - 2.2.19-5
-- fix #707917 - add httpd-ssl-pass-dialog to ask for SSL password using systemd
-
-* Fri Jul 22 2011 Iain Arnell 1:2.2.19-4
-- rebuild while rpm-4.9.1 is untagged to remove trailing slash in provided
- directory names
-
-* Wed Jul 20 2011 Jan Kaluza - 2.2.19-3
-- fix #716621 - suexec now works without setuid bit
-
-* Thu Jul 14 2011 Jan Kaluza - 2.2.19-2
-- fix #689091 - backported patch from 2.3 branch to support IPv6 in logresolve
-
-* Fri Jul 1 2011 Joe Orton - 2.2.19-1
-- update to 2.2.19
-- enable dbd, authn_dbd in default config
-
-* Thu Apr 14 2011 Joe Orton - 2.2.17-13
-- fix path expansion in service files
-
-* Tue Apr 12 2011 Joe Orton - 2.2.17-12
-- add systemd service files (#684175, thanks to Jóhann B. Guðmundsson)
-
-* Wed Mar 23 2011 Joe Orton - 2.2.17-11
-- minor updates to httpd.conf
-- drop old patches
-
-* Wed Mar 2 2011 Joe Orton - 2.2.17-10
-- rebuild
-
-* Wed Feb 23 2011 Joe Orton - 2.2.17-9
-- use arch-specific mmn
-
-* Wed Feb 09 2011 Fedora Release Engineering - 2.2.17-8
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
-
-* Mon Jan 31 2011 Joe Orton - 2.2.17-7
-- generate dummy mod_ssl cert with CA:FALSE constraint (#667841)
-- add man page stubs for httpd.event, httpd.worker
-- drop distcache support
-- add STOP_TIMEOUT support to init script
-
-* Sat Jan 8 2011 Joe Orton - 2.2.17-6
-- update default SSLCipherSuite per upstream trunk
-
-* Wed Jan 5 2011 Joe Orton - 2.2.17-5
-- fix requires (#667397)
-
-* Wed Jan 5 2011 Joe Orton - 2.2.17-4
-- de-ghost /var/run/httpd
-
-* Tue Jan 4 2011 Joe Orton - 2.2.17-3
-- add tmpfiles.d configuration, ghost /var/run/httpd (#656600)
-
-* Sat Nov 20 2010 Joe Orton - 2.2.17-2
-- drop setuid bit, use capabilities for suexec binary
-
-* Wed Oct 27 2010 Joe Orton - 2.2.17-1
-- update to 2.2.17
-
-* Fri Sep 10 2010 Joe Orton - 2.2.16-2
-- link everything using -z relro and -z now
-
-* Mon Jul 26 2010 Joe Orton - 2.2.16-1
-- update to 2.2.16
-
-* Fri Jul 9 2010 Joe Orton - 2.2.15-3
-- default config tweaks:
- * harden httpd.conf w.r.t. .htaccess restriction (#591293)
- * load mod_substitute, mod_version by default
- * drop proxy_ajp.conf, load mod_proxy_ajp in httpd.conf
- * add commented list of shipped-but-unloaded modules
- * bump up worker defaults a little
- * drop KeepAliveTimeout to 5 secs per upstream
-- fix LSB compliance in init script (#522074)
-- bundle NOTICE in -tools
-- use init script in logrotate postrotate to pick up PIDFILE
-- drop some old Obsoletes/Conflicts
-
-* Sun Apr 04 2010 Robert Scheck - 2.2.15-1
-- update to 2.2.15 (#572404, #579311)
-
From 082f3536aa8b73283eede9cf867eefd01c8597fb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lubo=C5=A1=20Uhliarik?=
Date: Wed, 25 Oct 2017 14:20:19 +0200
Subject: [PATCH 063/359] new version 2.4.29
---
httpd.spec | 7 +++++--
sources | 2 +-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/httpd.spec b/httpd.spec
index ded11c5..505f241 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -12,8 +12,8 @@
Summary: Apache HTTP Server
Name: httpd
-Version: 2.4.28
-Release: 3%{?dist}
+Version: 2.4.29
+Release: 1%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -689,6 +689,9 @@ rm -rf $RPM_BUILD_ROOT
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Wed Oct 25 2017 Luboš Uhliarik - 2.4.29-1
+- new version 2.4.29
+
* Tue Oct 10 2017 Joe Orton - 2.4.28-3
- drop obsolete Obsoletes
- update docs, Summary
diff --git a/sources b/sources
index 2db6285..6978287 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (httpd-2.4.28.tar.bz2) = 8de8e32b87e6de220e492e74db9df0882fae11c3b9732f3d3316da048c04767ac4429c0433c36f87d8705263e3376f97a7e1f66a9d7a518632a67b6fe617590a
+SHA512 (httpd-2.4.29.tar.bz2) = 840982fd3d21463bc5c1747f211dfacf3abdf634d149e49bb49fd2e5deda140de602dbdf31e1bbe5337a48f718ab2261c408e83a8dd39a9291ee7b6b7a85639a
From 16b03b20d8a2c18913e94ab6653c66deb5922ace Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lubo=C5=A1=20Uhliarik?=
Date: Wed, 25 Oct 2017 14:28:47 +0200
Subject: [PATCH 064/359] Removed patches, which are already included in
upstream source
---
httpd-2.4.27-fixticketkeys.patch | 65 ---------
httpd-2.4.27-r1808230.patch | 131 -----------------
httpd-2.4.4-mod_unique_id.patch | 239 -------------------------------
httpd.spec | 12 +-
4 files changed, 2 insertions(+), 445 deletions(-)
delete mode 100644 httpd-2.4.27-fixticketkeys.patch
delete mode 100644 httpd-2.4.27-r1808230.patch
delete mode 100644 httpd-2.4.4-mod_unique_id.patch
diff --git a/httpd-2.4.27-fixticketkeys.patch b/httpd-2.4.27-fixticketkeys.patch
deleted file mode 100644
index 3769da9..0000000
--- a/httpd-2.4.27-fixticketkeys.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From 4171fbfcb249e63f934471054d7a0752272fb8ee Mon Sep 17 00:00:00 2001
-From: Yann Ylavic
-Date: Tue, 22 Mar 2016 13:09:17 +0000
-Subject: [PATCH] mod_ssl: return non ambigous value in
- ssl_callback_SessionTicket() for encryption mode (we used to return 0,
- OpenSSL documents returning 1 instead).
-
-Practically this does not change anything since OpenSSL will only check for
->= 0 return value (non error) for encryption mode (the other possible return
-values are only relevant for decryption mode).
-
-However the OpenSSL documentation for SSL_CTX_set_tlsext_ticket_key_cb()
-states:
-"
-The return value of the cb function is used by OpenSSL to determine what
-further processing will occur. The following return values have meaning:
-
-2
- This indicates that the ctx and hctx have been set and the session can
- continue on those parameters. Additionally it indicates that the session
- ticket is in a renewal period and should be replaced. The OpenSSL library
- will call cb again with an enc argument of 1 to set the new ticket (see
- RFC5077 3.3 paragraph 2).
-
-1
- This indicates that the ctx and hctx have been set and the session can
- continue on those parameters.
-
-0
- This indicates that it was not possible to set/retrieve a session ticket
- and the SSL/TLS session will continue by by negotiating a set of
- cryptographic parameters or using the alternate SSL/TLS resumption
- mechanism, session ids.
- If called with enc equal to 0 the library will call the cb again to get a
- new set of parameters.
-
-less than 0
- This indicates an error.
-"
-
-So 0 is not appropriate in our code, 1 is what we really want (and it won't
-break if OpenSSL later changes its checks on the callback return value).
-
-Reported by: oknet on github, pull request #18.
-
-
-
-git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1736186 13f79535-47bb-0310-9956-ffa450edef68
----
- modules/ssl/ssl_engine_kernel.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/modules/ssl/ssl_engine_kernel.c b/modules/ssl/ssl_engine_kernel.c
-index 91da94c4f58..91d5e926d66 100644
---- a/modules/ssl/ssl_engine_kernel.c
-+++ b/modules/ssl/ssl_engine_kernel.c
-@@ -2303,7 +2303,7 @@ int ssl_callback_SessionTicket(SSL *ssl,
- "TLS session ticket key for %s successfully set, "
- "creating new session ticket", sc->vhost_id);
-
-- return 0;
-+ return 1;
- }
- else if (mode == 0) {
- /*
diff --git a/httpd-2.4.27-r1808230.patch b/httpd-2.4.27-r1808230.patch
deleted file mode 100644
index e4062ea..0000000
--- a/httpd-2.4.27-r1808230.patch
+++ /dev/null
@@ -1,131 +0,0 @@
-# ./pullrev.sh 1808230
-http://svn.apache.org/viewvc?view=revision&revision=1808230
-
---- httpd-2.4.27/server/protocol.c
-+++ httpd-2.4.27/server/protocol.c
-@@ -1708,62 +1708,88 @@
- ctx->tmpbb = apr_brigade_create(r->pool, r->connection->bucket_alloc);
- }
-
-- /* Loop through this set of buckets to compute their length
-- */
-+ /* Loop through the brigade to count the length. To avoid
-+ * arbitrary memory consumption with morphing bucket types, this
-+ * loop will stop and pass on the brigade when necessary. */
- e = APR_BRIGADE_FIRST(b);
- while (e != APR_BRIGADE_SENTINEL(b)) {
-+ apr_status_t rv;
-+
- if (APR_BUCKET_IS_EOS(e)) {
- eos = 1;
- break;
- }
-- if (e->length == (apr_size_t)-1) {
-+ /* For a flush bucket, fall through to pass the brigade and
-+ * flush now. */
-+ else if (APR_BUCKET_IS_FLUSH(e)) {
-+ e = APR_BUCKET_NEXT(e);
-+ }
-+ /* For metadata bucket types other than FLUSH, loop. */
-+ else if (APR_BUCKET_IS_METADATA(e)) {
-+ e = APR_BUCKET_NEXT(e);
-+ continue;
-+ }
-+ /* For determinate length data buckets, count the length and
-+ * continue. */
-+ else if (e->length != (apr_size_t)-1) {
-+ r->bytes_sent += e->length;
-+ e = APR_BUCKET_NEXT(e);
-+ continue;
-+ }
-+ /* For indeterminate length data buckets, perform one read. */
-+ else /* e->length == (apr_size_t)-1 */ {
- apr_size_t len;
- const char *ignored;
-- apr_status_t rv;
--
-- /* This is probably a pipe bucket. Send everything
-- * prior to this, and then read the data for this bucket.
-- */
-+
- rv = apr_bucket_read(e, &ignored, &len, eblock);
-+ if ((rv != APR_SUCCESS) && !APR_STATUS_IS_EAGAIN(rv)) {
-+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(00574)
-+ "ap_content_length_filter: "
-+ "apr_bucket_read() failed");
-+ return rv;
-+ }
- if (rv == APR_SUCCESS) {
-- /* Attempt a nonblocking read next time through */
- eblock = APR_NONBLOCK_READ;
-+ e = APR_BUCKET_NEXT(e);
- r->bytes_sent += len;
- }
- else if (APR_STATUS_IS_EAGAIN(rv)) {
-- /* Output everything prior to this bucket, and then
-- * do a blocking read on the next batch.
-- */
-- if (e != APR_BRIGADE_FIRST(b)) {
-- apr_bucket *flush;
-- apr_brigade_split_ex(b, e, ctx->tmpbb);
-- flush = apr_bucket_flush_create(r->connection->bucket_alloc);
-+ apr_bucket *flush;
-
-- APR_BRIGADE_INSERT_TAIL(b, flush);
-- rv = ap_pass_brigade(f->next, b);
-- if (rv != APR_SUCCESS || f->c->aborted) {
-- return rv;
-- }
-- apr_brigade_cleanup(b);
-- APR_BRIGADE_CONCAT(b, ctx->tmpbb);
-- e = APR_BRIGADE_FIRST(b);
-+ /* Next read must block. */
-+ eblock = APR_BLOCK_READ;
-
-- ctx->data_sent = 1;
-- }
-- eblock = APR_BLOCK_READ;
-- continue;
-+ /* Ensure the last bucket to pass down is a flush if
-+ * the next read will block. */
-+ flush = apr_bucket_flush_create(f->c->bucket_alloc);
-+ APR_BUCKET_INSERT_BEFORE(e, flush);
- }
-- else {
-- ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(00574)
-- "ap_content_length_filter: "
-- "apr_bucket_read() failed");
-- return rv;
-- }
- }
-- else {
-- r->bytes_sent += e->length;
-+
-+ /* Optimization: if the next bucket is EOS (directly after a
-+ * bucket morphed to the heap, or a flush), short-cut to
-+ * handle EOS straight away - allowing C-L to be determined
-+ * for content which is already entirely in memory. */
-+ if (e != APR_BRIGADE_SENTINEL(b) && APR_BUCKET_IS_EOS(e)) {
-+ continue;
- }
-- e = APR_BUCKET_NEXT(e);
-+
-+ /* On reaching here, pass on everything in the brigade up to
-+ * this point. */
-+ apr_brigade_split_ex(b, e, ctx->tmpbb);
-+
-+ rv = ap_pass_brigade(f->next, b);
-+ if (rv != APR_SUCCESS) {
-+ return rv;
-+ }
-+ else if (f->c->aborted) {
-+ return APR_ECONNABORTED;
-+ }
-+ apr_brigade_cleanup(b);
-+ APR_BRIGADE_CONCAT(b, ctx->tmpbb);
-+ e = APR_BRIGADE_FIRST(b);
-+
-+ ctx->data_sent = 1;
- }
-
- /* If we've now seen the entire response and it's otherwise
diff --git a/httpd-2.4.4-mod_unique_id.patch b/httpd-2.4.4-mod_unique_id.patch
deleted file mode 100644
index 30bdfe0..0000000
--- a/httpd-2.4.4-mod_unique_id.patch
+++ /dev/null
@@ -1,239 +0,0 @@
---- trunk/modules/metadata/mod_unique_id.c 2011/12/02 23:02:04 1209766
-+++ trunk/modules/metadata/mod_unique_id.c 2013/07/10 16:20:31 1501827
-@@ -31,14 +31,11 @@
- #include "http_log.h"
- #include "http_protocol.h" /* for ap_hook_post_read_request */
-
--#if APR_HAVE_UNISTD_H
--#include /* for getpid() */
--#endif
-+#define ROOT_SIZE 10
-
- typedef struct {
- unsigned int stamp;
-- unsigned int in_addr;
-- unsigned int pid;
-+ char root[ROOT_SIZE];
- unsigned short counter;
- unsigned int thread_index;
- } unique_id_rec;
-@@ -64,20 +61,15 @@
- * gethostbyname (gethostname()) is unique across all the machines at the
- * "site".
- *
-- * We also further assume that pids fit in 32-bits. If something uses more
-- * than 32-bits, the fix is trivial, but it requires the unrolled uuencoding
-- * loop to be extended. * A similar fix is needed to support multithreaded
-- * servers, using a pid/tid combo.
-- *
-- * Together, the in_addr and pid are assumed to absolutely uniquely identify
-- * this one child from all other currently running children on all servers
-- * (including this physical server if it is running multiple httpds) from each
-+ * The root is assumed to absolutely uniquely identify this one child
-+ * from all other currently running children on all servers (including
-+ * this physical server if it is running multiple httpds) from each
- * other.
- *
-- * The stamp and counter are used to distinguish all hits for a particular
-- * (in_addr,pid) pair. The stamp is updated using r->request_time,
-- * saving cpu cycles. The counter is never reset, and is used to permit up to
-- * 64k requests in a single second by a single child.
-+ * The stamp and counter are used to distinguish all hits for a
-+ * particular root. The stamp is updated using r->request_time,
-+ * saving cpu cycles. The counter is never reset, and is used to
-+ * permit up to 64k requests in a single second by a single child.
- *
- * The 144-bits of unique_id_rec are encoded using the alphabet
- * [A-Za-z0-9@-], resulting in 24 bytes of printable characters. That is then
-@@ -92,7 +84,7 @@
- * module change.
- *
- * It is highly desirable that identifiers exist for "eternity". But future
-- * needs (such as much faster webservers, moving to 64-bit pids, or moving to a
-+ * needs (such as much faster webservers, or moving to a
- * multithreaded server) may dictate a need to change the contents of
- * unique_id_rec. Such a future implementation should ensure that the first
- * field is still a time_t stamp. By doing that, it is possible for a site to
-@@ -100,7 +92,15 @@
- * wait one entire second, and then start all of their new-servers. This
- * procedure will ensure that the new space of identifiers is completely unique
- * from the old space. (Since the first four unencoded bytes always differ.)
-+ *
-+ * Note: previous implementations used 32-bits of IP address plus pid
-+ * in place of the PRNG output in the "root" field. This was
-+ * insufficient for IPv6-only hosts, required working DNS to determine
-+ * a unique IP address (fragile), and needed a [0, 1) second sleep
-+ * call at startup to avoid pid reuse. Use of the PRNG avoids all
-+ * these issues.
- */
-+
- /*
- * Sun Jun 7 05:43:49 CEST 1998 -- Alvaro
- * More comments:
-@@ -116,8 +116,6 @@
- * htonl/ntohl. Well, this shouldn't be a problem till year 2106.
- */
-
--static unsigned global_in_addr;
--
- /*
- * XXX: We should have a per-thread counter and not use cur_unique_id.counter
- * XXX: in all threads, because this is bad for performance on multi-processor
-@@ -129,7 +127,7 @@
- /*
- * Number of elements in the structure unique_id_rec.
- */
--#define UNIQUE_ID_REC_MAX 5
-+#define UNIQUE_ID_REC_MAX 4
-
- static unsigned short unique_id_rec_offset[UNIQUE_ID_REC_MAX],
- unique_id_rec_size[UNIQUE_ID_REC_MAX],
-@@ -138,113 +136,32 @@
-
- static int unique_id_global_init(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *main_server)
- {
-- char str[APRMAXHOSTLEN + 1];
-- apr_status_t rv;
-- char *ipaddrstr;
-- apr_sockaddr_t *sockaddr;
--
- /*
- * Calculate the sizes and offsets in cur_unique_id.
- */
- unique_id_rec_offset[0] = APR_OFFSETOF(unique_id_rec, stamp);
- unique_id_rec_size[0] = sizeof(cur_unique_id.stamp);
-- unique_id_rec_offset[1] = APR_OFFSETOF(unique_id_rec, in_addr);
-- unique_id_rec_size[1] = sizeof(cur_unique_id.in_addr);
-- unique_id_rec_offset[2] = APR_OFFSETOF(unique_id_rec, pid);
-- unique_id_rec_size[2] = sizeof(cur_unique_id.pid);
-- unique_id_rec_offset[3] = APR_OFFSETOF(unique_id_rec, counter);
-- unique_id_rec_size[3] = sizeof(cur_unique_id.counter);
-- unique_id_rec_offset[4] = APR_OFFSETOF(unique_id_rec, thread_index);
-- unique_id_rec_size[4] = sizeof(cur_unique_id.thread_index);
-+ unique_id_rec_offset[1] = APR_OFFSETOF(unique_id_rec, root);
-+ unique_id_rec_size[1] = sizeof(cur_unique_id.root);
-+ unique_id_rec_offset[2] = APR_OFFSETOF(unique_id_rec, counter);
-+ unique_id_rec_size[2] = sizeof(cur_unique_id.counter);
-+ unique_id_rec_offset[3] = APR_OFFSETOF(unique_id_rec, thread_index);
-+ unique_id_rec_size[3] = sizeof(cur_unique_id.thread_index);
- unique_id_rec_total_size = unique_id_rec_size[0] + unique_id_rec_size[1] +
-- unique_id_rec_size[2] + unique_id_rec_size[3] +
-- unique_id_rec_size[4];
-+ unique_id_rec_size[2] + unique_id_rec_size[3];
-
- /*
- * Calculate the size of the structure when encoded.
- */
- unique_id_rec_size_uu = (unique_id_rec_total_size*8+5)/6;
-
-- /*
-- * Now get the global in_addr. Note that it is not sufficient to use one
-- * of the addresses from the main_server, since those aren't as likely to
-- * be unique as the physical address of the machine
-- */
-- if ((rv = apr_gethostname(str, sizeof(str) - 1, p)) != APR_SUCCESS) {
-- ap_log_error(APLOG_MARK, APLOG_ALERT, rv, main_server, APLOGNO(01563)
-- "unable to find hostname of the server");
-- return HTTP_INTERNAL_SERVER_ERROR;
-- }
--
-- if ((rv = apr_sockaddr_info_get(&sockaddr, str, AF_INET, 0, 0, p)) == APR_SUCCESS) {
-- global_in_addr = sockaddr->sa.sin.sin_addr.s_addr;
-- }
-- else {
-- ap_log_error(APLOG_MARK, APLOG_ALERT, rv, main_server, APLOGNO(01564)
-- "unable to find IPv4 address of \"%s\"", str);
--#if APR_HAVE_IPV6
-- if ((rv = apr_sockaddr_info_get(&sockaddr, str, AF_INET6, 0, 0, p)) == APR_SUCCESS) {
-- memcpy(&global_in_addr,
-- (char *)sockaddr->ipaddr_ptr + sockaddr->ipaddr_len - sizeof(global_in_addr),
-- sizeof(global_in_addr));
-- ap_log_error(APLOG_MARK, APLOG_ALERT, rv, main_server, APLOGNO(01565)
-- "using low-order bits of IPv6 address "
-- "as if they were unique");
-- }
-- else
--#endif
-- return HTTP_INTERNAL_SERVER_ERROR;
-- }
--
-- apr_sockaddr_ip_get(&ipaddrstr, sockaddr);
-- ap_log_error(APLOG_MARK, APLOG_INFO, 0, main_server, APLOGNO(01566) "using ip addr %s",
-- ipaddrstr);
--
-- /*
-- * If the server is pummelled with restart requests we could possibly end
-- * up in a situation where we're starting again during the same second
-- * that has been used in previous identifiers. Avoid that situation.
-- *
-- * In truth, for this to actually happen not only would it have to restart
-- * in the same second, but it would have to somehow get the same pids as
-- * one of the other servers that was running in that second. Which would
-- * mean a 64k wraparound on pids ... not very likely at all.
-- *
-- * But protecting against it is relatively cheap. We just sleep into the
-- * next second.
-- */
-- apr_sleep(apr_time_from_sec(1) - apr_time_usec(apr_time_now()));
- return OK;
- }
-
- static void unique_id_child_init(apr_pool_t *p, server_rec *s)
- {
-- pid_t pid;
--
-- /*
-- * Note that we use the pid because it's possible that on the same
-- * physical machine there are multiple servers (i.e. using Listen). But
-- * it's guaranteed that none of them will share the same pids between
-- * children.
-- *
-- * XXX: for multithread this needs to use a pid/tid combo and probably
-- * needs to be expanded to 32 bits
-- */
-- pid = getpid();
-- cur_unique_id.pid = pid;
--
-- /*
-- * Test our assumption that the pid is 32-bits. It's possible that
-- * 64-bit machines will declare pid_t to be 64 bits but only use 32
-- * of them. It would have been really nice to test this during
-- * global_init ... but oh well.
-- */
-- if ((pid_t)cur_unique_id.pid != pid) {
-- ap_log_error(APLOG_MARK, APLOG_CRIT, 0, s, APLOGNO(01567)
-- "oh no! pids are greater than 32-bits! I'm broken!");
-- }
--
-- cur_unique_id.in_addr = global_in_addr;
-+ ap_random_insecure_bytes(&cur_unique_id.root,
-+ sizeof(cur_unique_id.root));
-
- /*
- * If we use 0 as the initial counter we have a little less protection
-@@ -253,13 +170,6 @@
- */
- ap_random_insecure_bytes(&cur_unique_id.counter,
- sizeof(cur_unique_id.counter));
--
-- /*
-- * We must always use network ordering for these bytes, so that
-- * identifiers are comparable between machines of different byte
-- * orderings. Note in_addr is already in network order.
-- */
-- cur_unique_id.pid = htonl(cur_unique_id.pid);
- }
-
- /* NOTE: This is *NOT* the same encoding used by base64encode ... the last two
-@@ -291,10 +201,8 @@
- unsigned short counter;
- int i,j,k;
-
-- new_unique_id.in_addr = cur_unique_id.in_addr;
-- new_unique_id.pid = cur_unique_id.pid;
-+ memcpy(&new_unique_id.root, &cur_unique_id.root, ROOT_SIZE);
- new_unique_id.counter = cur_unique_id.counter;
--
- new_unique_id.stamp = htonl((unsigned int)apr_time_sec(r->request_time));
- new_unique_id.thread_index = htonl((unsigned int)r->connection->id);
-
diff --git a/httpd.spec b/httpd.spec
index 505f241..ad2efc5 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -69,15 +69,12 @@ Patch30: httpd-2.4.4-cachehardmax.patch
Patch31: httpd-2.4.18-sslmultiproxy.patch
Patch34: httpd-2.4.17-socket-activation.patch
Patch35: httpd-2.4.17-sslciphdefault.patch
+
# Bug fixes
-Patch56: httpd-2.4.4-mod_unique_id.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1397243
Patch58: httpd-2.4.25-r1738878.patch
-Patch60: httpd-2.4.27-r1808230.patch
-# Security fixes
-# https://github.com/apache/httpd/commit/4171fbfcb249e63f934471054d7a0752272fb8ee
-Patch61: httpd-2.4.27-fixticketkeys.patch
+# Security fixes
License: ASL 2.0
Group: System Environment/Daemons
@@ -216,12 +213,7 @@ interface for storing and accessing per-user session data.
%patch31 -p1 -b .sslmultiproxy
%patch34 -p1 -b .socketactivation
%patch35 -p1 -b .sslciphdefault
-
-%patch56 -p1 -b .uniqueid
%patch58 -p1 -b .r1738878
-%patch60 -p1 -b .r1808230
-
-%patch61 -p1 -b .ticketkeys
# Patch in the vendor string
sed -i '/^#define PLATFORM/s/Unix/%{vstring}/' os/unix/os.h
From 317bdd7eb806872a5229d626789d328701b37b5f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lubo=C5=A1=20Uhliarik?=
Date: Wed, 25 Oct 2017 14:31:34 +0200
Subject: [PATCH 065/359] new version 2.4.29
---
httpd-2.4.27-fixticketkeys.patch | 65 ---------
httpd-2.4.27-r1808230.patch | 131 -----------------
httpd-2.4.4-mod_unique_id.patch | 239 -------------------------------
httpd.spec | 17 +--
sources | 2 +-
5 files changed, 6 insertions(+), 448 deletions(-)
delete mode 100644 httpd-2.4.27-fixticketkeys.patch
delete mode 100644 httpd-2.4.27-r1808230.patch
delete mode 100644 httpd-2.4.4-mod_unique_id.patch
diff --git a/httpd-2.4.27-fixticketkeys.patch b/httpd-2.4.27-fixticketkeys.patch
deleted file mode 100644
index 3769da9..0000000
--- a/httpd-2.4.27-fixticketkeys.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From 4171fbfcb249e63f934471054d7a0752272fb8ee Mon Sep 17 00:00:00 2001
-From: Yann Ylavic
-Date: Tue, 22 Mar 2016 13:09:17 +0000
-Subject: [PATCH] mod_ssl: return non ambigous value in
- ssl_callback_SessionTicket() for encryption mode (we used to return 0,
- OpenSSL documents returning 1 instead).
-
-Practically this does not change anything since OpenSSL will only check for
->= 0 return value (non error) for encryption mode (the other possible return
-values are only relevant for decryption mode).
-
-However the OpenSSL documentation for SSL_CTX_set_tlsext_ticket_key_cb()
-states:
-"
-The return value of the cb function is used by OpenSSL to determine what
-further processing will occur. The following return values have meaning:
-
-2
- This indicates that the ctx and hctx have been set and the session can
- continue on those parameters. Additionally it indicates that the session
- ticket is in a renewal period and should be replaced. The OpenSSL library
- will call cb again with an enc argument of 1 to set the new ticket (see
- RFC5077 3.3 paragraph 2).
-
-1
- This indicates that the ctx and hctx have been set and the session can
- continue on those parameters.
-
-0
- This indicates that it was not possible to set/retrieve a session ticket
- and the SSL/TLS session will continue by by negotiating a set of
- cryptographic parameters or using the alternate SSL/TLS resumption
- mechanism, session ids.
- If called with enc equal to 0 the library will call the cb again to get a
- new set of parameters.
-
-less than 0
- This indicates an error.
-"
-
-So 0 is not appropriate in our code, 1 is what we really want (and it won't
-break if OpenSSL later changes its checks on the callback return value).
-
-Reported by: oknet on github, pull request #18.
-
-
-
-git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1736186 13f79535-47bb-0310-9956-ffa450edef68
----
- modules/ssl/ssl_engine_kernel.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/modules/ssl/ssl_engine_kernel.c b/modules/ssl/ssl_engine_kernel.c
-index 91da94c4f58..91d5e926d66 100644
---- a/modules/ssl/ssl_engine_kernel.c
-+++ b/modules/ssl/ssl_engine_kernel.c
-@@ -2303,7 +2303,7 @@ int ssl_callback_SessionTicket(SSL *ssl,
- "TLS session ticket key for %s successfully set, "
- "creating new session ticket", sc->vhost_id);
-
-- return 0;
-+ return 1;
- }
- else if (mode == 0) {
- /*
diff --git a/httpd-2.4.27-r1808230.patch b/httpd-2.4.27-r1808230.patch
deleted file mode 100644
index e4062ea..0000000
--- a/httpd-2.4.27-r1808230.patch
+++ /dev/null
@@ -1,131 +0,0 @@
-# ./pullrev.sh 1808230
-http://svn.apache.org/viewvc?view=revision&revision=1808230
-
---- httpd-2.4.27/server/protocol.c
-+++ httpd-2.4.27/server/protocol.c
-@@ -1708,62 +1708,88 @@
- ctx->tmpbb = apr_brigade_create(r->pool, r->connection->bucket_alloc);
- }
-
-- /* Loop through this set of buckets to compute their length
-- */
-+ /* Loop through the brigade to count the length. To avoid
-+ * arbitrary memory consumption with morphing bucket types, this
-+ * loop will stop and pass on the brigade when necessary. */
- e = APR_BRIGADE_FIRST(b);
- while (e != APR_BRIGADE_SENTINEL(b)) {
-+ apr_status_t rv;
-+
- if (APR_BUCKET_IS_EOS(e)) {
- eos = 1;
- break;
- }
-- if (e->length == (apr_size_t)-1) {
-+ /* For a flush bucket, fall through to pass the brigade and
-+ * flush now. */
-+ else if (APR_BUCKET_IS_FLUSH(e)) {
-+ e = APR_BUCKET_NEXT(e);
-+ }
-+ /* For metadata bucket types other than FLUSH, loop. */
-+ else if (APR_BUCKET_IS_METADATA(e)) {
-+ e = APR_BUCKET_NEXT(e);
-+ continue;
-+ }
-+ /* For determinate length data buckets, count the length and
-+ * continue. */
-+ else if (e->length != (apr_size_t)-1) {
-+ r->bytes_sent += e->length;
-+ e = APR_BUCKET_NEXT(e);
-+ continue;
-+ }
-+ /* For indeterminate length data buckets, perform one read. */
-+ else /* e->length == (apr_size_t)-1 */ {
- apr_size_t len;
- const char *ignored;
-- apr_status_t rv;
--
-- /* This is probably a pipe bucket. Send everything
-- * prior to this, and then read the data for this bucket.
-- */
-+
- rv = apr_bucket_read(e, &ignored, &len, eblock);
-+ if ((rv != APR_SUCCESS) && !APR_STATUS_IS_EAGAIN(rv)) {
-+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(00574)
-+ "ap_content_length_filter: "
-+ "apr_bucket_read() failed");
-+ return rv;
-+ }
- if (rv == APR_SUCCESS) {
-- /* Attempt a nonblocking read next time through */
- eblock = APR_NONBLOCK_READ;
-+ e = APR_BUCKET_NEXT(e);
- r->bytes_sent += len;
- }
- else if (APR_STATUS_IS_EAGAIN(rv)) {
-- /* Output everything prior to this bucket, and then
-- * do a blocking read on the next batch.
-- */
-- if (e != APR_BRIGADE_FIRST(b)) {
-- apr_bucket *flush;
-- apr_brigade_split_ex(b, e, ctx->tmpbb);
-- flush = apr_bucket_flush_create(r->connection->bucket_alloc);
-+ apr_bucket *flush;
-
-- APR_BRIGADE_INSERT_TAIL(b, flush);
-- rv = ap_pass_brigade(f->next, b);
-- if (rv != APR_SUCCESS || f->c->aborted) {
-- return rv;
-- }
-- apr_brigade_cleanup(b);
-- APR_BRIGADE_CONCAT(b, ctx->tmpbb);
-- e = APR_BRIGADE_FIRST(b);
-+ /* Next read must block. */
-+ eblock = APR_BLOCK_READ;
-
-- ctx->data_sent = 1;
-- }
-- eblock = APR_BLOCK_READ;
-- continue;
-+ /* Ensure the last bucket to pass down is a flush if
-+ * the next read will block. */
-+ flush = apr_bucket_flush_create(f->c->bucket_alloc);
-+ APR_BUCKET_INSERT_BEFORE(e, flush);
- }
-- else {
-- ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(00574)
-- "ap_content_length_filter: "
-- "apr_bucket_read() failed");
-- return rv;
-- }
- }
-- else {
-- r->bytes_sent += e->length;
-+
-+ /* Optimization: if the next bucket is EOS (directly after a
-+ * bucket morphed to the heap, or a flush), short-cut to
-+ * handle EOS straight away - allowing C-L to be determined
-+ * for content which is already entirely in memory. */
-+ if (e != APR_BRIGADE_SENTINEL(b) && APR_BUCKET_IS_EOS(e)) {
-+ continue;
- }
-- e = APR_BUCKET_NEXT(e);
-+
-+ /* On reaching here, pass on everything in the brigade up to
-+ * this point. */
-+ apr_brigade_split_ex(b, e, ctx->tmpbb);
-+
-+ rv = ap_pass_brigade(f->next, b);
-+ if (rv != APR_SUCCESS) {
-+ return rv;
-+ }
-+ else if (f->c->aborted) {
-+ return APR_ECONNABORTED;
-+ }
-+ apr_brigade_cleanup(b);
-+ APR_BRIGADE_CONCAT(b, ctx->tmpbb);
-+ e = APR_BRIGADE_FIRST(b);
-+
-+ ctx->data_sent = 1;
- }
-
- /* If we've now seen the entire response and it's otherwise
diff --git a/httpd-2.4.4-mod_unique_id.patch b/httpd-2.4.4-mod_unique_id.patch
deleted file mode 100644
index 30bdfe0..0000000
--- a/httpd-2.4.4-mod_unique_id.patch
+++ /dev/null
@@ -1,239 +0,0 @@
---- trunk/modules/metadata/mod_unique_id.c 2011/12/02 23:02:04 1209766
-+++ trunk/modules/metadata/mod_unique_id.c 2013/07/10 16:20:31 1501827
-@@ -31,14 +31,11 @@
- #include "http_log.h"
- #include "http_protocol.h" /* for ap_hook_post_read_request */
-
--#if APR_HAVE_UNISTD_H
--#include /* for getpid() */
--#endif
-+#define ROOT_SIZE 10
-
- typedef struct {
- unsigned int stamp;
-- unsigned int in_addr;
-- unsigned int pid;
-+ char root[ROOT_SIZE];
- unsigned short counter;
- unsigned int thread_index;
- } unique_id_rec;
-@@ -64,20 +61,15 @@
- * gethostbyname (gethostname()) is unique across all the machines at the
- * "site".
- *
-- * We also further assume that pids fit in 32-bits. If something uses more
-- * than 32-bits, the fix is trivial, but it requires the unrolled uuencoding
-- * loop to be extended. * A similar fix is needed to support multithreaded
-- * servers, using a pid/tid combo.
-- *
-- * Together, the in_addr and pid are assumed to absolutely uniquely identify
-- * this one child from all other currently running children on all servers
-- * (including this physical server if it is running multiple httpds) from each
-+ * The root is assumed to absolutely uniquely identify this one child
-+ * from all other currently running children on all servers (including
-+ * this physical server if it is running multiple httpds) from each
- * other.
- *
-- * The stamp and counter are used to distinguish all hits for a particular
-- * (in_addr,pid) pair. The stamp is updated using r->request_time,
-- * saving cpu cycles. The counter is never reset, and is used to permit up to
-- * 64k requests in a single second by a single child.
-+ * The stamp and counter are used to distinguish all hits for a
-+ * particular root. The stamp is updated using r->request_time,
-+ * saving cpu cycles. The counter is never reset, and is used to
-+ * permit up to 64k requests in a single second by a single child.
- *
- * The 144-bits of unique_id_rec are encoded using the alphabet
- * [A-Za-z0-9@-], resulting in 24 bytes of printable characters. That is then
-@@ -92,7 +84,7 @@
- * module change.
- *
- * It is highly desirable that identifiers exist for "eternity". But future
-- * needs (such as much faster webservers, moving to 64-bit pids, or moving to a
-+ * needs (such as much faster webservers, or moving to a
- * multithreaded server) may dictate a need to change the contents of
- * unique_id_rec. Such a future implementation should ensure that the first
- * field is still a time_t stamp. By doing that, it is possible for a site to
-@@ -100,7 +92,15 @@
- * wait one entire second, and then start all of their new-servers. This
- * procedure will ensure that the new space of identifiers is completely unique
- * from the old space. (Since the first four unencoded bytes always differ.)
-+ *
-+ * Note: previous implementations used 32-bits of IP address plus pid
-+ * in place of the PRNG output in the "root" field. This was
-+ * insufficient for IPv6-only hosts, required working DNS to determine
-+ * a unique IP address (fragile), and needed a [0, 1) second sleep
-+ * call at startup to avoid pid reuse. Use of the PRNG avoids all
-+ * these issues.
- */
-+
- /*
- * Sun Jun 7 05:43:49 CEST 1998 -- Alvaro
- * More comments:
-@@ -116,8 +116,6 @@
- * htonl/ntohl. Well, this shouldn't be a problem till year 2106.
- */
-
--static unsigned global_in_addr;
--
- /*
- * XXX: We should have a per-thread counter and not use cur_unique_id.counter
- * XXX: in all threads, because this is bad for performance on multi-processor
-@@ -129,7 +127,7 @@
- /*
- * Number of elements in the structure unique_id_rec.
- */
--#define UNIQUE_ID_REC_MAX 5
-+#define UNIQUE_ID_REC_MAX 4
-
- static unsigned short unique_id_rec_offset[UNIQUE_ID_REC_MAX],
- unique_id_rec_size[UNIQUE_ID_REC_MAX],
-@@ -138,113 +136,32 @@
-
- static int unique_id_global_init(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *main_server)
- {
-- char str[APRMAXHOSTLEN + 1];
-- apr_status_t rv;
-- char *ipaddrstr;
-- apr_sockaddr_t *sockaddr;
--
- /*
- * Calculate the sizes and offsets in cur_unique_id.
- */
- unique_id_rec_offset[0] = APR_OFFSETOF(unique_id_rec, stamp);
- unique_id_rec_size[0] = sizeof(cur_unique_id.stamp);
-- unique_id_rec_offset[1] = APR_OFFSETOF(unique_id_rec, in_addr);
-- unique_id_rec_size[1] = sizeof(cur_unique_id.in_addr);
-- unique_id_rec_offset[2] = APR_OFFSETOF(unique_id_rec, pid);
-- unique_id_rec_size[2] = sizeof(cur_unique_id.pid);
-- unique_id_rec_offset[3] = APR_OFFSETOF(unique_id_rec, counter);
-- unique_id_rec_size[3] = sizeof(cur_unique_id.counter);
-- unique_id_rec_offset[4] = APR_OFFSETOF(unique_id_rec, thread_index);
-- unique_id_rec_size[4] = sizeof(cur_unique_id.thread_index);
-+ unique_id_rec_offset[1] = APR_OFFSETOF(unique_id_rec, root);
-+ unique_id_rec_size[1] = sizeof(cur_unique_id.root);
-+ unique_id_rec_offset[2] = APR_OFFSETOF(unique_id_rec, counter);
-+ unique_id_rec_size[2] = sizeof(cur_unique_id.counter);
-+ unique_id_rec_offset[3] = APR_OFFSETOF(unique_id_rec, thread_index);
-+ unique_id_rec_size[3] = sizeof(cur_unique_id.thread_index);
- unique_id_rec_total_size = unique_id_rec_size[0] + unique_id_rec_size[1] +
-- unique_id_rec_size[2] + unique_id_rec_size[3] +
-- unique_id_rec_size[4];
-+ unique_id_rec_size[2] + unique_id_rec_size[3];
-
- /*
- * Calculate the size of the structure when encoded.
- */
- unique_id_rec_size_uu = (unique_id_rec_total_size*8+5)/6;
-
-- /*
-- * Now get the global in_addr. Note that it is not sufficient to use one
-- * of the addresses from the main_server, since those aren't as likely to
-- * be unique as the physical address of the machine
-- */
-- if ((rv = apr_gethostname(str, sizeof(str) - 1, p)) != APR_SUCCESS) {
-- ap_log_error(APLOG_MARK, APLOG_ALERT, rv, main_server, APLOGNO(01563)
-- "unable to find hostname of the server");
-- return HTTP_INTERNAL_SERVER_ERROR;
-- }
--
-- if ((rv = apr_sockaddr_info_get(&sockaddr, str, AF_INET, 0, 0, p)) == APR_SUCCESS) {
-- global_in_addr = sockaddr->sa.sin.sin_addr.s_addr;
-- }
-- else {
-- ap_log_error(APLOG_MARK, APLOG_ALERT, rv, main_server, APLOGNO(01564)
-- "unable to find IPv4 address of \"%s\"", str);
--#if APR_HAVE_IPV6
-- if ((rv = apr_sockaddr_info_get(&sockaddr, str, AF_INET6, 0, 0, p)) == APR_SUCCESS) {
-- memcpy(&global_in_addr,
-- (char *)sockaddr->ipaddr_ptr + sockaddr->ipaddr_len - sizeof(global_in_addr),
-- sizeof(global_in_addr));
-- ap_log_error(APLOG_MARK, APLOG_ALERT, rv, main_server, APLOGNO(01565)
-- "using low-order bits of IPv6 address "
-- "as if they were unique");
-- }
-- else
--#endif
-- return HTTP_INTERNAL_SERVER_ERROR;
-- }
--
-- apr_sockaddr_ip_get(&ipaddrstr, sockaddr);
-- ap_log_error(APLOG_MARK, APLOG_INFO, 0, main_server, APLOGNO(01566) "using ip addr %s",
-- ipaddrstr);
--
-- /*
-- * If the server is pummelled with restart requests we could possibly end
-- * up in a situation where we're starting again during the same second
-- * that has been used in previous identifiers. Avoid that situation.
-- *
-- * In truth, for this to actually happen not only would it have to restart
-- * in the same second, but it would have to somehow get the same pids as
-- * one of the other servers that was running in that second. Which would
-- * mean a 64k wraparound on pids ... not very likely at all.
-- *
-- * But protecting against it is relatively cheap. We just sleep into the
-- * next second.
-- */
-- apr_sleep(apr_time_from_sec(1) - apr_time_usec(apr_time_now()));
- return OK;
- }
-
- static void unique_id_child_init(apr_pool_t *p, server_rec *s)
- {
-- pid_t pid;
--
-- /*
-- * Note that we use the pid because it's possible that on the same
-- * physical machine there are multiple servers (i.e. using Listen). But
-- * it's guaranteed that none of them will share the same pids between
-- * children.
-- *
-- * XXX: for multithread this needs to use a pid/tid combo and probably
-- * needs to be expanded to 32 bits
-- */
-- pid = getpid();
-- cur_unique_id.pid = pid;
--
-- /*
-- * Test our assumption that the pid is 32-bits. It's possible that
-- * 64-bit machines will declare pid_t to be 64 bits but only use 32
-- * of them. It would have been really nice to test this during
-- * global_init ... but oh well.
-- */
-- if ((pid_t)cur_unique_id.pid != pid) {
-- ap_log_error(APLOG_MARK, APLOG_CRIT, 0, s, APLOGNO(01567)
-- "oh no! pids are greater than 32-bits! I'm broken!");
-- }
--
-- cur_unique_id.in_addr = global_in_addr;
-+ ap_random_insecure_bytes(&cur_unique_id.root,
-+ sizeof(cur_unique_id.root));
-
- /*
- * If we use 0 as the initial counter we have a little less protection
-@@ -253,13 +170,6 @@
- */
- ap_random_insecure_bytes(&cur_unique_id.counter,
- sizeof(cur_unique_id.counter));
--
-- /*
-- * We must always use network ordering for these bytes, so that
-- * identifiers are comparable between machines of different byte
-- * orderings. Note in_addr is already in network order.
-- */
-- cur_unique_id.pid = htonl(cur_unique_id.pid);
- }
-
- /* NOTE: This is *NOT* the same encoding used by base64encode ... the last two
-@@ -291,10 +201,8 @@
- unsigned short counter;
- int i,j,k;
-
-- new_unique_id.in_addr = cur_unique_id.in_addr;
-- new_unique_id.pid = cur_unique_id.pid;
-+ memcpy(&new_unique_id.root, &cur_unique_id.root, ROOT_SIZE);
- new_unique_id.counter = cur_unique_id.counter;
--
- new_unique_id.stamp = htonl((unsigned int)apr_time_sec(r->request_time));
- new_unique_id.thread_index = htonl((unsigned int)r->connection->id);
-
diff --git a/httpd.spec b/httpd.spec
index d85b687..59bff19 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -12,8 +12,8 @@
Summary: Apache HTTP Server
Name: httpd
-Version: 2.4.28
-Release: 3%{?dist}
+Version: 2.4.29
+Release: 1%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -70,15 +70,10 @@ Patch31: httpd-2.4.18-sslmultiproxy.patch
Patch34: httpd-2.4.17-socket-activation.patch
Patch35: httpd-2.4.17-sslciphdefault.patch
# Bug fixes
-Patch56: httpd-2.4.4-mod_unique_id.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1397243
Patch58: httpd-2.4.25-r1738878.patch
-Patch60: httpd-2.4.27-r1808230.patch
# Security fixes
-# https://github.com/apache/httpd/commit/4171fbfcb249e63f934471054d7a0752272fb8ee
-Patch61: httpd-2.4.27-fixticketkeys.patch
-
License: ASL 2.0
Group: System Environment/Daemons
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
@@ -216,12 +211,7 @@ interface for storing and accessing per-user session data.
%patch31 -p1 -b .sslmultiproxy
%patch34 -p1 -b .socketactivation
%patch35 -p1 -b .sslciphdefault
-
-%patch56 -p1 -b .uniqueid
%patch58 -p1 -b .r1738878
-%patch60 -p1 -b .r1808230
-
-%patch61 -p1 -b .ticketkeys
# Patch in the vendor string
sed -i '/^#define PLATFORM/s/Unix/%{vstring}/' os/unix/os.h
@@ -689,6 +679,9 @@ rm -rf $RPM_BUILD_ROOT
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Wed Oct 25 2017 Luboš Uhliarik - 2.4.29-1
+- new version 2.4.29
+
* Tue Oct 10 2017 Joe Orton - 2.4.28-3
- drop obsolete Obsoletes
- update docs, Summary
diff --git a/sources b/sources
index 2db6285..6978287 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (httpd-2.4.28.tar.bz2) = 8de8e32b87e6de220e492e74db9df0882fae11c3b9732f3d3316da048c04767ac4429c0433c36f87d8705263e3376f97a7e1f66a9d7a518632a67b6fe617590a
+SHA512 (httpd-2.4.29.tar.bz2) = 840982fd3d21463bc5c1747f211dfacf3abdf634d149e49bb49fd2e5deda140de602dbdf31e1bbe5337a48f718ab2261c408e83a8dd39a9291ee7b6b7a85639a
From 7eca232f16fca8ef27cf94e1c45b3c4f63cd5447 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lubo=C5=A1=20Uhliarik?=
Date: Wed, 25 Oct 2017 14:57:17 +0200
Subject: [PATCH 066/359] new version 2.4.29
---
.gitignore | 1 +
httpd-2.4.27-fixticketkeys.patch | 65 ---------
httpd-2.4.27-r1808230.patch | 131 -----------------
httpd-2.4.4-mod_unique_id.patch | 239 -------------------------------
httpd.spec | 14 +-
sources | 2 +-
6 files changed, 6 insertions(+), 446 deletions(-)
delete mode 100644 httpd-2.4.27-fixticketkeys.patch
delete mode 100644 httpd-2.4.27-r1808230.patch
delete mode 100644 httpd-2.4.4-mod_unique_id.patch
diff --git a/.gitignore b/.gitignore
index 2f07a6e..b1c1924 100644
--- a/.gitignore
+++ b/.gitignore
@@ -29,3 +29,4 @@ x86_64
/httpd-2.4.26.tar.bz2
/httpd-2.4.27.tar.bz2
/httpd-2.4.28.tar.bz2
+/httpd-2.4.29.tar.bz2
diff --git a/httpd-2.4.27-fixticketkeys.patch b/httpd-2.4.27-fixticketkeys.patch
deleted file mode 100644
index 3769da9..0000000
--- a/httpd-2.4.27-fixticketkeys.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From 4171fbfcb249e63f934471054d7a0752272fb8ee Mon Sep 17 00:00:00 2001
-From: Yann Ylavic
-Date: Tue, 22 Mar 2016 13:09:17 +0000
-Subject: [PATCH] mod_ssl: return non ambigous value in
- ssl_callback_SessionTicket() for encryption mode (we used to return 0,
- OpenSSL documents returning 1 instead).
-
-Practically this does not change anything since OpenSSL will only check for
->= 0 return value (non error) for encryption mode (the other possible return
-values are only relevant for decryption mode).
-
-However the OpenSSL documentation for SSL_CTX_set_tlsext_ticket_key_cb()
-states:
-"
-The return value of the cb function is used by OpenSSL to determine what
-further processing will occur. The following return values have meaning:
-
-2
- This indicates that the ctx and hctx have been set and the session can
- continue on those parameters. Additionally it indicates that the session
- ticket is in a renewal period and should be replaced. The OpenSSL library
- will call cb again with an enc argument of 1 to set the new ticket (see
- RFC5077 3.3 paragraph 2).
-
-1
- This indicates that the ctx and hctx have been set and the session can
- continue on those parameters.
-
-0
- This indicates that it was not possible to set/retrieve a session ticket
- and the SSL/TLS session will continue by by negotiating a set of
- cryptographic parameters or using the alternate SSL/TLS resumption
- mechanism, session ids.
- If called with enc equal to 0 the library will call the cb again to get a
- new set of parameters.
-
-less than 0
- This indicates an error.
-"
-
-So 0 is not appropriate in our code, 1 is what we really want (and it won't
-break if OpenSSL later changes its checks on the callback return value).
-
-Reported by: oknet on github, pull request #18.
-
-
-
-git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1736186 13f79535-47bb-0310-9956-ffa450edef68
----
- modules/ssl/ssl_engine_kernel.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/modules/ssl/ssl_engine_kernel.c b/modules/ssl/ssl_engine_kernel.c
-index 91da94c4f58..91d5e926d66 100644
---- a/modules/ssl/ssl_engine_kernel.c
-+++ b/modules/ssl/ssl_engine_kernel.c
-@@ -2303,7 +2303,7 @@ int ssl_callback_SessionTicket(SSL *ssl,
- "TLS session ticket key for %s successfully set, "
- "creating new session ticket", sc->vhost_id);
-
-- return 0;
-+ return 1;
- }
- else if (mode == 0) {
- /*
diff --git a/httpd-2.4.27-r1808230.patch b/httpd-2.4.27-r1808230.patch
deleted file mode 100644
index e4062ea..0000000
--- a/httpd-2.4.27-r1808230.patch
+++ /dev/null
@@ -1,131 +0,0 @@
-# ./pullrev.sh 1808230
-http://svn.apache.org/viewvc?view=revision&revision=1808230
-
---- httpd-2.4.27/server/protocol.c
-+++ httpd-2.4.27/server/protocol.c
-@@ -1708,62 +1708,88 @@
- ctx->tmpbb = apr_brigade_create(r->pool, r->connection->bucket_alloc);
- }
-
-- /* Loop through this set of buckets to compute their length
-- */
-+ /* Loop through the brigade to count the length. To avoid
-+ * arbitrary memory consumption with morphing bucket types, this
-+ * loop will stop and pass on the brigade when necessary. */
- e = APR_BRIGADE_FIRST(b);
- while (e != APR_BRIGADE_SENTINEL(b)) {
-+ apr_status_t rv;
-+
- if (APR_BUCKET_IS_EOS(e)) {
- eos = 1;
- break;
- }
-- if (e->length == (apr_size_t)-1) {
-+ /* For a flush bucket, fall through to pass the brigade and
-+ * flush now. */
-+ else if (APR_BUCKET_IS_FLUSH(e)) {
-+ e = APR_BUCKET_NEXT(e);
-+ }
-+ /* For metadata bucket types other than FLUSH, loop. */
-+ else if (APR_BUCKET_IS_METADATA(e)) {
-+ e = APR_BUCKET_NEXT(e);
-+ continue;
-+ }
-+ /* For determinate length data buckets, count the length and
-+ * continue. */
-+ else if (e->length != (apr_size_t)-1) {
-+ r->bytes_sent += e->length;
-+ e = APR_BUCKET_NEXT(e);
-+ continue;
-+ }
-+ /* For indeterminate length data buckets, perform one read. */
-+ else /* e->length == (apr_size_t)-1 */ {
- apr_size_t len;
- const char *ignored;
-- apr_status_t rv;
--
-- /* This is probably a pipe bucket. Send everything
-- * prior to this, and then read the data for this bucket.
-- */
-+
- rv = apr_bucket_read(e, &ignored, &len, eblock);
-+ if ((rv != APR_SUCCESS) && !APR_STATUS_IS_EAGAIN(rv)) {
-+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(00574)
-+ "ap_content_length_filter: "
-+ "apr_bucket_read() failed");
-+ return rv;
-+ }
- if (rv == APR_SUCCESS) {
-- /* Attempt a nonblocking read next time through */
- eblock = APR_NONBLOCK_READ;
-+ e = APR_BUCKET_NEXT(e);
- r->bytes_sent += len;
- }
- else if (APR_STATUS_IS_EAGAIN(rv)) {
-- /* Output everything prior to this bucket, and then
-- * do a blocking read on the next batch.
-- */
-- if (e != APR_BRIGADE_FIRST(b)) {
-- apr_bucket *flush;
-- apr_brigade_split_ex(b, e, ctx->tmpbb);
-- flush = apr_bucket_flush_create(r->connection->bucket_alloc);
-+ apr_bucket *flush;
-
-- APR_BRIGADE_INSERT_TAIL(b, flush);
-- rv = ap_pass_brigade(f->next, b);
-- if (rv != APR_SUCCESS || f->c->aborted) {
-- return rv;
-- }
-- apr_brigade_cleanup(b);
-- APR_BRIGADE_CONCAT(b, ctx->tmpbb);
-- e = APR_BRIGADE_FIRST(b);
-+ /* Next read must block. */
-+ eblock = APR_BLOCK_READ;
-
-- ctx->data_sent = 1;
-- }
-- eblock = APR_BLOCK_READ;
-- continue;
-+ /* Ensure the last bucket to pass down is a flush if
-+ * the next read will block. */
-+ flush = apr_bucket_flush_create(f->c->bucket_alloc);
-+ APR_BUCKET_INSERT_BEFORE(e, flush);
- }
-- else {
-- ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(00574)
-- "ap_content_length_filter: "
-- "apr_bucket_read() failed");
-- return rv;
-- }
- }
-- else {
-- r->bytes_sent += e->length;
-+
-+ /* Optimization: if the next bucket is EOS (directly after a
-+ * bucket morphed to the heap, or a flush), short-cut to
-+ * handle EOS straight away - allowing C-L to be determined
-+ * for content which is already entirely in memory. */
-+ if (e != APR_BRIGADE_SENTINEL(b) && APR_BUCKET_IS_EOS(e)) {
-+ continue;
- }
-- e = APR_BUCKET_NEXT(e);
-+
-+ /* On reaching here, pass on everything in the brigade up to
-+ * this point. */
-+ apr_brigade_split_ex(b, e, ctx->tmpbb);
-+
-+ rv = ap_pass_brigade(f->next, b);
-+ if (rv != APR_SUCCESS) {
-+ return rv;
-+ }
-+ else if (f->c->aborted) {
-+ return APR_ECONNABORTED;
-+ }
-+ apr_brigade_cleanup(b);
-+ APR_BRIGADE_CONCAT(b, ctx->tmpbb);
-+ e = APR_BRIGADE_FIRST(b);
-+
-+ ctx->data_sent = 1;
- }
-
- /* If we've now seen the entire response and it's otherwise
diff --git a/httpd-2.4.4-mod_unique_id.patch b/httpd-2.4.4-mod_unique_id.patch
deleted file mode 100644
index 30bdfe0..0000000
--- a/httpd-2.4.4-mod_unique_id.patch
+++ /dev/null
@@ -1,239 +0,0 @@
---- trunk/modules/metadata/mod_unique_id.c 2011/12/02 23:02:04 1209766
-+++ trunk/modules/metadata/mod_unique_id.c 2013/07/10 16:20:31 1501827
-@@ -31,14 +31,11 @@
- #include "http_log.h"
- #include "http_protocol.h" /* for ap_hook_post_read_request */
-
--#if APR_HAVE_UNISTD_H
--#include /* for getpid() */
--#endif
-+#define ROOT_SIZE 10
-
- typedef struct {
- unsigned int stamp;
-- unsigned int in_addr;
-- unsigned int pid;
-+ char root[ROOT_SIZE];
- unsigned short counter;
- unsigned int thread_index;
- } unique_id_rec;
-@@ -64,20 +61,15 @@
- * gethostbyname (gethostname()) is unique across all the machines at the
- * "site".
- *
-- * We also further assume that pids fit in 32-bits. If something uses more
-- * than 32-bits, the fix is trivial, but it requires the unrolled uuencoding
-- * loop to be extended. * A similar fix is needed to support multithreaded
-- * servers, using a pid/tid combo.
-- *
-- * Together, the in_addr and pid are assumed to absolutely uniquely identify
-- * this one child from all other currently running children on all servers
-- * (including this physical server if it is running multiple httpds) from each
-+ * The root is assumed to absolutely uniquely identify this one child
-+ * from all other currently running children on all servers (including
-+ * this physical server if it is running multiple httpds) from each
- * other.
- *
-- * The stamp and counter are used to distinguish all hits for a particular
-- * (in_addr,pid) pair. The stamp is updated using r->request_time,
-- * saving cpu cycles. The counter is never reset, and is used to permit up to
-- * 64k requests in a single second by a single child.
-+ * The stamp and counter are used to distinguish all hits for a
-+ * particular root. The stamp is updated using r->request_time,
-+ * saving cpu cycles. The counter is never reset, and is used to
-+ * permit up to 64k requests in a single second by a single child.
- *
- * The 144-bits of unique_id_rec are encoded using the alphabet
- * [A-Za-z0-9@-], resulting in 24 bytes of printable characters. That is then
-@@ -92,7 +84,7 @@
- * module change.
- *
- * It is highly desirable that identifiers exist for "eternity". But future
-- * needs (such as much faster webservers, moving to 64-bit pids, or moving to a
-+ * needs (such as much faster webservers, or moving to a
- * multithreaded server) may dictate a need to change the contents of
- * unique_id_rec. Such a future implementation should ensure that the first
- * field is still a time_t stamp. By doing that, it is possible for a site to
-@@ -100,7 +92,15 @@
- * wait one entire second, and then start all of their new-servers. This
- * procedure will ensure that the new space of identifiers is completely unique
- * from the old space. (Since the first four unencoded bytes always differ.)
-+ *
-+ * Note: previous implementations used 32-bits of IP address plus pid
-+ * in place of the PRNG output in the "root" field. This was
-+ * insufficient for IPv6-only hosts, required working DNS to determine
-+ * a unique IP address (fragile), and needed a [0, 1) second sleep
-+ * call at startup to avoid pid reuse. Use of the PRNG avoids all
-+ * these issues.
- */
-+
- /*
- * Sun Jun 7 05:43:49 CEST 1998 -- Alvaro
- * More comments:
-@@ -116,8 +116,6 @@
- * htonl/ntohl. Well, this shouldn't be a problem till year 2106.
- */
-
--static unsigned global_in_addr;
--
- /*
- * XXX: We should have a per-thread counter and not use cur_unique_id.counter
- * XXX: in all threads, because this is bad for performance on multi-processor
-@@ -129,7 +127,7 @@
- /*
- * Number of elements in the structure unique_id_rec.
- */
--#define UNIQUE_ID_REC_MAX 5
-+#define UNIQUE_ID_REC_MAX 4
-
- static unsigned short unique_id_rec_offset[UNIQUE_ID_REC_MAX],
- unique_id_rec_size[UNIQUE_ID_REC_MAX],
-@@ -138,113 +136,32 @@
-
- static int unique_id_global_init(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *main_server)
- {
-- char str[APRMAXHOSTLEN + 1];
-- apr_status_t rv;
-- char *ipaddrstr;
-- apr_sockaddr_t *sockaddr;
--
- /*
- * Calculate the sizes and offsets in cur_unique_id.
- */
- unique_id_rec_offset[0] = APR_OFFSETOF(unique_id_rec, stamp);
- unique_id_rec_size[0] = sizeof(cur_unique_id.stamp);
-- unique_id_rec_offset[1] = APR_OFFSETOF(unique_id_rec, in_addr);
-- unique_id_rec_size[1] = sizeof(cur_unique_id.in_addr);
-- unique_id_rec_offset[2] = APR_OFFSETOF(unique_id_rec, pid);
-- unique_id_rec_size[2] = sizeof(cur_unique_id.pid);
-- unique_id_rec_offset[3] = APR_OFFSETOF(unique_id_rec, counter);
-- unique_id_rec_size[3] = sizeof(cur_unique_id.counter);
-- unique_id_rec_offset[4] = APR_OFFSETOF(unique_id_rec, thread_index);
-- unique_id_rec_size[4] = sizeof(cur_unique_id.thread_index);
-+ unique_id_rec_offset[1] = APR_OFFSETOF(unique_id_rec, root);
-+ unique_id_rec_size[1] = sizeof(cur_unique_id.root);
-+ unique_id_rec_offset[2] = APR_OFFSETOF(unique_id_rec, counter);
-+ unique_id_rec_size[2] = sizeof(cur_unique_id.counter);
-+ unique_id_rec_offset[3] = APR_OFFSETOF(unique_id_rec, thread_index);
-+ unique_id_rec_size[3] = sizeof(cur_unique_id.thread_index);
- unique_id_rec_total_size = unique_id_rec_size[0] + unique_id_rec_size[1] +
-- unique_id_rec_size[2] + unique_id_rec_size[3] +
-- unique_id_rec_size[4];
-+ unique_id_rec_size[2] + unique_id_rec_size[3];
-
- /*
- * Calculate the size of the structure when encoded.
- */
- unique_id_rec_size_uu = (unique_id_rec_total_size*8+5)/6;
-
-- /*
-- * Now get the global in_addr. Note that it is not sufficient to use one
-- * of the addresses from the main_server, since those aren't as likely to
-- * be unique as the physical address of the machine
-- */
-- if ((rv = apr_gethostname(str, sizeof(str) - 1, p)) != APR_SUCCESS) {
-- ap_log_error(APLOG_MARK, APLOG_ALERT, rv, main_server, APLOGNO(01563)
-- "unable to find hostname of the server");
-- return HTTP_INTERNAL_SERVER_ERROR;
-- }
--
-- if ((rv = apr_sockaddr_info_get(&sockaddr, str, AF_INET, 0, 0, p)) == APR_SUCCESS) {
-- global_in_addr = sockaddr->sa.sin.sin_addr.s_addr;
-- }
-- else {
-- ap_log_error(APLOG_MARK, APLOG_ALERT, rv, main_server, APLOGNO(01564)
-- "unable to find IPv4 address of \"%s\"", str);
--#if APR_HAVE_IPV6
-- if ((rv = apr_sockaddr_info_get(&sockaddr, str, AF_INET6, 0, 0, p)) == APR_SUCCESS) {
-- memcpy(&global_in_addr,
-- (char *)sockaddr->ipaddr_ptr + sockaddr->ipaddr_len - sizeof(global_in_addr),
-- sizeof(global_in_addr));
-- ap_log_error(APLOG_MARK, APLOG_ALERT, rv, main_server, APLOGNO(01565)
-- "using low-order bits of IPv6 address "
-- "as if they were unique");
-- }
-- else
--#endif
-- return HTTP_INTERNAL_SERVER_ERROR;
-- }
--
-- apr_sockaddr_ip_get(&ipaddrstr, sockaddr);
-- ap_log_error(APLOG_MARK, APLOG_INFO, 0, main_server, APLOGNO(01566) "using ip addr %s",
-- ipaddrstr);
--
-- /*
-- * If the server is pummelled with restart requests we could possibly end
-- * up in a situation where we're starting again during the same second
-- * that has been used in previous identifiers. Avoid that situation.
-- *
-- * In truth, for this to actually happen not only would it have to restart
-- * in the same second, but it would have to somehow get the same pids as
-- * one of the other servers that was running in that second. Which would
-- * mean a 64k wraparound on pids ... not very likely at all.
-- *
-- * But protecting against it is relatively cheap. We just sleep into the
-- * next second.
-- */
-- apr_sleep(apr_time_from_sec(1) - apr_time_usec(apr_time_now()));
- return OK;
- }
-
- static void unique_id_child_init(apr_pool_t *p, server_rec *s)
- {
-- pid_t pid;
--
-- /*
-- * Note that we use the pid because it's possible that on the same
-- * physical machine there are multiple servers (i.e. using Listen). But
-- * it's guaranteed that none of them will share the same pids between
-- * children.
-- *
-- * XXX: for multithread this needs to use a pid/tid combo and probably
-- * needs to be expanded to 32 bits
-- */
-- pid = getpid();
-- cur_unique_id.pid = pid;
--
-- /*
-- * Test our assumption that the pid is 32-bits. It's possible that
-- * 64-bit machines will declare pid_t to be 64 bits but only use 32
-- * of them. It would have been really nice to test this during
-- * global_init ... but oh well.
-- */
-- if ((pid_t)cur_unique_id.pid != pid) {
-- ap_log_error(APLOG_MARK, APLOG_CRIT, 0, s, APLOGNO(01567)
-- "oh no! pids are greater than 32-bits! I'm broken!");
-- }
--
-- cur_unique_id.in_addr = global_in_addr;
-+ ap_random_insecure_bytes(&cur_unique_id.root,
-+ sizeof(cur_unique_id.root));
-
- /*
- * If we use 0 as the initial counter we have a little less protection
-@@ -253,13 +170,6 @@
- */
- ap_random_insecure_bytes(&cur_unique_id.counter,
- sizeof(cur_unique_id.counter));
--
-- /*
-- * We must always use network ordering for these bytes, so that
-- * identifiers are comparable between machines of different byte
-- * orderings. Note in_addr is already in network order.
-- */
-- cur_unique_id.pid = htonl(cur_unique_id.pid);
- }
-
- /* NOTE: This is *NOT* the same encoding used by base64encode ... the last two
-@@ -291,10 +201,8 @@
- unsigned short counter;
- int i,j,k;
-
-- new_unique_id.in_addr = cur_unique_id.in_addr;
-- new_unique_id.pid = cur_unique_id.pid;
-+ memcpy(&new_unique_id.root, &cur_unique_id.root, ROOT_SIZE);
- new_unique_id.counter = cur_unique_id.counter;
--
- new_unique_id.stamp = htonl((unsigned int)apr_time_sec(r->request_time));
- new_unique_id.thread_index = htonl((unsigned int)r->connection->id);
-
diff --git a/httpd.spec b/httpd.spec
index 379021a..c82b88a 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -7,7 +7,7 @@
Summary: Apache HTTP Server
Name: httpd
-Version: 2.4.28
+Version: 2.4.29
Release: 1%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
@@ -63,15 +63,10 @@ Patch31: httpd-2.4.18-sslmultiproxy.patch
Patch34: httpd-2.4.17-socket-activation.patch
Patch35: httpd-2.4.17-sslciphdefault.patch
# Bug fixes
-Patch56: httpd-2.4.4-mod_unique_id.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1397243
Patch58: httpd-2.4.25-r1738878.patch
-Patch60: httpd-2.4.27-r1808230.patch
# Security fixes
-# https://github.com/apache/httpd/commit/4171fbfcb249e63f934471054d7a0752272fb8ee
-Patch61: httpd-2.4.27-fixticketkeys.patch
-
License: ASL 2.0
Group: System Environment/Daemons
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
@@ -213,11 +208,7 @@ interface for storing and accessing per-user session data.
%patch34 -p1 -b .socketactivation
%patch35 -p1 -b .sslciphdefault
-%patch56 -p1 -b .uniqueid
%patch58 -p1 -b .r1738878
-%patch60 -p1 -b .r1808230
-
-%patch61 -p1 -b .ticketkeys
# Patch in the vendor string
sed -i '/^#define PLATFORM/s/Unix/%{vstring}/' os/unix/os.h
@@ -697,6 +688,9 @@ rm -rf $RPM_BUILD_ROOT
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Wed Oct 25 2017 Luboš Uhliarik - 2.4.29-1
+- new version 2.4.29
+
* Tue Oct 10 2017 Luboš Uhliarik - 2.4.28-1
- new version 2.4.28
diff --git a/sources b/sources
index 2db6285..6978287 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (httpd-2.4.28.tar.bz2) = 8de8e32b87e6de220e492e74db9df0882fae11c3b9732f3d3316da048c04767ac4429c0433c36f87d8705263e3376f97a7e1f66a9d7a518632a67b6fe617590a
+SHA512 (httpd-2.4.29.tar.bz2) = 840982fd3d21463bc5c1747f211dfacf3abdf634d149e49bb49fd2e5deda140de602dbdf31e1bbe5337a48f718ab2261c408e83a8dd39a9291ee7b6b7a85639a
From 9c91812414ae30246f37b11c46ba579f89ab3ecb Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Fri, 3 Nov 2017 16:52:50 +0000
Subject: [PATCH 067/359] Add docs on using socket activation.
---
httpd.service.xml | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/httpd.service.xml b/httpd.service.xml
index 4402ed5..b8fe7b3 100644
--- a/httpd.service.xml
+++ b/httpd.service.xml
@@ -221,6 +221,31 @@ Wants=network-online.target
+
+ Socket activation
+
+ Socket activation (see
+ systemd.socket5
+ for more information) can be used with httpd
+ by enabling the httpd.socket unit. The
+ httpd listener configuration must exactly
+ match the ListenStream options configured for
+ the httpd.socket unit. The default
+ httpd.socket has a
+ ListenStream=80 and, if mod_ssl is installed,
+ ListenStream=443 by a drop-in file. If
+ additional Listen directives are added to the
+ httpd configuration, corresponding
+ ListenStream options should be added via
+ drop-in files, for example via systemctl edit
+ httpd.socket.
+
+ If using socket activation with httpd, only one listener
+ on any given TCP port is supported; a configuration with both
+ "Listen 127.0.0.1:80" and "Listen
+ 192.168.1.2:80" will not work.
+
+
@@ -240,6 +265,7 @@ Wants=network-online.target
systemctl1,
systemd.service5,
systemd.exec5,
+ systemd.socket5,
httpd_selinux8,
semanage8
From 4533b4fe588d174b12ce97d18ed0c10189c32b45 Mon Sep 17 00:00:00 2001
From: Yevhenii Shapovalov
Date: Thu, 16 Nov 2017 12:27:52 +0200
Subject: [PATCH 068/359] add tests with standart test interface
---
tests/httpd-php-mysql-sanity-test/Makefile | 67 ++++++++++++
tests/httpd-php-mysql-sanity-test/PURPOSE | 3 +
.../httpd-php-mysql-sanity-test/new_mysql.php | 12 +++
.../httpd-php-mysql-sanity-test/old_mysql.php | 12 +++
.../php_mysql_test.conf | 5 +
.../php_mysql_test.sql | 6 ++
tests/httpd-php-mysql-sanity-test/runtest.sh | 102 ++++++++++++++++++
tests/tests.yml | 15 +++
8 files changed, 222 insertions(+)
create mode 100644 tests/httpd-php-mysql-sanity-test/Makefile
create mode 100644 tests/httpd-php-mysql-sanity-test/PURPOSE
create mode 100644 tests/httpd-php-mysql-sanity-test/new_mysql.php
create mode 100644 tests/httpd-php-mysql-sanity-test/old_mysql.php
create mode 100644 tests/httpd-php-mysql-sanity-test/php_mysql_test.conf
create mode 100644 tests/httpd-php-mysql-sanity-test/php_mysql_test.sql
create mode 100755 tests/httpd-php-mysql-sanity-test/runtest.sh
create mode 100644 tests/tests.yml
diff --git a/tests/httpd-php-mysql-sanity-test/Makefile b/tests/httpd-php-mysql-sanity-test/Makefile
new file mode 100644
index 0000000..17fb9d3
--- /dev/null
+++ b/tests/httpd-php-mysql-sanity-test/Makefile
@@ -0,0 +1,67 @@
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+# Makefile of /CoreOS/httpd/Sanity/httpd-php-mysql-sanity-test
+# Description: test fetching data from mysqldb/mariadb through php
+# Author: Karel Srot
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+# Copyright (c) 2013 Red Hat, Inc. All rights reserved.
+#
+# This copyrighted material is made available to anyone wishing
+# to use, modify, copy, or redistribute it subject to the terms
+# and conditions of the GNU General Public License version 2.
+#
+# This program is distributed in the hope that it will be
+# useful, but WITHOUT ANY WARRANTY; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+# PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with this program; if not, write to the Free
+# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+export TEST=/CoreOS/httpd/Sanity/httpd-php-mysql-sanity-test
+export TESTVERSION=1.0
+
+BUILT_FILES=
+
+FILES=$(METADATA) runtest.sh Makefile PURPOSE mysql.php php_mysql_test.sql php_mysql_test.conf
+
+.PHONY: all install download clean
+
+run: $(FILES) build
+ ./runtest.sh
+
+build: $(BUILT_FILES)
+ test -x runtest.sh || chmod a+x runtest.sh
+
+clean:
+ rm -f *~ $(BUILT_FILES)
+
+
+-include /usr/share/rhts/lib/rhts-make.include
+
+$(METADATA): Makefile
+ @echo "Owner: Karel Srot " > $(METADATA)
+ @echo "Name: $(TEST)" >> $(METADATA)
+ @echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
+ @echo "Path: $(TEST_DIR)" >> $(METADATA)
+ @echo "Description: test fetching data from mysqldb/mariadb through php" >> $(METADATA)
+ @echo "Type: Sanity" >> $(METADATA)
+ @echo "TestTime: 5m" >> $(METADATA)
+ @echo "RunFor: httpd" >> $(METADATA)
+ @echo "Requires: httpd php php-zts php-mysqlnd mysql-server mariadb-server" >> $(METADATA)
+ @echo "RhtsRequires: library(httpd/http)" >> $(METADATA)
+ @echo "RhtsRequires: library(mysql/basic)" >> $(METADATA)
+ @echo "RhtsRequires: library(mariadb55/basic)" >> $(METADATA)
+ @echo "RhtsRequires: library(php/utils)" >> $(METADATA)
+ @echo "Priority: Normal" >> $(METADATA)
+ @echo "License: GPLv2" >> $(METADATA)
+ @echo "Confidential: no" >> $(METADATA)
+ @echo "Destructive: no" >> $(METADATA)
+
+ rhts-lint $(METADATA)
diff --git a/tests/httpd-php-mysql-sanity-test/PURPOSE b/tests/httpd-php-mysql-sanity-test/PURPOSE
new file mode 100644
index 0000000..59b3931
--- /dev/null
+++ b/tests/httpd-php-mysql-sanity-test/PURPOSE
@@ -0,0 +1,3 @@
+PURPOSE of /CoreOS/httpd/Sanity/httpd-php-mysql-sanity-test
+Description: test fetching data from mysqldb/mariadb through php
+Author: Karel Srot
diff --git a/tests/httpd-php-mysql-sanity-test/new_mysql.php b/tests/httpd-php-mysql-sanity-test/new_mysql.php
new file mode 100644
index 0000000..6087b11
--- /dev/null
+++ b/tests/httpd-php-mysql-sanity-test/new_mysql.php
@@ -0,0 +1,12 @@
+
diff --git a/tests/httpd-php-mysql-sanity-test/old_mysql.php b/tests/httpd-php-mysql-sanity-test/old_mysql.php
new file mode 100644
index 0000000..8904c58
--- /dev/null
+++ b/tests/httpd-php-mysql-sanity-test/old_mysql.php
@@ -0,0 +1,12 @@
+
diff --git a/tests/httpd-php-mysql-sanity-test/php_mysql_test.conf b/tests/httpd-php-mysql-sanity-test/php_mysql_test.conf
new file mode 100644
index 0000000..d03c3c3
--- /dev/null
+++ b/tests/httpd-php-mysql-sanity-test/php_mysql_test.conf
@@ -0,0 +1,5 @@
+
+Alias /php_mysql_test /var/www/php_mysql_test
+
+
+
diff --git a/tests/httpd-php-mysql-sanity-test/php_mysql_test.sql b/tests/httpd-php-mysql-sanity-test/php_mysql_test.sql
new file mode 100644
index 0000000..ad931ac
--- /dev/null
+++ b/tests/httpd-php-mysql-sanity-test/php_mysql_test.sql
@@ -0,0 +1,6 @@
+
+CREATE DATABASE php_mysql_test;
+USE php_mysql_test;
+
+CREATE TABLE foobar (name VARCHAR(10), value INTEGER);
+INSERT INTO foobar VALUES("fish", 42);
diff --git a/tests/httpd-php-mysql-sanity-test/runtest.sh b/tests/httpd-php-mysql-sanity-test/runtest.sh
new file mode 100755
index 0000000..e2239ad
--- /dev/null
+++ b/tests/httpd-php-mysql-sanity-test/runtest.sh
@@ -0,0 +1,102 @@
+#!/bin/bash
+# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+# runtest.sh of /CoreOS/httpd/Sanity/httpd-php-mysql-sanity-test
+# Description: test fetching data from mysqldb/mariadb through php
+# Author: Karel Srot
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+# Copyright (c) 2013 Red Hat, Inc. All rights reserved.
+#
+# This copyrighted material is made available to anyone wishing
+# to use, modify, copy, or redistribute it subject to the terms
+# and conditions of the GNU General Public License version 2.
+#
+# This program is distributed in the hope that it will be
+# useful, but WITHOUT ANY WARRANTY; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+# PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with this program; if not, write to the Free
+# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+# Include Beaker environment
+[ -e /usr/bin/rhts-environment.sh ] && . /usr/bin/rhts-environment.sh
+. /usr/share/beakerlib/beakerlib.sh || exit 1
+
+PACKAGES="${PACKAGES:-httpd}"
+REQUIRES="${REQUIRES:-php $DB}"
+
+rlJournalStart
+ rlPhaseStartSetup
+ rlRun "rlImport httpd/http" 0 "Import httpd library"
+ if rlIsRHEL 5 6 && [ $httpCOLLECTION = 0 ]; then
+ DB="mysql-server"
+ rlRun "rlImport mysql/basic" 0 "Import mysqld library"
+ SERVICE=${mysqlServiceName}
+ else
+ DB="mariadb-server"
+ rlRun "rlImport mariadb55/basic" 0 "Import mariadb library"
+ SERVICE=${mariadbServiceName}
+ fi
+ # install also php-mysql on rhel-6 (instead of php-mysqlnd on rhel-7)
+ rlRun "rlImport php/utils"
+ phpPdoPhpMysqlSetup
+ rlAssertRpm --all
+ rlRun "rlServiceStart $SERVICE" 0
+ rlRun "echo DROP DATABASE php_mysql_test | mysql -u root" 0,1
+ rlRun "mysql --verbose -u root < php_mysql_test.sql"
+ rlRun "httpStop" 0 "Stop httpd if running"
+ rlRun "> $httpLOGDIR/error_log"
+ rlRun "rm -rvf $httpROOTDIR/php_mysql_test"
+ rlRun "mkdir -v $httpROOTDIR/php_mysql_test"
+ rlRun "cp -v php_mysql_test.conf $httpCONFDIR/conf.d/"
+ rlRun "php_version=`rlCheckRpm php`"
+ if [[ $php_version =~ php-7* ]] || [[ $php_version =~ php-5.[5-6]* ]]; then
+ rlRun "cp -v new_mysql.php $httpROOTDIR/php_mysql_test/mysql.php"
+ else
+ rlRun "cp -v old_mysql.php $httpROOTDIR/php_mysql_test/mysql.php"
+ fi
+ rlRun "sed -i 's|/var/www|$httpROOTDIR|' $httpCONFDIR/conf.d/php_mysql_test.conf"
+ rlRun "chown -R apache: $httpROOTDIR/php_mysql_test"
+ #rlRun "restorecon $httpROOTDIR/php_mysql_test"
+ selinuxenabled && rlRun "chcon -Rv -t httpd_sys_content_t $httpROOTDIR/php_mysql_test"
+ rlRun "httpStart" 0 "Start httpd"
+ rlPhaseEnd
+
+ rlPhaseStartTest
+ URL="http://localhost/php_mysql_test/"
+ RETVAL=0
+ tries=`seq 1 10`
+
+ for n in ${tries}; do
+ output=`curl -s $URL/mysql.php`
+ rv=$?
+ echo "PHP output ${n}: ${rv} x${output}y"
+ [ ${rv} -ne 0 -o "x${output}y" != "xfish is 42y" ] && RETVAL=66
+ done
+
+ if [ $RETVAL -ne 0 ]; then
+ rlFail
+ else
+ rlPass
+ fi
+ rlPhaseEnd
+
+ rlPhaseStartCleanup
+ rlRun "rm -f $httpCONFDIR/conf.d/php_mysql_test.conf"
+ rlRun "rm -rf $httpROOTDIR/php_mysql_test"
+ rlRun "echo DROP DATABASE php_mysql_test | mysql -u root"
+ rlRun "rlServiceRestore ${SERVICE}" 0
+ rlRun "httpStop" 0 "Stop httpd if running"
+ # uninstall php-mysql on rhel-6 if it was installed during setup
+ phpPdoPhpMysqlCleanup
+ rlPhaseEnd
+rlJournalPrintText
+rlJournalEnd
diff --git a/tests/tests.yml b/tests/tests.yml
new file mode 100644
index 0000000..43c38e7
--- /dev/null
+++ b/tests/tests.yml
@@ -0,0 +1,15 @@
+---
+# Tests that run in all contexts
+- hosts: localhost
+ vars:
+ use_beakerlib_libraries: true
+ roles:
+ - role: standard-test-rhts
+ tags:
+ - classic
+ - container
+ tests:
+ - httpd-php-mysql-sanity-test
+ required_packages:
+ - findutils # beakerlib needs find command
+ - which # smoke requires which command
From 95a0c9518b8a5659e7ba07aad0bcc338409e86cf Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Thu, 23 Nov 2017 11:11:28 +0000
Subject: [PATCH 069/359] build and load mod_brotli
---
00-base.conf | 1 +
httpd.spec | 8 ++++++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/00-base.conf b/00-base.conf
index ec9acf1..28dacb3 100644
--- a/00-base.conf
+++ b/00-base.conf
@@ -23,6 +23,7 @@ LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_owner_module modules/mod_authz_owner.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule autoindex_module modules/mod_autoindex.so
+LoadModule brotli_module modules/mod_brotli.so
LoadModule cache_module modules/mod_cache.so
LoadModule cache_disk_module modules/mod_cache_disk.so
LoadModule cache_socache_module modules/mod_cache_socache.so
diff --git a/httpd.spec b/httpd.spec
index ad2efc5..3ebf372 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -13,7 +13,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.29
-Release: 1%{?dist}
+Release: 2%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -80,7 +80,7 @@ License: ASL 2.0
Group: System Environment/Daemons
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: autoconf, perl-interpreter, perl-generators, pkgconfig, findutils, xmlto
-BuildRequires: zlib-devel, libselinux-devel, lua-devel
+BuildRequires: zlib-devel, libselinux-devel, lua-devel, brotli-devel
BuildRequires: apr-devel >= 1.5.0, apr-util-devel >= 1.5.0, pcre-devel >= 5.0
BuildRequires: systemd-devel
Requires: /etc/mime.types, system-logos-httpd
@@ -278,6 +278,7 @@ export LYNX_PATH=/usr/bin/links
--with-suexec-syslog \
--with-suexec-bin=%{_sbindir}/suexec \
--with-suexec-uidmin=1000 --with-suexec-gidmin=1000 \
+ --with-brotli \
--enable-pie \
--with-pcre \
--enable-mods-shared=all \
@@ -681,6 +682,9 @@ rm -rf $RPM_BUILD_ROOT
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Thu Nov 23 2017 Joe Orton - 2.4.29-2
+- build and load mod_brotli
+
* Wed Oct 25 2017 Luboš Uhliarik - 2.4.29-1
- new version 2.4.29
From 7d5e373bce7b08da94ccd956f47dd61e69a70732 Mon Sep 17 00:00:00 2001
From: Yevhenii Shapovalov
Date: Thu, 16 Nov 2017 12:27:52 +0200
Subject: [PATCH 070/359] add tests with standart test interface
---
tests/httpd-php-mysql-sanity-test/Makefile | 67 ++++++++++++
tests/httpd-php-mysql-sanity-test/PURPOSE | 3 +
.../httpd-php-mysql-sanity-test/new_mysql.php | 12 +++
.../httpd-php-mysql-sanity-test/old_mysql.php | 12 +++
.../php_mysql_test.conf | 5 +
.../php_mysql_test.sql | 6 ++
tests/httpd-php-mysql-sanity-test/runtest.sh | 102 ++++++++++++++++++
tests/tests.yml | 15 +++
8 files changed, 222 insertions(+)
create mode 100644 tests/httpd-php-mysql-sanity-test/Makefile
create mode 100644 tests/httpd-php-mysql-sanity-test/PURPOSE
create mode 100644 tests/httpd-php-mysql-sanity-test/new_mysql.php
create mode 100644 tests/httpd-php-mysql-sanity-test/old_mysql.php
create mode 100644 tests/httpd-php-mysql-sanity-test/php_mysql_test.conf
create mode 100644 tests/httpd-php-mysql-sanity-test/php_mysql_test.sql
create mode 100755 tests/httpd-php-mysql-sanity-test/runtest.sh
create mode 100644 tests/tests.yml
diff --git a/tests/httpd-php-mysql-sanity-test/Makefile b/tests/httpd-php-mysql-sanity-test/Makefile
new file mode 100644
index 0000000..17fb9d3
--- /dev/null
+++ b/tests/httpd-php-mysql-sanity-test/Makefile
@@ -0,0 +1,67 @@
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+# Makefile of /CoreOS/httpd/Sanity/httpd-php-mysql-sanity-test
+# Description: test fetching data from mysqldb/mariadb through php
+# Author: Karel Srot
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+# Copyright (c) 2013 Red Hat, Inc. All rights reserved.
+#
+# This copyrighted material is made available to anyone wishing
+# to use, modify, copy, or redistribute it subject to the terms
+# and conditions of the GNU General Public License version 2.
+#
+# This program is distributed in the hope that it will be
+# useful, but WITHOUT ANY WARRANTY; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+# PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with this program; if not, write to the Free
+# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+export TEST=/CoreOS/httpd/Sanity/httpd-php-mysql-sanity-test
+export TESTVERSION=1.0
+
+BUILT_FILES=
+
+FILES=$(METADATA) runtest.sh Makefile PURPOSE mysql.php php_mysql_test.sql php_mysql_test.conf
+
+.PHONY: all install download clean
+
+run: $(FILES) build
+ ./runtest.sh
+
+build: $(BUILT_FILES)
+ test -x runtest.sh || chmod a+x runtest.sh
+
+clean:
+ rm -f *~ $(BUILT_FILES)
+
+
+-include /usr/share/rhts/lib/rhts-make.include
+
+$(METADATA): Makefile
+ @echo "Owner: Karel Srot " > $(METADATA)
+ @echo "Name: $(TEST)" >> $(METADATA)
+ @echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
+ @echo "Path: $(TEST_DIR)" >> $(METADATA)
+ @echo "Description: test fetching data from mysqldb/mariadb through php" >> $(METADATA)
+ @echo "Type: Sanity" >> $(METADATA)
+ @echo "TestTime: 5m" >> $(METADATA)
+ @echo "RunFor: httpd" >> $(METADATA)
+ @echo "Requires: httpd php php-zts php-mysqlnd mysql-server mariadb-server" >> $(METADATA)
+ @echo "RhtsRequires: library(httpd/http)" >> $(METADATA)
+ @echo "RhtsRequires: library(mysql/basic)" >> $(METADATA)
+ @echo "RhtsRequires: library(mariadb55/basic)" >> $(METADATA)
+ @echo "RhtsRequires: library(php/utils)" >> $(METADATA)
+ @echo "Priority: Normal" >> $(METADATA)
+ @echo "License: GPLv2" >> $(METADATA)
+ @echo "Confidential: no" >> $(METADATA)
+ @echo "Destructive: no" >> $(METADATA)
+
+ rhts-lint $(METADATA)
diff --git a/tests/httpd-php-mysql-sanity-test/PURPOSE b/tests/httpd-php-mysql-sanity-test/PURPOSE
new file mode 100644
index 0000000..59b3931
--- /dev/null
+++ b/tests/httpd-php-mysql-sanity-test/PURPOSE
@@ -0,0 +1,3 @@
+PURPOSE of /CoreOS/httpd/Sanity/httpd-php-mysql-sanity-test
+Description: test fetching data from mysqldb/mariadb through php
+Author: Karel Srot
diff --git a/tests/httpd-php-mysql-sanity-test/new_mysql.php b/tests/httpd-php-mysql-sanity-test/new_mysql.php
new file mode 100644
index 0000000..6087b11
--- /dev/null
+++ b/tests/httpd-php-mysql-sanity-test/new_mysql.php
@@ -0,0 +1,12 @@
+
diff --git a/tests/httpd-php-mysql-sanity-test/old_mysql.php b/tests/httpd-php-mysql-sanity-test/old_mysql.php
new file mode 100644
index 0000000..8904c58
--- /dev/null
+++ b/tests/httpd-php-mysql-sanity-test/old_mysql.php
@@ -0,0 +1,12 @@
+
diff --git a/tests/httpd-php-mysql-sanity-test/php_mysql_test.conf b/tests/httpd-php-mysql-sanity-test/php_mysql_test.conf
new file mode 100644
index 0000000..d03c3c3
--- /dev/null
+++ b/tests/httpd-php-mysql-sanity-test/php_mysql_test.conf
@@ -0,0 +1,5 @@
+
+Alias /php_mysql_test /var/www/php_mysql_test
+
+
+
diff --git a/tests/httpd-php-mysql-sanity-test/php_mysql_test.sql b/tests/httpd-php-mysql-sanity-test/php_mysql_test.sql
new file mode 100644
index 0000000..ad931ac
--- /dev/null
+++ b/tests/httpd-php-mysql-sanity-test/php_mysql_test.sql
@@ -0,0 +1,6 @@
+
+CREATE DATABASE php_mysql_test;
+USE php_mysql_test;
+
+CREATE TABLE foobar (name VARCHAR(10), value INTEGER);
+INSERT INTO foobar VALUES("fish", 42);
diff --git a/tests/httpd-php-mysql-sanity-test/runtest.sh b/tests/httpd-php-mysql-sanity-test/runtest.sh
new file mode 100755
index 0000000..e2239ad
--- /dev/null
+++ b/tests/httpd-php-mysql-sanity-test/runtest.sh
@@ -0,0 +1,102 @@
+#!/bin/bash
+# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+# runtest.sh of /CoreOS/httpd/Sanity/httpd-php-mysql-sanity-test
+# Description: test fetching data from mysqldb/mariadb through php
+# Author: Karel Srot
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+# Copyright (c) 2013 Red Hat, Inc. All rights reserved.
+#
+# This copyrighted material is made available to anyone wishing
+# to use, modify, copy, or redistribute it subject to the terms
+# and conditions of the GNU General Public License version 2.
+#
+# This program is distributed in the hope that it will be
+# useful, but WITHOUT ANY WARRANTY; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+# PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with this program; if not, write to the Free
+# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+# Include Beaker environment
+[ -e /usr/bin/rhts-environment.sh ] && . /usr/bin/rhts-environment.sh
+. /usr/share/beakerlib/beakerlib.sh || exit 1
+
+PACKAGES="${PACKAGES:-httpd}"
+REQUIRES="${REQUIRES:-php $DB}"
+
+rlJournalStart
+ rlPhaseStartSetup
+ rlRun "rlImport httpd/http" 0 "Import httpd library"
+ if rlIsRHEL 5 6 && [ $httpCOLLECTION = 0 ]; then
+ DB="mysql-server"
+ rlRun "rlImport mysql/basic" 0 "Import mysqld library"
+ SERVICE=${mysqlServiceName}
+ else
+ DB="mariadb-server"
+ rlRun "rlImport mariadb55/basic" 0 "Import mariadb library"
+ SERVICE=${mariadbServiceName}
+ fi
+ # install also php-mysql on rhel-6 (instead of php-mysqlnd on rhel-7)
+ rlRun "rlImport php/utils"
+ phpPdoPhpMysqlSetup
+ rlAssertRpm --all
+ rlRun "rlServiceStart $SERVICE" 0
+ rlRun "echo DROP DATABASE php_mysql_test | mysql -u root" 0,1
+ rlRun "mysql --verbose -u root < php_mysql_test.sql"
+ rlRun "httpStop" 0 "Stop httpd if running"
+ rlRun "> $httpLOGDIR/error_log"
+ rlRun "rm -rvf $httpROOTDIR/php_mysql_test"
+ rlRun "mkdir -v $httpROOTDIR/php_mysql_test"
+ rlRun "cp -v php_mysql_test.conf $httpCONFDIR/conf.d/"
+ rlRun "php_version=`rlCheckRpm php`"
+ if [[ $php_version =~ php-7* ]] || [[ $php_version =~ php-5.[5-6]* ]]; then
+ rlRun "cp -v new_mysql.php $httpROOTDIR/php_mysql_test/mysql.php"
+ else
+ rlRun "cp -v old_mysql.php $httpROOTDIR/php_mysql_test/mysql.php"
+ fi
+ rlRun "sed -i 's|/var/www|$httpROOTDIR|' $httpCONFDIR/conf.d/php_mysql_test.conf"
+ rlRun "chown -R apache: $httpROOTDIR/php_mysql_test"
+ #rlRun "restorecon $httpROOTDIR/php_mysql_test"
+ selinuxenabled && rlRun "chcon -Rv -t httpd_sys_content_t $httpROOTDIR/php_mysql_test"
+ rlRun "httpStart" 0 "Start httpd"
+ rlPhaseEnd
+
+ rlPhaseStartTest
+ URL="http://localhost/php_mysql_test/"
+ RETVAL=0
+ tries=`seq 1 10`
+
+ for n in ${tries}; do
+ output=`curl -s $URL/mysql.php`
+ rv=$?
+ echo "PHP output ${n}: ${rv} x${output}y"
+ [ ${rv} -ne 0 -o "x${output}y" != "xfish is 42y" ] && RETVAL=66
+ done
+
+ if [ $RETVAL -ne 0 ]; then
+ rlFail
+ else
+ rlPass
+ fi
+ rlPhaseEnd
+
+ rlPhaseStartCleanup
+ rlRun "rm -f $httpCONFDIR/conf.d/php_mysql_test.conf"
+ rlRun "rm -rf $httpROOTDIR/php_mysql_test"
+ rlRun "echo DROP DATABASE php_mysql_test | mysql -u root"
+ rlRun "rlServiceRestore ${SERVICE}" 0
+ rlRun "httpStop" 0 "Stop httpd if running"
+ # uninstall php-mysql on rhel-6 if it was installed during setup
+ phpPdoPhpMysqlCleanup
+ rlPhaseEnd
+rlJournalPrintText
+rlJournalEnd
diff --git a/tests/tests.yml b/tests/tests.yml
new file mode 100644
index 0000000..43c38e7
--- /dev/null
+++ b/tests/tests.yml
@@ -0,0 +1,15 @@
+---
+# Tests that run in all contexts
+- hosts: localhost
+ vars:
+ use_beakerlib_libraries: true
+ roles:
+ - role: standard-test-rhts
+ tags:
+ - classic
+ - container
+ tests:
+ - httpd-php-mysql-sanity-test
+ required_packages:
+ - findutils # beakerlib needs find command
+ - which # smoke requires which command
From bb57b966352665d98c2efd9b6f37bfdfb812fcd2 Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Thu, 23 Nov 2017 11:11:28 +0000
Subject: [PATCH 071/359] build and load mod_brotli
---
00-base.conf | 1 +
httpd.spec | 8 ++++++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/00-base.conf b/00-base.conf
index ec9acf1..28dacb3 100644
--- a/00-base.conf
+++ b/00-base.conf
@@ -23,6 +23,7 @@ LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_owner_module modules/mod_authz_owner.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule autoindex_module modules/mod_autoindex.so
+LoadModule brotli_module modules/mod_brotli.so
LoadModule cache_module modules/mod_cache.so
LoadModule cache_disk_module modules/mod_cache_disk.so
LoadModule cache_socache_module modules/mod_cache_socache.so
diff --git a/httpd.spec b/httpd.spec
index 6a55faa..25f543b 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -13,7 +13,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.29
-Release: 1%{?dist}
+Release: 2%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -78,7 +78,7 @@ License: ASL 2.0
Group: System Environment/Daemons
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: autoconf, perl-interpreter, perl-generators, pkgconfig, findutils, xmlto
-BuildRequires: zlib-devel, libselinux-devel, lua-devel
+BuildRequires: zlib-devel, libselinux-devel, lua-devel, brotli-devel
BuildRequires: apr-devel >= 1.5.0, apr-util-devel >= 1.5.0, pcre-devel >= 5.0
BuildRequires: systemd-devel
Requires: /etc/mime.types, system-logos-httpd
@@ -276,6 +276,7 @@ export LYNX_PATH=/usr/bin/links
--with-suexec-syslog \
--with-suexec-bin=%{_sbindir}/suexec \
--with-suexec-uidmin=1000 --with-suexec-gidmin=1000 \
+ --with-brotli \
--enable-pie \
--with-pcre \
--enable-mods-shared=all \
@@ -679,6 +680,9 @@ rm -rf $RPM_BUILD_ROOT
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Thu Nov 23 2017 Joe Orton - 2.4.29-2
+- build and load mod_brotli
+
* Wed Oct 25 2017 Luboš Uhliarik - 2.4.29-1
- new version 2.4.29
From b94d82008d9638446135c618be5b7fefa3c6f3f3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?=
Date: Sat, 20 Jan 2018 23:06:54 +0100
Subject: [PATCH 072/359] Rebuilt for switch to libxcrypt
---
httpd.spec | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/httpd.spec b/httpd.spec
index 3ebf372..f27154c 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -13,7 +13,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.29
-Release: 2%{?dist}
+Release: 3%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -682,6 +682,9 @@ rm -rf $RPM_BUILD_ROOT
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Sat Jan 20 2018 Björn Esser - 2.4.29-3
+- Rebuilt for switch to libxcrypt
+
* Thu Nov 23 2017 Joe Orton - 2.4.29-2
- build and load mod_brotli
From 2820bed4db52840588a0c309b77e51822a30dd31 Mon Sep 17 00:00:00 2001
From: Paul Howarth
Date: Fri, 26 Jan 2018 17:23:59 +0000
Subject: [PATCH 073/359] Rebuild with updated flags to work around compiler
issues on i686
---
httpd.spec | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/httpd.spec b/httpd.spec
index f27154c..1720169 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -13,7 +13,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.29
-Release: 3%{?dist}
+Release: 4%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -682,6 +682,10 @@ rm -rf $RPM_BUILD_ROOT
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Fri Jan 26 2018 Paul Howarth - 2.4.29-4
+- Rebuild with updated flags to work around compiler issues on i686
+ (#1538648, #1538693)
+
* Sat Jan 20 2018 Björn Esser - 2.4.29-3
- Rebuilt for switch to libxcrypt
From 2971e92b1f95f600619e89adf75416fbeeba7cdb Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Sat, 27 Jan 2018 09:19:58 +0100
Subject: [PATCH 074/359] link mod_lua against -lcrypt (#1538992) Resolves:
rhbz#1538992
---
httpd-2.4.27-r1822305.patch | 17 +++++++++++++++++
httpd.spec | 7 ++++++-
2 files changed, 23 insertions(+), 1 deletion(-)
create mode 100644 httpd-2.4.27-r1822305.patch
diff --git a/httpd-2.4.27-r1822305.patch b/httpd-2.4.27-r1822305.patch
new file mode 100644
index 0000000..d8c6a8c
--- /dev/null
+++ b/httpd-2.4.27-r1822305.patch
@@ -0,0 +1,17 @@
+# ./pullrev.sh 1822305
+
+http://svn.apache.org/viewvc?view=revision&revision=1822305
+
+https://bugzilla.redhat.com/show_bug.cgi?id=1538992
+
+--- httpd-2.4.27/modules/lua/config.m4
++++ httpd-2.4.27/modules/lua/config.m4
+@@ -104,7 +104,7 @@
+ CHECK_LUA()
+ if test "x$enable_lua" != "xno" ; then
+ APR_ADDTO(MOD_INCLUDES, [$LUA_CFLAGS])
+- APR_ADDTO(MOD_LUA_LDADD, [$LUA_LIBS])
++ APR_ADDTO(MOD_LUA_LDADD, [$LUA_LIBS $CRYPT_LIBS])
+ fi
+ ])
+
diff --git a/httpd.spec b/httpd.spec
index 1720169..54633d6 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -13,7 +13,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.29
-Release: 4%{?dist}
+Release: 5%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -56,6 +56,7 @@ Patch2: httpd-2.4.9-apxs.patch
Patch3: httpd-2.4.1-deplibs.patch
Patch5: httpd-2.4.3-layout.patch
Patch6: httpd-2.4.3-apctl-systemd.patch
+Patch7: httpd-2.4.27-r1822305.patch
# Needed for socket activation and mod_systemd patch
Patch19: httpd-2.4.25-detect-systemd.patch
# Features/functional changes
@@ -200,6 +201,7 @@ interface for storing and accessing per-user session data.
%patch3 -p1 -b .deplibs
%patch5 -p1 -b .layout
%patch6 -p1 -b .apctlsystemd
+%patch7 -p1 -b .r1822305
%patch19 -p1 -b .detectsystemd
@@ -682,6 +684,9 @@ rm -rf $RPM_BUILD_ROOT
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Sat Jan 27 2018 Joe Orton - 2.4.29-5
+- link mod_lua against -lcrypt (#1538992)
+
* Fri Jan 26 2018 Paul Howarth - 2.4.29-4
- Rebuild with updated flags to work around compiler issues on i686
(#1538648, #1538693)
From cc87a074cd3e0193d2435bfa3565539c287c4091 Mon Sep 17 00:00:00 2001
From: Fedora Release Engineering
Date: Wed, 7 Feb 2018 16:31:52 +0000
Subject: [PATCH 075/359] - Rebuilt for
https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
Signed-off-by: Fedora Release Engineering
---
httpd.spec | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/httpd.spec b/httpd.spec
index 54633d6..e952c32 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -13,7 +13,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.29
-Release: 5%{?dist}
+Release: 6%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -684,6 +684,9 @@ rm -rf $RPM_BUILD_ROOT
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Wed Feb 07 2018 Fedora Release Engineering - 2.4.29-6
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
+
* Sat Jan 27 2018 Joe Orton - 2.4.29-5
- link mod_lua against -lcrypt (#1538992)
From 5450cc3ba1ff9ca1f9fbed8be812a9be35e40c79 Mon Sep 17 00:00:00 2001
From: Igor Gnatenko
Date: Tue, 13 Feb 2018 23:30:42 +0100
Subject: [PATCH 076/359] Remove BuildRoot definition
None of currently supported distributions need that.
It was needed last for EL5 which is EOL now
Signed-off-by: Igor Gnatenko
---
httpd.spec | 1 -
1 file changed, 1 deletion(-)
diff --git a/httpd.spec b/httpd.spec
index e952c32..62f9ef6 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -79,7 +79,6 @@ Patch58: httpd-2.4.25-r1738878.patch
License: ASL 2.0
Group: System Environment/Daemons
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: autoconf, perl-interpreter, perl-generators, pkgconfig, findutils, xmlto
BuildRequires: zlib-devel, libselinux-devel, lua-devel, brotli-devel
BuildRequires: apr-devel >= 1.5.0, apr-util-devel >= 1.5.0, pcre-devel >= 5.0
From 2919621fa46af1283067d2b7959e54b5036f65d7 Mon Sep 17 00:00:00 2001
From: Igor Gnatenko
Date: Wed, 14 Feb 2018 08:07:05 +0100
Subject: [PATCH 077/359] Remove %clean section
None of currently supported distributions need that.
Last one was EL5 which is EOL for a while.
Signed-off-by: Igor Gnatenko
---
httpd.spec | 3 ---
1 file changed, 3 deletions(-)
diff --git a/httpd.spec b/httpd.spec
index 62f9ef6..97b82ed 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -542,9 +542,6 @@ done
set -x
exit $rv
-%clean
-rm -rf $RPM_BUILD_ROOT
-
%files
%defattr(-,root,root)
From 4af7d39caff507079f39c874cb4494eeb4c44f81 Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Mon, 26 Feb 2018 12:28:41 +0000
Subject: [PATCH 078/359] simplify liblua detection in configure
---
httpd-2.4.27-r1825147.patch | 35 +++++++++++++++++++++++++++++++++++
httpd.spec | 7 ++++++-
2 files changed, 41 insertions(+), 1 deletion(-)
create mode 100644 httpd-2.4.27-r1825147.patch
diff --git a/httpd-2.4.27-r1825147.patch b/httpd-2.4.27-r1825147.patch
new file mode 100644
index 0000000..314ad2e
--- /dev/null
+++ b/httpd-2.4.27-r1825147.patch
@@ -0,0 +1,35 @@
+# ./pullrev.sh 1825147
+http://svn.apache.org/viewvc?view=revision&revision=1825147
+
+--- httpd-2.4.27/modules/lua/config.m4
++++ httpd-2.4.27/modules/lua/config.m4
+@@ -55,9 +55,16 @@
+ test_paths="${lua_path}"
+ fi
+
+-AC_CHECK_LIB(m, pow, lib_m="-lm")
+-AC_CHECK_LIB(m, sqrt, lib_m="-lm")
+-for x in $test_paths ; do
++if test -n "$PKGCONFIG" -a -z "$lua_path" \
++ && $PKGCONFIG --atleast-version=5.1 lua; then
++ LUA_LIBS="`$PKGCONFIG --libs lua`"
++ LUA_CFLAGS="`$PKGCONFIG --cflags lua`"
++ LUA_VERSION="`$PKGCONFIG --modversion lua`"
++ AC_MSG_NOTICE([using Lua $LUA_VERSION configuration from pkg-config])
++else
++ AC_CHECK_LIB(m, pow, lib_m="-lm")
++ AC_CHECK_LIB(m, sqrt, lib_m="-lm")
++ for x in $test_paths ; do
+ CHECK_LUA_PATH([${x}], [include/lua-5.3], [lib/lua-5.3], [lua-5.3])
+ CHECK_LUA_PATH([${x}], [include/lua5.3], [lib], [lua5.3])
+ CHECK_LUA_PATH([${x}], [include/lua53], [lib/lua53], [lua])
+@@ -71,7 +78,8 @@
+ CHECK_LUA_PATH([${x}], [include/lua-5.1], [lib/lua-5.1], [lua-5.1])
+ CHECK_LUA_PATH([${x}], [include/lua5.1], [lib], [lua5.1])
+ CHECK_LUA_PATH([${x}], [include/lua51], [lib/lua51], [lua])
+-done
++ done
++fi
+
+ AC_SUBST(LUA_LIBS)
+ AC_SUBST(LUA_CFLAGS)
diff --git a/httpd.spec b/httpd.spec
index 97b82ed..67d7e41 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -13,7 +13,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.29
-Release: 6%{?dist}
+Release: 7%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -57,6 +57,7 @@ Patch3: httpd-2.4.1-deplibs.patch
Patch5: httpd-2.4.3-layout.patch
Patch6: httpd-2.4.3-apctl-systemd.patch
Patch7: httpd-2.4.27-r1822305.patch
+Patch8: httpd-2.4.27-r1825147.patch
# Needed for socket activation and mod_systemd patch
Patch19: httpd-2.4.25-detect-systemd.patch
# Features/functional changes
@@ -201,6 +202,7 @@ interface for storing and accessing per-user session data.
%patch5 -p1 -b .layout
%patch6 -p1 -b .apctlsystemd
%patch7 -p1 -b .r1822305
+%patch8 -p1 -b .r1825147
%patch19 -p1 -b .detectsystemd
@@ -680,6 +682,9 @@ exit $rv
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Mon Feb 26 2018 Joe Orton - 2.4.29-7
+- simplify liblua detection in configure
+
* Wed Feb 07 2018 Fedora Release Engineering - 2.4.29-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
From c144c0a274a6af28e637720d7dee87b5f589cb53 Mon Sep 17 00:00:00 2001
From: Jitka Plesnikova
Date: Mon, 5 Mar 2018 09:36:51 +0100
Subject: [PATCH 079/359] Rebuilt with brotli 1.0.3
---
httpd.spec | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/httpd.spec b/httpd.spec
index 67d7e41..2c97e1e 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -13,7 +13,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.29
-Release: 7%{?dist}
+Release: 8%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -682,6 +682,9 @@ exit $rv
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Mon Mar 05 2018 Jitka Plesnikova - 2.4.29-8
+- Rebuilt with brotli 1.0.3
+
* Mon Feb 26 2018 Joe Orton - 2.4.29-7
- simplify liblua detection in configure
From 6a73e2c6609714b99512c153d294a95d624025ae Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Wed, 28 Mar 2018 20:15:39 +0100
Subject: [PATCH 080/359] Add section on restarts.
---
httpd.service.xml | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/httpd.service.xml b/httpd.service.xml
index b8fe7b3..8008b16 100644
--- a/httpd.service.xml
+++ b/httpd.service.xml
@@ -166,6 +166,20 @@ Wants=network-online.target
--kill-who=main --signal=HUP httpd.
+
+ Automated service restarts
+
+ System packages (including the httpd package itself) may
+ restart the httpd service automatically after packages are
+ upgraded, installed, or removed. This is done using the
+ systemctl reload httpd.service, which
+ produces a graceful restart by default as
+ described above.
+
+ To suppress automatic reloads entirely, create the file
+ /etc/sysconfig/httpd-disable-posttrans.
+
+
Changing the default MPM (Multi-Processing Module)
From c7d07f31b9738c8f1f0d5b31b87e8474541e4818 Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Wed, 28 Mar 2018 20:18:58 +0100
Subject: [PATCH 081/359] rebase to 2.4.33 (#1560174) add mod_md subpackage;
load mod_proxy_uwsgi by default
---
00-proxy.conf | 1 +
01-md.conf | 1 +
httpd-2.4.27-r1822305.patch | 17 ---
httpd-2.4.27-r1825147.patch | 35 -----
...-export.patch => httpd-2.4.33-export.patch | 8 +-
httpd-2.4.33-mddefault.patch | 21 +++
...38878.patch => httpd-2.4.33-r1738878.patch | 133 +++++++++---------
...patch => httpd-2.4.33-sslciphdefault.patch | 12 +-
httpd.spec | 47 +++++--
sources | 2 +-
10 files changed, 135 insertions(+), 142 deletions(-)
create mode 100644 01-md.conf
delete mode 100644 httpd-2.4.27-r1822305.patch
delete mode 100644 httpd-2.4.27-r1825147.patch
rename httpd-2.4.4-export.patch => httpd-2.4.33-export.patch (75%)
create mode 100644 httpd-2.4.33-mddefault.patch
rename httpd-2.4.25-r1738878.patch => httpd-2.4.33-r1738878.patch (71%)
rename httpd-2.4.17-sslciphdefault.patch => httpd-2.4.33-sslciphdefault.patch (75%)
diff --git a/00-proxy.conf b/00-proxy.conf
index 448eb63..f0f84c2 100644
--- a/00-proxy.conf
+++ b/00-proxy.conf
@@ -14,4 +14,5 @@ LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_hcheck_module modules/mod_proxy_hcheck.so
LoadModule proxy_scgi_module modules/mod_proxy_scgi.so
+LoadModule proxy_uwsgi_module modules/mod_proxy_uwsgi.so
LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so
diff --git a/01-md.conf b/01-md.conf
new file mode 100644
index 0000000..2739202
--- /dev/null
+++ b/01-md.conf
@@ -0,0 +1 @@
+LoadModule md_module modules/mod_md.so
diff --git a/httpd-2.4.27-r1822305.patch b/httpd-2.4.27-r1822305.patch
deleted file mode 100644
index d8c6a8c..0000000
--- a/httpd-2.4.27-r1822305.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-# ./pullrev.sh 1822305
-
-http://svn.apache.org/viewvc?view=revision&revision=1822305
-
-https://bugzilla.redhat.com/show_bug.cgi?id=1538992
-
---- httpd-2.4.27/modules/lua/config.m4
-+++ httpd-2.4.27/modules/lua/config.m4
-@@ -104,7 +104,7 @@
- CHECK_LUA()
- if test "x$enable_lua" != "xno" ; then
- APR_ADDTO(MOD_INCLUDES, [$LUA_CFLAGS])
-- APR_ADDTO(MOD_LUA_LDADD, [$LUA_LIBS])
-+ APR_ADDTO(MOD_LUA_LDADD, [$LUA_LIBS $CRYPT_LIBS])
- fi
- ])
-
diff --git a/httpd-2.4.27-r1825147.patch b/httpd-2.4.27-r1825147.patch
deleted file mode 100644
index 314ad2e..0000000
--- a/httpd-2.4.27-r1825147.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-# ./pullrev.sh 1825147
-http://svn.apache.org/viewvc?view=revision&revision=1825147
-
---- httpd-2.4.27/modules/lua/config.m4
-+++ httpd-2.4.27/modules/lua/config.m4
-@@ -55,9 +55,16 @@
- test_paths="${lua_path}"
- fi
-
--AC_CHECK_LIB(m, pow, lib_m="-lm")
--AC_CHECK_LIB(m, sqrt, lib_m="-lm")
--for x in $test_paths ; do
-+if test -n "$PKGCONFIG" -a -z "$lua_path" \
-+ && $PKGCONFIG --atleast-version=5.1 lua; then
-+ LUA_LIBS="`$PKGCONFIG --libs lua`"
-+ LUA_CFLAGS="`$PKGCONFIG --cflags lua`"
-+ LUA_VERSION="`$PKGCONFIG --modversion lua`"
-+ AC_MSG_NOTICE([using Lua $LUA_VERSION configuration from pkg-config])
-+else
-+ AC_CHECK_LIB(m, pow, lib_m="-lm")
-+ AC_CHECK_LIB(m, sqrt, lib_m="-lm")
-+ for x in $test_paths ; do
- CHECK_LUA_PATH([${x}], [include/lua-5.3], [lib/lua-5.3], [lua-5.3])
- CHECK_LUA_PATH([${x}], [include/lua5.3], [lib], [lua5.3])
- CHECK_LUA_PATH([${x}], [include/lua53], [lib/lua53], [lua])
-@@ -71,7 +78,8 @@
- CHECK_LUA_PATH([${x}], [include/lua-5.1], [lib/lua-5.1], [lua-5.1])
- CHECK_LUA_PATH([${x}], [include/lua5.1], [lib], [lua5.1])
- CHECK_LUA_PATH([${x}], [include/lua51], [lib/lua51], [lua])
--done
-+ done
-+fi
-
- AC_SUBST(LUA_LIBS)
- AC_SUBST(LUA_CFLAGS)
diff --git a/httpd-2.4.4-export.patch b/httpd-2.4.33-export.patch
similarity index 75%
rename from httpd-2.4.4-export.patch
rename to httpd-2.4.33-export.patch
index eb670c6..9adf398 100644
--- a/httpd-2.4.4-export.patch
+++ b/httpd-2.4.33-export.patch
@@ -6,12 +6,12 @@ Upstream-HEAD: needed
Upstream-2.0: omit
Upstream-Status: EXPORT_DIRS change is conditional on using shared apr
---- httpd-2.4.4/server/Makefile.in.export
-+++ httpd-2.4.4/server/Makefile.in
-@@ -57,9 +57,6 @@ export_files:
- ( for dir in $(EXPORT_DIRS); do \
+--- httpd-2.4.33/server/Makefile.in.export
++++ httpd-2.4.33/server/Makefile.in
+@@ -60,9 +60,6 @@
ls $$dir/*.h ; \
done; \
+ echo "$(top_srcdir)/server/mpm_fdqueue.h"; \
- for dir in $(EXPORT_DIRS_APR); do \
- ls $$dir/ap[ru].h $$dir/ap[ru]_*.h 2>/dev/null; \
- done; \
diff --git a/httpd-2.4.33-mddefault.patch b/httpd-2.4.33-mddefault.patch
new file mode 100644
index 0000000..9e82fb8
--- /dev/null
+++ b/httpd-2.4.33-mddefault.patch
@@ -0,0 +1,21 @@
+
+Override default.
+
+--- httpd-2.4.33/modules/md/mod_md_config.c.mddefault
++++ httpd-2.4.33/modules/md/mod_md_config.c
+@@ -54,10 +54,14 @@
+
+ #define DEF_VAL (-1)
+
++#ifndef MD_DEFAULT_STORE_DIR
++#define MD_DEFAULT_STORE_DIR "state/md"
++#endif
++
+ /* Default settings for the global conf */
+ static md_mod_conf_t defmc = {
+ NULL,
+- "md",
++ MD_DEFAULT_STORE_DIR,
+ NULL,
+ NULL,
+ 80,
diff --git a/httpd-2.4.25-r1738878.patch b/httpd-2.4.33-r1738878.patch
similarity index 71%
rename from httpd-2.4.25-r1738878.patch
rename to httpd-2.4.33-r1738878.patch
index e4b46cc..d7ef42f 100644
--- a/httpd-2.4.25-r1738878.patch
+++ b/httpd-2.4.33-r1738878.patch
@@ -1,28 +1,9 @@
diff --git a/modules/proxy/ajp.h b/modules/proxy/ajp.h
index c119a7e..267150a 100644
---- a/modules/proxy/ajp.h
-+++ b/modules/proxy/ajp.h
-@@ -413,12 +413,14 @@ apr_status_t ajp_ilink_receive(apr_socket_t *sock, ajp_msg_t *msg);
- * @param sock backend socket
- * @param r current request
- * @param buffsize max size of the AJP packet.
-+ * @param secret authentication secret
- * @param uri requested uri
- * @return APR_SUCCESS or error
- */
- apr_status_t ajp_send_header(apr_socket_t *sock, request_rec *r,
- apr_size_t buffsize,
-- apr_uri_t *uri);
-+ apr_uri_t *uri,
-+ const char *secret);
-
- /**
- * Read the ajp message and return the type of the message.
-diff --git a/modules/proxy/ajp_header.c b/modules/proxy/ajp_header.c
-index 67353a7..680a8f3 100644
---- a/modules/proxy/ajp_header.c
-+++ b/modules/proxy/ajp_header.c
-@@ -213,7 +213,8 @@ AJPV13_REQUEST/AJPV14_REQUEST=
+diff -uap httpd-2.4.33/modules/proxy/ajp_header.c.r1738878 httpd-2.4.33/modules/proxy/ajp_header.c
+--- httpd-2.4.33/modules/proxy/ajp_header.c.r1738878
++++ httpd-2.4.33/modules/proxy/ajp_header.c
+@@ -213,7 +213,8 @@
static apr_status_t ajp_marshal_into_msgb(ajp_msg_t *msg,
request_rec *r,
@@ -32,7 +13,7 @@ index 67353a7..680a8f3 100644
{
int method;
apr_uint32_t i, num_headers = 0;
-@@ -293,17 +294,15 @@ static apr_status_t ajp_marshal_into_msgb(ajp_msg_t *msg,
+@@ -293,17 +294,15 @@
i, elts[i].key, elts[i].val);
}
@@ -53,7 +34,7 @@ index 67353a7..680a8f3 100644
if (r->user) {
if (ajp_msg_append_uint8(msg, SC_A_REMOTE_USER) ||
-@@ -671,7 +670,8 @@ static apr_status_t ajp_unmarshal_response(ajp_msg_t *msg,
+@@ -671,7 +670,8 @@
apr_status_t ajp_send_header(apr_socket_t *sock,
request_rec *r,
apr_size_t buffsize,
@@ -63,7 +44,7 @@ index 67353a7..680a8f3 100644
{
ajp_msg_t *msg;
apr_status_t rc;
-@@ -683,7 +683,7 @@ apr_status_t ajp_send_header(apr_socket_t *sock,
+@@ -683,7 +683,7 @@
return rc;
}
@@ -72,48 +53,29 @@ index 67353a7..680a8f3 100644
if (rc != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00988)
"ajp_send_header: ajp_marshal_into_msgb failed");
-diff --git a/modules/proxy/mod_proxy.c b/modules/proxy/mod_proxy.c
-index f6fb473..f693f63 100644
---- a/modules/proxy/mod_proxy.c
-+++ b/modules/proxy/mod_proxy.c
-@@ -314,6 +314,12 @@ static const char *set_worker_param(apr_pool_t *p,
- (int)sizeof(worker->s->upgrade));
- }
- }
-+ else if (!strcasecmp(key, "secret")) {
-+ if (PROXY_STRNCPY(worker->s->secret, val) != APR_SUCCESS) {
-+ return apr_psprintf(p, "Secret length must be < %d characters",
-+ (int)sizeof(worker->s->secret));
-+ }
-+ }
- else {
- if (set_worker_hc_param_f) {
- return set_worker_hc_param_f(p, s, worker, key, val, NULL);
-diff --git a/modules/proxy/mod_proxy.h b/modules/proxy/mod_proxy.h
-index 8a0ad10..f92c185 100644
---- a/modules/proxy/mod_proxy.h
-+++ b/modules/proxy/mod_proxy.h
-@@ -352,6 +352,7 @@ PROXY_WORKER_HC_FAIL )
- #define PROXY_WORKER_MAX_HOSTNAME_SIZE 64
- #define PROXY_BALANCER_MAX_HOSTNAME_SIZE PROXY_WORKER_MAX_HOSTNAME_SIZE
- #define PROXY_BALANCER_MAX_STICKY_SIZE 64
-+#define PROXY_WORKER_MAX_SECRET_SIZE 64
+diff -uap httpd-2.4.33/modules/proxy/ajp.h.r1738878 httpd-2.4.33/modules/proxy/ajp.h
+--- httpd-2.4.33/modules/proxy/ajp.h.r1738878
++++ httpd-2.4.33/modules/proxy/ajp.h
+@@ -413,12 +413,14 @@
+ * @param sock backend socket
+ * @param r current request
+ * @param buffsize max size of the AJP packet.
++ * @param secret authentication secret
+ * @param uri requested uri
+ * @return APR_SUCCESS or error
+ */
+ apr_status_t ajp_send_header(apr_socket_t *sock, request_rec *r,
+ apr_size_t buffsize,
+- apr_uri_t *uri);
++ apr_uri_t *uri,
++ const char *secret);
- /* RFC-1035 mentions limits of 255 for host-names and 253 for domain-names,
- * dotted together(?) this would fit the below size (+ trailing NUL).
-@@ -443,6 +444,7 @@ typedef struct {
- hcmethod_t method; /* method to use for health check */
- apr_interval_time_t interval;
- char upgrade[PROXY_WORKER_MAX_SCHEME_SIZE];/* upgrade protocol used by mod_proxy_wstunnel */
-+ char secret[PROXY_WORKER_MAX_SECRET_SIZE]; /* authentication secret (e.g. AJP13) */
- } proxy_worker_shared;
-
- #define ALIGNED_PROXY_WORKER_SHARED_SIZE (APR_ALIGN_DEFAULT(sizeof(proxy_worker_shared)))
-diff --git a/modules/proxy/mod_proxy_ajp.c b/modules/proxy/mod_proxy_ajp.c
-index 051724e..e706518 100644
---- a/modules/proxy/mod_proxy_ajp.c
-+++ b/modules/proxy/mod_proxy_ajp.c
-@@ -193,6 +193,7 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
+ /**
+ * Read the ajp message and return the type of the message.
+diff -uap httpd-2.4.33/modules/proxy/mod_proxy_ajp.c.r1738878 httpd-2.4.33/modules/proxy/mod_proxy_ajp.c
+--- httpd-2.4.33/modules/proxy/mod_proxy_ajp.c.r1738878
++++ httpd-2.4.33/modules/proxy/mod_proxy_ajp.c
+@@ -193,6 +193,7 @@
apr_off_t content_length = 0;
int original_status = r->status;
const char *original_status_line = r->status_line;
@@ -121,7 +83,7 @@ index 051724e..e706518 100644
if (psf->io_buffer_size_set)
maxsize = psf->io_buffer_size;
-@@ -202,12 +203,15 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
+@@ -202,12 +203,15 @@
maxsize = AJP_MSG_BUFFER_SZ;
maxsize = APR_ALIGN(maxsize, 1024);
@@ -138,3 +100,38 @@ index 051724e..e706518 100644
if (status != APR_SUCCESS) {
conn->close = 1;
ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(00868)
+diff -uap httpd-2.4.33/modules/proxy/mod_proxy.c.r1738878 httpd-2.4.33/modules/proxy/mod_proxy.c
+--- httpd-2.4.33/modules/proxy/mod_proxy.c.r1738878
++++ httpd-2.4.33/modules/proxy/mod_proxy.c
+@@ -318,6 +318,12 @@
+ (int)sizeof(worker->s->upgrade));
+ }
+ }
++ else if (!strcasecmp(key, "secret")) {
++ if (PROXY_STRNCPY(worker->s->secret, val) != APR_SUCCESS) {
++ return apr_psprintf(p, "Secret length must be < %d characters",
++ (int)sizeof(worker->s->secret));
++ }
++ }
+ else {
+ if (set_worker_hc_param_f) {
+ return set_worker_hc_param_f(p, s, worker, key, val, NULL);
+diff -uap httpd-2.4.33/modules/proxy/mod_proxy.h.r1738878 httpd-2.4.33/modules/proxy/mod_proxy.h
+--- httpd-2.4.33/modules/proxy/mod_proxy.h.r1738878
++++ httpd-2.4.33/modules/proxy/mod_proxy.h
+@@ -353,6 +353,7 @@
+ #define PROXY_WORKER_MAX_HOSTNAME_SIZE 64
+ #define PROXY_BALANCER_MAX_HOSTNAME_SIZE PROXY_WORKER_MAX_HOSTNAME_SIZE
+ #define PROXY_BALANCER_MAX_STICKY_SIZE 64
++#define PROXY_WORKER_MAX_SECRET_SIZE 64
+
+ #define PROXY_RFC1035_HOSTNAME_SIZE 256
+
+@@ -447,6 +448,7 @@
+ apr_interval_time_t interval;
+ char upgrade[PROXY_WORKER_MAX_SCHEME_SIZE];/* upgrade protocol used by mod_proxy_wstunnel */
+ char hostname_ex[PROXY_RFC1035_HOSTNAME_SIZE]; /* RFC1035 compliant version of the remote backend address */
++ char secret[PROXY_WORKER_MAX_SECRET_SIZE]; /* authentication secret (e.g. AJP13) */
+ } proxy_worker_shared;
+
+ #define ALIGNED_PROXY_WORKER_SHARED_SIZE (APR_ALIGN_DEFAULT(sizeof(proxy_worker_shared)))
diff --git a/httpd-2.4.17-sslciphdefault.patch b/httpd-2.4.33-sslciphdefault.patch
similarity index 75%
rename from httpd-2.4.17-sslciphdefault.patch
rename to httpd-2.4.33-sslciphdefault.patch
index 8efc461..f2919b8 100644
--- a/httpd-2.4.17-sslciphdefault.patch
+++ b/httpd-2.4.33-sslciphdefault.patch
@@ -3,9 +3,9 @@ https://bugzilla.redhat.com/show_bug.cgi?id=1109119
Don't prepend !aNULL etc if PROFILE= is used with SSLCipherSuite.
---- httpd-2.4.17/modules/ssl/ssl_engine_config.c.sslciphdefault
-+++ httpd-2.4.17/modules/ssl/ssl_engine_config.c
-@@ -708,8 +708,10 @@ const char *ssl_cmd_SSLCipherSuite(cmd_p
+--- httpd-2.4.33/modules/ssl/ssl_engine_config.c.sslciphdefault
++++ httpd-2.4.33/modules/ssl/ssl_engine_config.c
+@@ -758,8 +758,10 @@
SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
SSLDirConfigRec *dc = (SSLDirConfigRec *)dcfg;
@@ -18,9 +18,9 @@ Don't prepend !aNULL etc if PROFILE= is used with SSLCipherSuite.
if (cmd->path) {
dc->szCipherSuite = arg;
-@@ -1428,8 +1430,10 @@ const char *ssl_cmd_SSLProxyCipherSuite(
+@@ -1502,8 +1504,10 @@
{
- SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
+ SSLDirConfigRec *dc = (SSLDirConfigRec *)dcfg;
- /* always disable null and export ciphers */
- arg = apr_pstrcat(cmd->pool, arg, ":!aNULL:!eNULL:!EXP", NULL);
@@ -29,5 +29,5 @@ Don't prepend !aNULL etc if PROFILE= is used with SSLCipherSuite.
+ if (strncmp(arg, "PROFILE=", 8) != 0)
+ arg = apr_pstrcat(cmd->pool, arg, ":!aNULL:!eNULL:!EXP", NULL);
- sc->proxy->auth.cipher_suite = arg;
+ dc->proxy->auth.cipher_suite = arg;
diff --git a/httpd.spec b/httpd.spec
index 2c97e1e..0ba512a 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -12,8 +12,8 @@
Summary: Apache HTTP Server
Name: httpd
-Version: 2.4.29
-Release: 8%{?dist}
+Version: 2.4.33
+Release: 1%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -42,6 +42,7 @@ Source25: 01-session.conf
Source26: 10-listen443.conf
Source27: httpd.socket
Source28: 00-optional.conf
+Source29: 01-md.conf
# Documentation
Source30: README.confd
Source31: README.confmod
@@ -56,12 +57,10 @@ Patch2: httpd-2.4.9-apxs.patch
Patch3: httpd-2.4.1-deplibs.patch
Patch5: httpd-2.4.3-layout.patch
Patch6: httpd-2.4.3-apctl-systemd.patch
-Patch7: httpd-2.4.27-r1822305.patch
-Patch8: httpd-2.4.27-r1825147.patch
# Needed for socket activation and mod_systemd patch
Patch19: httpd-2.4.25-detect-systemd.patch
# Features/functional changes
-Patch23: httpd-2.4.4-export.patch
+Patch23: httpd-2.4.33-export.patch
Patch24: httpd-2.4.1-corelimit.patch
Patch25: httpd-2.4.25-selinux.patch
Patch26: httpd-2.4.4-r1337344+.patch
@@ -70,11 +69,11 @@ Patch29: httpd-2.4.27-systemd.patch
Patch30: httpd-2.4.4-cachehardmax.patch
Patch31: httpd-2.4.18-sslmultiproxy.patch
Patch34: httpd-2.4.17-socket-activation.patch
-Patch35: httpd-2.4.17-sslciphdefault.patch
+Patch35: httpd-2.4.33-sslciphdefault.patch
# Bug fixes
# https://bugzilla.redhat.com/show_bug.cgi?id=1397243
-Patch58: httpd-2.4.25-r1738878.patch
+Patch58: httpd-2.4.33-r1738878.patch
# Security fixes
@@ -163,6 +162,19 @@ The mod_ssl module provides strong cryptography for the Apache Web
server via the Secure Sockets Layer (SSL) and Transport Layer
Security (TLS) protocols.
+%package -n mod_md
+Group: System Environment/Daemons
+Summary: Certificate provisioning using ACME for the Apache HTTP Server
+Requires: httpd = 0:%{version}-%{release}, httpd-mmn = %{mmnisa}
+BuildRequires: jansson-devel, libcurl-devel
+
+%description -n mod_md
+This module manages common properties of domains for one or more
+virtual hosts. Specifically it can use the ACME protocol (RFC Draft)
+to automate certificate provisioning. These will be configured for
+managed domains and their virtual hosts automatically. This includes
+renewal of certificates before they expire.
+
%package -n mod_proxy_html
Group: System Environment/Daemons
Summary: HTML and XML content filters for the Apache HTTP Server
@@ -201,8 +213,6 @@ interface for storing and accessing per-user session data.
%patch3 -p1 -b .deplibs
%patch5 -p1 -b .layout
%patch6 -p1 -b .apctlsystemd
-%patch7 -p1 -b .r1822305
-%patch8 -p1 -b .r1825147
%patch19 -p1 -b .detectsystemd
@@ -213,7 +223,7 @@ interface for storing and accessing per-user session data.
%patch27 -p1 -b .icons
%patch29 -p1 -b .systemd
%patch30 -p1 -b .cachehardmax
-%patch31 -p1 -b .sslmultiproxy
+#patch31 -p1 -b .sslmultiproxy
%patch34 -p1 -b .socketactivation
%patch35 -p1 -b .sslciphdefault
%patch58 -p1 -b .r1738878
@@ -318,7 +328,8 @@ install -m 644 $RPM_SOURCE_DIR/README.confmod \
$RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.modules.d/README
for f in 00-base.conf 00-mpm.conf 00-lua.conf 01-cgi.conf 00-dav.conf \
00-proxy.conf 00-ssl.conf 01-ldap.conf 00-proxyhtml.conf \
- 01-ldap.conf 00-systemd.conf 01-session.conf 00-optional.conf; do
+ 01-ldap.conf 00-systemd.conf 01-session.conf 00-optional.conf \
+ 01-md.conf; do
install -m 644 -p $RPM_SOURCE_DIR/$f \
$RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.modules.d/$f
done
@@ -366,6 +377,7 @@ install -m 644 -p $RPM_SOURCE_DIR/httpd.tmpfiles \
# Other directories
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/dav \
+ $RPM_BUILD_ROOT%{_localstatedir}/lib/httpd \
$RPM_BUILD_ROOT/run/httpd/htcacheclean
# Substitute in defaults which are usually done (badly) by "make install"
@@ -425,6 +437,7 @@ ln -s ../../pixmaps/poweredby.png \
# symlinks for /etc/httpd
ln -s ../..%{_localstatedir}/log/httpd $RPM_BUILD_ROOT/etc/httpd/logs
+ln -s ../..%{_localstatedir}/lib/httpd $RPM_BUILD_ROOT/etc/httpd/state
ln -s /run/httpd $RPM_BUILD_ROOT/etc/httpd/run
ln -s ../..%{_libdir}/httpd/modules $RPM_BUILD_ROOT/etc/httpd/modules
@@ -552,6 +565,7 @@ exit $rv
%{_sysconfdir}/httpd/modules
%{_sysconfdir}/httpd/logs
+%{_sysconfdir}/httpd/state
%{_sysconfdir}/httpd/run
%dir %{_sysconfdir}/httpd/conf
%config(noreplace) %{_sysconfdir}/httpd/conf/httpd.conf
@@ -589,6 +603,7 @@ exit $rv
%{_libdir}/httpd/modules/mod*.so
%exclude %{_libdir}/httpd/modules/mod_auth_form.so
%exclude %{_libdir}/httpd/modules/mod_ssl.so
+%exclude %{_libdir}/httpd/modules/mod_md.so
%exclude %{_libdir}/httpd/modules/mod_*ldap.so
%exclude %{_libdir}/httpd/modules/mod_proxy_html.so
%exclude %{_libdir}/httpd/modules/mod_xml2enc.so
@@ -607,6 +622,7 @@ exit $rv
%attr(0700,apache,apache) %dir /run/httpd/htcacheclean
%attr(0700,root,root) %dir %{_localstatedir}/log/httpd
%attr(0700,apache,apache) %dir %{_localstatedir}/lib/dav
+%attr(0700,apache,apache) %dir %{_localstatedir}/lib/httpd
%attr(0700,apache,apache) %dir %{_localstatedir}/cache/httpd
%attr(0700,apache,apache) %dir %{_localstatedir}/cache/httpd/proxy
@@ -671,6 +687,11 @@ exit $rv
%{_libdir}/httpd/modules/mod_auth_form.so
%config(noreplace) %{_sysconfdir}/httpd/conf.modules.d/01-session.conf
+%files -n mod_md
+%defattr(-,root,root)
+%{_libdir}/httpd/modules/mod_md.so
+%config(noreplace) %{_sysconfdir}/httpd/conf.modules.d/01-md.conf
+
%files devel
%defattr(-,root,root)
%{_includedir}/httpd
@@ -682,6 +703,10 @@ exit $rv
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Wed Mar 28 2018 Joe Orton - 2.4.33-1
+- rebase to 2.4.33 (#1560174)
+- add mod_md subpackage; load mod_proxy_uwsgi by default
+
* Mon Mar 05 2018 Jitka Plesnikova - 2.4.29-8
- Rebuilt with brotli 1.0.3
diff --git a/sources b/sources
index 6978287..e8c3a89 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (httpd-2.4.29.tar.bz2) = 840982fd3d21463bc5c1747f211dfacf3abdf634d149e49bb49fd2e5deda140de602dbdf31e1bbe5337a48f718ab2261c408e83a8dd39a9291ee7b6b7a85639a
+SHA512 (httpd-2.4.33.tar.bz2) = e74b2b3346d67be45a8bc8a7cbb8eabf5c403a5cfe5797a976f94a539529843fbcdf03b9ca0548816b2cf37f4ce0eb301f8d5af25b1270fdf8dd9f5bf0585269
From f68f9f06a837965f11953ad52ce31994f93bcb2a Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Wed, 28 Mar 2018 20:18:58 +0100
Subject: [PATCH 082/359] rebase to 2.4.33 (#1560174) add mod_md subpackage;
load mod_proxy_uwsgi by default
---
00-proxy.conf | 1 +
01-md.conf | 1 +
...-export.patch => httpd-2.4.33-export.patch | 8 +-
httpd-2.4.33-mddefault.patch | 21 +++
...38878.patch => httpd-2.4.33-r1738878.patch | 133 +++++++++---------
...patch => httpd-2.4.33-sslciphdefault.patch | 12 +-
httpd.spec | 43 +++++-
sources | 2 +-
8 files changed, 136 insertions(+), 85 deletions(-)
create mode 100644 01-md.conf
rename httpd-2.4.4-export.patch => httpd-2.4.33-export.patch (75%)
create mode 100644 httpd-2.4.33-mddefault.patch
rename httpd-2.4.25-r1738878.patch => httpd-2.4.33-r1738878.patch (71%)
rename httpd-2.4.17-sslciphdefault.patch => httpd-2.4.33-sslciphdefault.patch (75%)
diff --git a/00-proxy.conf b/00-proxy.conf
index 448eb63..f0f84c2 100644
--- a/00-proxy.conf
+++ b/00-proxy.conf
@@ -14,4 +14,5 @@ LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_hcheck_module modules/mod_proxy_hcheck.so
LoadModule proxy_scgi_module modules/mod_proxy_scgi.so
+LoadModule proxy_uwsgi_module modules/mod_proxy_uwsgi.so
LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so
diff --git a/01-md.conf b/01-md.conf
new file mode 100644
index 0000000..2739202
--- /dev/null
+++ b/01-md.conf
@@ -0,0 +1 @@
+LoadModule md_module modules/mod_md.so
diff --git a/httpd-2.4.4-export.patch b/httpd-2.4.33-export.patch
similarity index 75%
rename from httpd-2.4.4-export.patch
rename to httpd-2.4.33-export.patch
index eb670c6..9adf398 100644
--- a/httpd-2.4.4-export.patch
+++ b/httpd-2.4.33-export.patch
@@ -6,12 +6,12 @@ Upstream-HEAD: needed
Upstream-2.0: omit
Upstream-Status: EXPORT_DIRS change is conditional on using shared apr
---- httpd-2.4.4/server/Makefile.in.export
-+++ httpd-2.4.4/server/Makefile.in
-@@ -57,9 +57,6 @@ export_files:
- ( for dir in $(EXPORT_DIRS); do \
+--- httpd-2.4.33/server/Makefile.in.export
++++ httpd-2.4.33/server/Makefile.in
+@@ -60,9 +60,6 @@
ls $$dir/*.h ; \
done; \
+ echo "$(top_srcdir)/server/mpm_fdqueue.h"; \
- for dir in $(EXPORT_DIRS_APR); do \
- ls $$dir/ap[ru].h $$dir/ap[ru]_*.h 2>/dev/null; \
- done; \
diff --git a/httpd-2.4.33-mddefault.patch b/httpd-2.4.33-mddefault.patch
new file mode 100644
index 0000000..9e82fb8
--- /dev/null
+++ b/httpd-2.4.33-mddefault.patch
@@ -0,0 +1,21 @@
+
+Override default.
+
+--- httpd-2.4.33/modules/md/mod_md_config.c.mddefault
++++ httpd-2.4.33/modules/md/mod_md_config.c
+@@ -54,10 +54,14 @@
+
+ #define DEF_VAL (-1)
+
++#ifndef MD_DEFAULT_STORE_DIR
++#define MD_DEFAULT_STORE_DIR "state/md"
++#endif
++
+ /* Default settings for the global conf */
+ static md_mod_conf_t defmc = {
+ NULL,
+- "md",
++ MD_DEFAULT_STORE_DIR,
+ NULL,
+ NULL,
+ 80,
diff --git a/httpd-2.4.25-r1738878.patch b/httpd-2.4.33-r1738878.patch
similarity index 71%
rename from httpd-2.4.25-r1738878.patch
rename to httpd-2.4.33-r1738878.patch
index e4b46cc..d7ef42f 100644
--- a/httpd-2.4.25-r1738878.patch
+++ b/httpd-2.4.33-r1738878.patch
@@ -1,28 +1,9 @@
diff --git a/modules/proxy/ajp.h b/modules/proxy/ajp.h
index c119a7e..267150a 100644
---- a/modules/proxy/ajp.h
-+++ b/modules/proxy/ajp.h
-@@ -413,12 +413,14 @@ apr_status_t ajp_ilink_receive(apr_socket_t *sock, ajp_msg_t *msg);
- * @param sock backend socket
- * @param r current request
- * @param buffsize max size of the AJP packet.
-+ * @param secret authentication secret
- * @param uri requested uri
- * @return APR_SUCCESS or error
- */
- apr_status_t ajp_send_header(apr_socket_t *sock, request_rec *r,
- apr_size_t buffsize,
-- apr_uri_t *uri);
-+ apr_uri_t *uri,
-+ const char *secret);
-
- /**
- * Read the ajp message and return the type of the message.
-diff --git a/modules/proxy/ajp_header.c b/modules/proxy/ajp_header.c
-index 67353a7..680a8f3 100644
---- a/modules/proxy/ajp_header.c
-+++ b/modules/proxy/ajp_header.c
-@@ -213,7 +213,8 @@ AJPV13_REQUEST/AJPV14_REQUEST=
+diff -uap httpd-2.4.33/modules/proxy/ajp_header.c.r1738878 httpd-2.4.33/modules/proxy/ajp_header.c
+--- httpd-2.4.33/modules/proxy/ajp_header.c.r1738878
++++ httpd-2.4.33/modules/proxy/ajp_header.c
+@@ -213,7 +213,8 @@
static apr_status_t ajp_marshal_into_msgb(ajp_msg_t *msg,
request_rec *r,
@@ -32,7 +13,7 @@ index 67353a7..680a8f3 100644
{
int method;
apr_uint32_t i, num_headers = 0;
-@@ -293,17 +294,15 @@ static apr_status_t ajp_marshal_into_msgb(ajp_msg_t *msg,
+@@ -293,17 +294,15 @@
i, elts[i].key, elts[i].val);
}
@@ -53,7 +34,7 @@ index 67353a7..680a8f3 100644
if (r->user) {
if (ajp_msg_append_uint8(msg, SC_A_REMOTE_USER) ||
-@@ -671,7 +670,8 @@ static apr_status_t ajp_unmarshal_response(ajp_msg_t *msg,
+@@ -671,7 +670,8 @@
apr_status_t ajp_send_header(apr_socket_t *sock,
request_rec *r,
apr_size_t buffsize,
@@ -63,7 +44,7 @@ index 67353a7..680a8f3 100644
{
ajp_msg_t *msg;
apr_status_t rc;
-@@ -683,7 +683,7 @@ apr_status_t ajp_send_header(apr_socket_t *sock,
+@@ -683,7 +683,7 @@
return rc;
}
@@ -72,48 +53,29 @@ index 67353a7..680a8f3 100644
if (rc != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00988)
"ajp_send_header: ajp_marshal_into_msgb failed");
-diff --git a/modules/proxy/mod_proxy.c b/modules/proxy/mod_proxy.c
-index f6fb473..f693f63 100644
---- a/modules/proxy/mod_proxy.c
-+++ b/modules/proxy/mod_proxy.c
-@@ -314,6 +314,12 @@ static const char *set_worker_param(apr_pool_t *p,
- (int)sizeof(worker->s->upgrade));
- }
- }
-+ else if (!strcasecmp(key, "secret")) {
-+ if (PROXY_STRNCPY(worker->s->secret, val) != APR_SUCCESS) {
-+ return apr_psprintf(p, "Secret length must be < %d characters",
-+ (int)sizeof(worker->s->secret));
-+ }
-+ }
- else {
- if (set_worker_hc_param_f) {
- return set_worker_hc_param_f(p, s, worker, key, val, NULL);
-diff --git a/modules/proxy/mod_proxy.h b/modules/proxy/mod_proxy.h
-index 8a0ad10..f92c185 100644
---- a/modules/proxy/mod_proxy.h
-+++ b/modules/proxy/mod_proxy.h
-@@ -352,6 +352,7 @@ PROXY_WORKER_HC_FAIL )
- #define PROXY_WORKER_MAX_HOSTNAME_SIZE 64
- #define PROXY_BALANCER_MAX_HOSTNAME_SIZE PROXY_WORKER_MAX_HOSTNAME_SIZE
- #define PROXY_BALANCER_MAX_STICKY_SIZE 64
-+#define PROXY_WORKER_MAX_SECRET_SIZE 64
+diff -uap httpd-2.4.33/modules/proxy/ajp.h.r1738878 httpd-2.4.33/modules/proxy/ajp.h
+--- httpd-2.4.33/modules/proxy/ajp.h.r1738878
++++ httpd-2.4.33/modules/proxy/ajp.h
+@@ -413,12 +413,14 @@
+ * @param sock backend socket
+ * @param r current request
+ * @param buffsize max size of the AJP packet.
++ * @param secret authentication secret
+ * @param uri requested uri
+ * @return APR_SUCCESS or error
+ */
+ apr_status_t ajp_send_header(apr_socket_t *sock, request_rec *r,
+ apr_size_t buffsize,
+- apr_uri_t *uri);
++ apr_uri_t *uri,
++ const char *secret);
- /* RFC-1035 mentions limits of 255 for host-names and 253 for domain-names,
- * dotted together(?) this would fit the below size (+ trailing NUL).
-@@ -443,6 +444,7 @@ typedef struct {
- hcmethod_t method; /* method to use for health check */
- apr_interval_time_t interval;
- char upgrade[PROXY_WORKER_MAX_SCHEME_SIZE];/* upgrade protocol used by mod_proxy_wstunnel */
-+ char secret[PROXY_WORKER_MAX_SECRET_SIZE]; /* authentication secret (e.g. AJP13) */
- } proxy_worker_shared;
-
- #define ALIGNED_PROXY_WORKER_SHARED_SIZE (APR_ALIGN_DEFAULT(sizeof(proxy_worker_shared)))
-diff --git a/modules/proxy/mod_proxy_ajp.c b/modules/proxy/mod_proxy_ajp.c
-index 051724e..e706518 100644
---- a/modules/proxy/mod_proxy_ajp.c
-+++ b/modules/proxy/mod_proxy_ajp.c
-@@ -193,6 +193,7 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
+ /**
+ * Read the ajp message and return the type of the message.
+diff -uap httpd-2.4.33/modules/proxy/mod_proxy_ajp.c.r1738878 httpd-2.4.33/modules/proxy/mod_proxy_ajp.c
+--- httpd-2.4.33/modules/proxy/mod_proxy_ajp.c.r1738878
++++ httpd-2.4.33/modules/proxy/mod_proxy_ajp.c
+@@ -193,6 +193,7 @@
apr_off_t content_length = 0;
int original_status = r->status;
const char *original_status_line = r->status_line;
@@ -121,7 +83,7 @@ index 051724e..e706518 100644
if (psf->io_buffer_size_set)
maxsize = psf->io_buffer_size;
-@@ -202,12 +203,15 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
+@@ -202,12 +203,15 @@
maxsize = AJP_MSG_BUFFER_SZ;
maxsize = APR_ALIGN(maxsize, 1024);
@@ -138,3 +100,38 @@ index 051724e..e706518 100644
if (status != APR_SUCCESS) {
conn->close = 1;
ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(00868)
+diff -uap httpd-2.4.33/modules/proxy/mod_proxy.c.r1738878 httpd-2.4.33/modules/proxy/mod_proxy.c
+--- httpd-2.4.33/modules/proxy/mod_proxy.c.r1738878
++++ httpd-2.4.33/modules/proxy/mod_proxy.c
+@@ -318,6 +318,12 @@
+ (int)sizeof(worker->s->upgrade));
+ }
+ }
++ else if (!strcasecmp(key, "secret")) {
++ if (PROXY_STRNCPY(worker->s->secret, val) != APR_SUCCESS) {
++ return apr_psprintf(p, "Secret length must be < %d characters",
++ (int)sizeof(worker->s->secret));
++ }
++ }
+ else {
+ if (set_worker_hc_param_f) {
+ return set_worker_hc_param_f(p, s, worker, key, val, NULL);
+diff -uap httpd-2.4.33/modules/proxy/mod_proxy.h.r1738878 httpd-2.4.33/modules/proxy/mod_proxy.h
+--- httpd-2.4.33/modules/proxy/mod_proxy.h.r1738878
++++ httpd-2.4.33/modules/proxy/mod_proxy.h
+@@ -353,6 +353,7 @@
+ #define PROXY_WORKER_MAX_HOSTNAME_SIZE 64
+ #define PROXY_BALANCER_MAX_HOSTNAME_SIZE PROXY_WORKER_MAX_HOSTNAME_SIZE
+ #define PROXY_BALANCER_MAX_STICKY_SIZE 64
++#define PROXY_WORKER_MAX_SECRET_SIZE 64
+
+ #define PROXY_RFC1035_HOSTNAME_SIZE 256
+
+@@ -447,6 +448,7 @@
+ apr_interval_time_t interval;
+ char upgrade[PROXY_WORKER_MAX_SCHEME_SIZE];/* upgrade protocol used by mod_proxy_wstunnel */
+ char hostname_ex[PROXY_RFC1035_HOSTNAME_SIZE]; /* RFC1035 compliant version of the remote backend address */
++ char secret[PROXY_WORKER_MAX_SECRET_SIZE]; /* authentication secret (e.g. AJP13) */
+ } proxy_worker_shared;
+
+ #define ALIGNED_PROXY_WORKER_SHARED_SIZE (APR_ALIGN_DEFAULT(sizeof(proxy_worker_shared)))
diff --git a/httpd-2.4.17-sslciphdefault.patch b/httpd-2.4.33-sslciphdefault.patch
similarity index 75%
rename from httpd-2.4.17-sslciphdefault.patch
rename to httpd-2.4.33-sslciphdefault.patch
index 8efc461..f2919b8 100644
--- a/httpd-2.4.17-sslciphdefault.patch
+++ b/httpd-2.4.33-sslciphdefault.patch
@@ -3,9 +3,9 @@ https://bugzilla.redhat.com/show_bug.cgi?id=1109119
Don't prepend !aNULL etc if PROFILE= is used with SSLCipherSuite.
---- httpd-2.4.17/modules/ssl/ssl_engine_config.c.sslciphdefault
-+++ httpd-2.4.17/modules/ssl/ssl_engine_config.c
-@@ -708,8 +708,10 @@ const char *ssl_cmd_SSLCipherSuite(cmd_p
+--- httpd-2.4.33/modules/ssl/ssl_engine_config.c.sslciphdefault
++++ httpd-2.4.33/modules/ssl/ssl_engine_config.c
+@@ -758,8 +758,10 @@
SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
SSLDirConfigRec *dc = (SSLDirConfigRec *)dcfg;
@@ -18,9 +18,9 @@ Don't prepend !aNULL etc if PROFILE= is used with SSLCipherSuite.
if (cmd->path) {
dc->szCipherSuite = arg;
-@@ -1428,8 +1430,10 @@ const char *ssl_cmd_SSLProxyCipherSuite(
+@@ -1502,8 +1504,10 @@
{
- SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
+ SSLDirConfigRec *dc = (SSLDirConfigRec *)dcfg;
- /* always disable null and export ciphers */
- arg = apr_pstrcat(cmd->pool, arg, ":!aNULL:!eNULL:!EXP", NULL);
@@ -29,5 +29,5 @@ Don't prepend !aNULL etc if PROFILE= is used with SSLCipherSuite.
+ if (strncmp(arg, "PROFILE=", 8) != 0)
+ arg = apr_pstrcat(cmd->pool, arg, ":!aNULL:!eNULL:!EXP", NULL);
- sc->proxy->auth.cipher_suite = arg;
+ dc->proxy->auth.cipher_suite = arg;
diff --git a/httpd.spec b/httpd.spec
index c82b88a..2cc7874 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -7,7 +7,7 @@
Summary: Apache HTTP Server
Name: httpd
-Version: 2.4.29
+Version: 2.4.33
Release: 1%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
@@ -37,6 +37,7 @@ Source25: 01-session.conf
Source26: 10-listen443.conf
Source27: httpd.socket
Source28: 00-optional.conf
+Source29: 01-md.conf
# Documentation
Source30: README.confd
Source31: README.confmod
@@ -52,7 +53,7 @@ Patch6: httpd-2.4.3-apctl-systemd.patch
# Needed for socket activation and mod_systemd patch
Patch19: httpd-2.4.25-detect-systemd.patch
# Features/functional changes
-Patch23: httpd-2.4.4-export.patch
+Patch23: httpd-2.4.33-export.patch
Patch24: httpd-2.4.1-corelimit.patch
Patch25: httpd-2.4.25-selinux.patch
Patch26: httpd-2.4.4-r1337344+.patch
@@ -61,10 +62,12 @@ Patch29: httpd-2.4.27-systemd.patch
Patch30: httpd-2.4.4-cachehardmax.patch
Patch31: httpd-2.4.18-sslmultiproxy.patch
Patch34: httpd-2.4.17-socket-activation.patch
-Patch35: httpd-2.4.17-sslciphdefault.patch
+Patch35: httpd-2.4.33-sslciphdefault.patch
+
# Bug fixes
# https://bugzilla.redhat.com/show_bug.cgi?id=1397243
-Patch58: httpd-2.4.25-r1738878.patch
+Patch58: httpd-2.4.33-r1738878.patch
+
# Security fixes
License: ASL 2.0
@@ -156,6 +159,19 @@ The mod_ssl module provides strong cryptography for the Apache Web
server via the Secure Sockets Layer (SSL) and Transport Layer
Security (TLS) protocols.
+%package -n mod_md
+Group: System Environment/Daemons
+Summary: Certificate provisioning using ACME for the Apache HTTP Server
+Requires: httpd = 0:%{version}-%{release}, httpd-mmn = %{mmnisa}
+BuildRequires: jansson-devel, libcurl-devel
+
+%description -n mod_md
+This module manages common properties of domains for one or more
+virtual hosts. Specifically it can use the ACME protocol (RFC Draft)
+to automate certificate provisioning. These will be configured for
+managed domains and their virtual hosts automatically. This includes
+renewal of certificates before they expire.
+
%package -n mod_proxy_html
Group: System Environment/Daemons
Summary: HTML and XML content filters for the Apache HTTP Server
@@ -204,7 +220,7 @@ interface for storing and accessing per-user session data.
%patch27 -p1 -b .icons
%patch29 -p1 -b .systemd
%patch30 -p1 -b .cachehardmax
-%patch31 -p1 -b .sslmultiproxy
+#patch31 -p1 -b .sslmultiproxy
%patch34 -p1 -b .socketactivation
%patch35 -p1 -b .sslciphdefault
@@ -305,7 +321,8 @@ install -m 644 $RPM_SOURCE_DIR/README.confmod \
$RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.modules.d/README
for f in 00-base.conf 00-mpm.conf 00-lua.conf 01-cgi.conf 00-dav.conf \
00-proxy.conf 00-ssl.conf 01-ldap.conf 00-proxyhtml.conf \
- 01-ldap.conf 00-systemd.conf 01-session.conf 00-optional.conf; do
+ 01-ldap.conf 00-systemd.conf 01-session.conf 00-optional.conf \
+ 01-md.conf; do
install -m 644 -p $RPM_SOURCE_DIR/$f \
$RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.modules.d/$f
done
@@ -348,6 +365,7 @@ install -m 644 -p $RPM_SOURCE_DIR/httpd.tmpfiles \
# Other directories
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/dav \
+ $RPM_BUILD_ROOT%{_localstatedir}/lib/httpd \
$RPM_BUILD_ROOT/run/httpd/htcacheclean
# Substitute in defaults which are usually done (badly) by "make install"
@@ -407,6 +425,7 @@ ln -s ../../pixmaps/poweredby.png \
# symlinks for /etc/httpd
ln -s ../..%{_localstatedir}/log/httpd $RPM_BUILD_ROOT/etc/httpd/logs
+ln -s ../..%{_localstatedir}/lib/httpd $RPM_BUILD_ROOT/etc/httpd/state
ln -s /run/httpd $RPM_BUILD_ROOT/etc/httpd/run
ln -s ../..%{_libdir}/httpd/modules $RPM_BUILD_ROOT/etc/httpd/modules
@@ -563,6 +582,7 @@ rm -rf $RPM_BUILD_ROOT
%{_sysconfdir}/httpd/modules
%{_sysconfdir}/httpd/logs
+%{_sysconfdir}/httpd/state
%{_sysconfdir}/httpd/run
%dir %{_sysconfdir}/httpd/conf
%config(noreplace) %{_sysconfdir}/httpd/conf/httpd.conf
@@ -600,6 +620,7 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/httpd/modules/mod*.so
%exclude %{_libdir}/httpd/modules/mod_auth_form.so
%exclude %{_libdir}/httpd/modules/mod_ssl.so
+%exclude %{_libdir}/httpd/modules/mod_md.so
%exclude %{_libdir}/httpd/modules/mod_*ldap.so
%exclude %{_libdir}/httpd/modules/mod_proxy_html.so
%exclude %{_libdir}/httpd/modules/mod_xml2enc.so
@@ -618,6 +639,7 @@ rm -rf $RPM_BUILD_ROOT
%attr(0700,apache,apache) %dir /run/httpd/htcacheclean
%attr(0700,root,root) %dir %{_localstatedir}/log/httpd
%attr(0700,apache,apache) %dir %{_localstatedir}/lib/dav
+%attr(0700,apache,apache) %dir %{_localstatedir}/lib/httpd
%attr(0700,apache,apache) %dir %{_localstatedir}/cache/httpd
%attr(0700,apache,apache) %dir %{_localstatedir}/cache/httpd/proxy
@@ -677,6 +699,11 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/httpd/modules/mod_auth_form.so
%config(noreplace) %{_sysconfdir}/httpd/conf.modules.d/01-session.conf
+%files -n mod_md
+%defattr(-,root,root)
+%{_libdir}/httpd/modules/mod_md.so
+%config(noreplace) %{_sysconfdir}/httpd/conf.modules.d/01-md.conf
+
%files devel
%defattr(-,root,root)
%{_includedir}/httpd
@@ -688,6 +715,10 @@ rm -rf $RPM_BUILD_ROOT
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Wed Mar 28 2018 Joe Orton - 2.4.33-1
+- rebase to 2.4.33 (#1560174)
+- add mod_md subpackage; load mod_proxy_uwsgi by default
+
* Wed Oct 25 2017 Luboš Uhliarik - 2.4.29-1
- new version 2.4.29
diff --git a/sources b/sources
index 6978287..e8c3a89 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (httpd-2.4.29.tar.bz2) = 840982fd3d21463bc5c1747f211dfacf3abdf634d149e49bb49fd2e5deda140de602dbdf31e1bbe5337a48f718ab2261c408e83a8dd39a9291ee7b6b7a85639a
+SHA512 (httpd-2.4.33.tar.bz2) = e74b2b3346d67be45a8bc8a7cbb8eabf5c403a5cfe5797a976f94a539529843fbcdf03b9ca0548816b2cf37f4ce0eb301f8d5af25b1270fdf8dd9f5bf0585269
From cb3c26bd437510e9bcb18e04b43cc7b6a31f29c8 Mon Sep 17 00:00:00 2001
From: Adam Williamson
Date: Fri, 30 Mar 2018 17:24:23 -0700
Subject: [PATCH 083/359] Exclude mod_md config file from main package
(#1562413)
---
httpd.spec | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/httpd.spec b/httpd.spec
index 0ba512a..9429b61 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -13,7 +13,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.33
-Release: 1%{?dist}
+Release: 2%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -584,6 +584,7 @@ exit $rv
%exclude %{_sysconfdir}/httpd/conf.modules.d/00-proxyhtml.conf
%exclude %{_sysconfdir}/httpd/conf.modules.d/01-ldap.conf
%exclude %{_sysconfdir}/httpd/conf.modules.d/01-session.conf
+%exclude %{_sysconfdir}/httpd/conf.modules.d/01-md.conf
%config(noreplace) %{_sysconfdir}/sysconfig/htcacheclean
%ghost %{_sysconfdir}/sysconfig/httpd
@@ -703,6 +704,9 @@ exit $rv
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Fri Mar 30 2018 Adam Williamson - 2.4.33-2
+- Exclude mod_md config file from main package (#1562413)
+
* Wed Mar 28 2018 Joe Orton - 2.4.33-1
- rebase to 2.4.33 (#1560174)
- add mod_md subpackage; load mod_proxy_uwsgi by default
From f56e21847dd26be1e91112fef9ded50c737a89d7 Mon Sep 17 00:00:00 2001
From: Adam Williamson
Date: Fri, 30 Mar 2018 17:24:23 -0700
Subject: [PATCH 084/359] Exclude mod_md config file from main package
(#1562413)
---
httpd.spec | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/httpd.spec b/httpd.spec
index 2cc7874..dc1b559 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -8,7 +8,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.33
-Release: 1%{?dist}
+Release: 2%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -601,6 +601,7 @@ rm -rf $RPM_BUILD_ROOT
%exclude %{_sysconfdir}/httpd/conf.modules.d/00-proxyhtml.conf
%exclude %{_sysconfdir}/httpd/conf.modules.d/01-ldap.conf
%exclude %{_sysconfdir}/httpd/conf.modules.d/01-session.conf
+%exclude %{_sysconfdir}/httpd/conf.modules.d/01-md.conf
%config(noreplace) %{_sysconfdir}/sysconfig/htcacheclean
%ghost %{_sysconfdir}/sysconfig/httpd
@@ -715,6 +716,9 @@ rm -rf $RPM_BUILD_ROOT
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Fri Mar 30 2018 Adam Williamson - 2.4.33-2
+- Exclude mod_md config file from main package (#1562413)
+
* Wed Mar 28 2018 Joe Orton - 2.4.33-1
- rebase to 2.4.33 (#1560174)
- add mod_md subpackage; load mod_proxy_uwsgi by default
From 616eacccb0370d7c40fd43d10eb910b3ec4ebbad Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Thu, 12 Apr 2018 08:03:52 +0100
Subject: [PATCH 085/359] mod_ssl: drop implicit 'SSLEngine on' for vhost w/o
certs (#1564537) Resolves: rhbz#1564537
---
httpd-2.4.33-sslmerging.patch | 15 +++++++++++++++
httpd.spec | 8 +++++++-
2 files changed, 22 insertions(+), 1 deletion(-)
create mode 100644 httpd-2.4.33-sslmerging.patch
diff --git a/httpd-2.4.33-sslmerging.patch b/httpd-2.4.33-sslmerging.patch
new file mode 100644
index 0000000..066b5c8
--- /dev/null
+++ b/httpd-2.4.33-sslmerging.patch
@@ -0,0 +1,15 @@
+
+https://bugzilla.redhat.com/show_bug.cgi?id=1564537
+
+--- httpd-2.4.33/modules/ssl/ssl_engine_init.c.sslmerging
++++ httpd-2.4.33/modules/ssl/ssl_engine_init.c
+@@ -261,7 +261,8 @@
+ * the protocol is https. */
+ if (ap_get_server_protocol(s)
+ && strcmp("https", ap_get_server_protocol(s)) == 0
+- && sc->enabled == SSL_ENABLED_UNSET) {
++ && sc->enabled == SSL_ENABLED_UNSET
++ && (!apr_is_empty_array(sc->server->pks->cert_files))) {
+ sc->enabled = SSL_ENABLED_TRUE;
+ }
+
diff --git a/httpd.spec b/httpd.spec
index 9429b61..7fc519a 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -13,7 +13,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.33
-Release: 2%{?dist}
+Release: 3%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -74,6 +74,8 @@ Patch35: httpd-2.4.33-sslciphdefault.patch
# Bug fixes
# https://bugzilla.redhat.com/show_bug.cgi?id=1397243
Patch58: httpd-2.4.33-r1738878.patch
+# https://bugzilla.redhat.com/show_bug.cgi?id=1564537
+Patch59: httpd-2.4.33-sslmerging.patch
# Security fixes
@@ -227,6 +229,7 @@ interface for storing and accessing per-user session data.
%patch34 -p1 -b .socketactivation
%patch35 -p1 -b .sslciphdefault
%patch58 -p1 -b .r1738878
+%patch59 -p1 -b .sslmerging
# Patch in the vendor string
sed -i '/^#define PLATFORM/s/Unix/%{vstring}/' os/unix/os.h
@@ -704,6 +707,9 @@ exit $rv
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Thu Apr 12 2018 Joe Orton - 2.4.33-3
+- mod_ssl: drop implicit 'SSLEngine on' for vhost w/o certs (#1564537)
+
* Fri Mar 30 2018 Adam Williamson - 2.4.33-2
- Exclude mod_md config file from main package (#1562413)
From e41c00658ac1bb7e8df1a5201e06dd2d7bd39c48 Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Mon, 16 Apr 2018 08:24:31 +0100
Subject: [PATCH 086/359] - mod_ssl: fix mod_nss compat patch (Rob Crittenden,
#1566511)
---
httpd-2.4.33-sslmultiproxy.patch | 140 +++++++++++++++++++++++++++++++
1 file changed, 140 insertions(+)
create mode 100644 httpd-2.4.33-sslmultiproxy.patch
diff --git a/httpd-2.4.33-sslmultiproxy.patch b/httpd-2.4.33-sslmultiproxy.patch
new file mode 100644
index 0000000..5879134
--- /dev/null
+++ b/httpd-2.4.33-sslmultiproxy.patch
@@ -0,0 +1,140 @@
+From 11f3375333ca795939d90e14a761f2f288034704 Mon Sep 17 00:00:00 2001
+From: Rob Crittenden
+Date: Fri, 13 Apr 2018 11:14:57 -0400
+Subject: [PATCH] Update sslmultiproxy patch to work with 2.4.33
+
+---
+ httpd-2.4.18-sslmultiproxy.patch | 85 +++++++++++++++++++++++++++-------------
+ 1 file changed, 58 insertions(+), 27 deletions(-)
+
+diff --git a/httpd-2.4.18-sslmultiproxy.patch b/httpd-2.4.18-sslmultiproxy.patch
+index 3f00f3f..9e311ea 100644
+--- a/httpd-2.4.18-sslmultiproxy.patch
++++ b/httpd-2.4.18-sslmultiproxy.patch
+@@ -1,53 +1,81 @@
++From ce2d1d7d4b2bebe34cf37fdeb30d35050092c5b5 Mon Sep 17 00:00:00 2001
++From: Rob Crittenden
++Date: Thu, 12 Apr 2018 14:36:28 -0400
++Subject: [PATCH] httpd-2.4.18-sslmultiproxy.patch
++
++---
++ modules/ssl/mod_ssl.c | 24 ++++++++++++++++++++++--
++ modules/ssl/ssl_engine_vars.c | 18 +++++++++++++++++-
++ 2 files changed, 39 insertions(+), 3 deletions(-)
++
+ diff --git a/modules/ssl/mod_ssl.c b/modules/ssl/mod_ssl.c
+-index 717a694..a3ce718 100644
++index 48d64cb..42e85a3 100644
+ --- a/modules/ssl/mod_ssl.c
+ +++ b/modules/ssl/mod_ssl.c
+-@@ -395,6 +395,9 @@ static SSLConnRec *ssl_init_connection_ctx(conn_rec *c)
+- return sslconn;
++@@ -444,12 +444,19 @@ static int ssl_hook_pre_config(apr_pool_t *pconf,
++ return OK;
+ }
+
+-+static typeof(ssl_proxy_enable) *othermod_proxy_enable;
+ +static typeof(ssl_engine_disable) *othermod_engine_disable;
+++static typeof(ssl_engine_set) *othermod_engine_set;
+ +
+- int ssl_proxy_enable(conn_rec *c)
++ static SSLConnRec *ssl_init_connection_ctx(conn_rec *c,
++ ap_conf_vector_t *per_dir_config)
+ {
+- SSLSrvConfigRec *sc;
+-@@ -403,6 +406,12 @@ int ssl_proxy_enable(conn_rec *c)
+- sc = mySrvConfig(sslconn->server);
+-
+- if (!sc->proxy_enabled) {
+-+ if (othermod_proxy_enable) {
+-+ ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c,
+-+ "mod_ssl proxy not configured, passing through to other module.");
+-+ return othermod_proxy_enable(c);
+-+ }
+-+
+- ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, c, APLOGNO(01961)
+- "SSL Proxy requested for %s but not enabled "
+- "[Hint: SSLProxyEngine]", sc->vhost_id);
+-@@ -422,6 +431,10 @@ int ssl_engine_disable(conn_rec *c)
+-
+ SSLConnRec *sslconn = myConnConfig(c);
++ SSLSrvConfigRec *sc;
+
+ + if (othermod_engine_disable) {
+ + othermod_engine_disable(c);
+ + }
+ +
+ if (sslconn) {
+- sc = mySrvConfig(sslconn->server);
++ return sslconn;
+ }
+-@@ -621,6 +634,9 @@ static void ssl_register_hooks(apr_pool_t *p)
+- ap_hook_post_read_request(ssl_hook_ReadReq, pre_prr,NULL, APR_HOOK_MIDDLE);
++@@ -508,6 +515,10 @@ static int ssl_engine_set(conn_rec *c,
++ {
++ SSLConnRec *sslconn;
++ int status;
+++
+++ if (othermod_engine_set) {
+++ return othermod_engine_set(c, per_dir_config, proxy, enable);
+++ }
++
++ if (proxy) {
++ sslconn = ssl_init_connection_ctx(c, per_dir_config);
++@@ -537,12 +548,18 @@ static int ssl_engine_set(conn_rec *c,
++
++ static int ssl_proxy_enable(conn_rec *c)
++ {
++- return ssl_engine_set(c, NULL, 1, 1);
+++ if (othermod_engine_set)
+++ return othermod_engine_set(c, NULL, 1, 1);
+++ else
+++ return ssl_engine_set(c, NULL, 1, 1);
++ }
++
++ static int ssl_engine_disable(conn_rec *c)
++ {
++- return ssl_engine_set(c, NULL, 0, 0);
+++ if (othermod_engine_set)
+++ return othermod_engine_set(c, NULL, 0, 0);
+++ else
+++ return ssl_engine_set(c, NULL, 0, 0);
++ }
++
++ int ssl_init_ssl_connection(conn_rec *c, request_rec *r)
++@@ -730,6 +747,9 @@ static void ssl_register_hooks(apr_pool_t *p)
++ APR_HOOK_MIDDLE);
+
+ ssl_var_register(p);
+ +
+-+ othermod_proxy_enable = APR_RETRIEVE_OPTIONAL_FN(ssl_proxy_enable);
+ + othermod_engine_disable = APR_RETRIEVE_OPTIONAL_FN(ssl_engine_disable);
+++ othermod_engine_set = APR_RETRIEVE_OPTIONAL_FN(ssl_engine_set);
+
+ APR_REGISTER_OPTIONAL_FN(ssl_proxy_enable);
+ APR_REGISTER_OPTIONAL_FN(ssl_engine_disable);
+ diff --git a/modules/ssl/ssl_engine_vars.c b/modules/ssl/ssl_engine_vars.c
+-index a6b0d0d..24fd8c7 100644
++index a28d4dd..caf7131 100644
+ --- a/modules/ssl/ssl_engine_vars.c
+ +++ b/modules/ssl/ssl_engine_vars.c
+ @@ -54,6 +54,8 @@ static char *ssl_var_lookup_ssl_cipher(apr_pool_t *p, SSLConnRec *sslconn, char
+@@ -80,7 +108,7 @@ index a6b0d0d..24fd8c7 100644
+ APR_REGISTER_OPTIONAL_FN(ssl_is_https);
+ APR_REGISTER_OPTIONAL_FN(ssl_var_lookup);
+ APR_REGISTER_OPTIONAL_FN(ssl_ext_list);
+-@@ -272,6 +279,15 @@ char *ssl_var_lookup(apr_pool_t *p, server_rec *s, conn_rec *c, request_rec *r,
++@@ -271,6 +278,15 @@ char *ssl_var_lookup(apr_pool_t *p, server_rec *s, conn_rec *c, request_rec *r,
+ */
+ if (result == NULL && c != NULL) {
+ SSLConnRec *sslconn = ssl_get_effective_config(c);
+@@ -96,3 +124,6 @@ index a6b0d0d..24fd8c7 100644
+ if (strlen(var) > 4 && strcEQn(var, "SSL_", 4)
+ && sslconn && sslconn->ssl)
+ result = ssl_var_lookup_ssl(p, sslconn, r, var+4);
++--
++2.14.3
++
+--
+2.13.6
+
From dbbe3f2b69ca74595353ec34337693492f1f2f8d Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Mon, 16 Apr 2018 08:25:48 +0100
Subject: [PATCH 087/359] mod_ssl: fix mod_nss compat patch (Rob Crittenden,
#1566511) mod_md: change hard-coded default MdStoreDir to state/md (#1563846)
Resolves: rhbz#1566511 Resolves: rhbz#1563846
---
httpd.spec | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/httpd.spec b/httpd.spec
index 7fc519a..4702136 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -13,7 +13,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.33
-Release: 3%{?dist}
+Release: 4%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -60,6 +60,7 @@ Patch6: httpd-2.4.3-apctl-systemd.patch
# Needed for socket activation and mod_systemd patch
Patch19: httpd-2.4.25-detect-systemd.patch
# Features/functional changes
+Patch21: httpd-2.4.33-mddefault.patch
Patch23: httpd-2.4.33-export.patch
Patch24: httpd-2.4.1-corelimit.patch
Patch25: httpd-2.4.25-selinux.patch
@@ -218,6 +219,7 @@ interface for storing and accessing per-user session data.
%patch19 -p1 -b .detectsystemd
+%patch21 -p1 -b .mddefault
%patch23 -p1 -b .export
%patch24 -p1 -b .corelimit
%patch25 -p1 -b .selinux
@@ -225,7 +227,7 @@ interface for storing and accessing per-user session data.
%patch27 -p1 -b .icons
%patch29 -p1 -b .systemd
%patch30 -p1 -b .cachehardmax
-#patch31 -p1 -b .sslmultiproxy
+%patch31 -p1 -b .sslmultiproxy
%patch34 -p1 -b .socketactivation
%patch35 -p1 -b .sslciphdefault
%patch58 -p1 -b .r1738878
@@ -707,6 +709,10 @@ exit $rv
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Mon Apr 16 2018 Joe Orton - 2.4.33-4
+- mod_ssl: fix mod_nss compat patch (Rob Crittenden, #1566511)
+- mod_md: change hard-coded default MdStoreDir to state/md (#1563846)
+
* Thu Apr 12 2018 Joe Orton - 2.4.33-3
- mod_ssl: drop implicit 'SSLEngine on' for vhost w/o certs (#1564537)
From 480519c1a79db4c982937cf1be5ac43f944d2f1c Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Mon, 16 Apr 2018 08:28:27 +0100
Subject: [PATCH 088/359] Fix to use correct multiproxy patch.
---
httpd-2.4.18-sslmultiproxy.patch | 98 --------------------------------
1 file changed, 98 deletions(-)
delete mode 100644 httpd-2.4.18-sslmultiproxy.patch
diff --git a/httpd-2.4.18-sslmultiproxy.patch b/httpd-2.4.18-sslmultiproxy.patch
deleted file mode 100644
index 3f00f3f..0000000
--- a/httpd-2.4.18-sslmultiproxy.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-diff --git a/modules/ssl/mod_ssl.c b/modules/ssl/mod_ssl.c
-index 717a694..a3ce718 100644
---- a/modules/ssl/mod_ssl.c
-+++ b/modules/ssl/mod_ssl.c
-@@ -395,6 +395,9 @@ static SSLConnRec *ssl_init_connection_ctx(conn_rec *c)
- return sslconn;
- }
-
-+static typeof(ssl_proxy_enable) *othermod_proxy_enable;
-+static typeof(ssl_engine_disable) *othermod_engine_disable;
-+
- int ssl_proxy_enable(conn_rec *c)
- {
- SSLSrvConfigRec *sc;
-@@ -403,6 +406,12 @@ int ssl_proxy_enable(conn_rec *c)
- sc = mySrvConfig(sslconn->server);
-
- if (!sc->proxy_enabled) {
-+ if (othermod_proxy_enable) {
-+ ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c,
-+ "mod_ssl proxy not configured, passing through to other module.");
-+ return othermod_proxy_enable(c);
-+ }
-+
- ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, c, APLOGNO(01961)
- "SSL Proxy requested for %s but not enabled "
- "[Hint: SSLProxyEngine]", sc->vhost_id);
-@@ -422,6 +431,10 @@ int ssl_engine_disable(conn_rec *c)
-
- SSLConnRec *sslconn = myConnConfig(c);
-
-+ if (othermod_engine_disable) {
-+ othermod_engine_disable(c);
-+ }
-+
- if (sslconn) {
- sc = mySrvConfig(sslconn->server);
- }
-@@ -621,6 +634,9 @@ static void ssl_register_hooks(apr_pool_t *p)
- ap_hook_post_read_request(ssl_hook_ReadReq, pre_prr,NULL, APR_HOOK_MIDDLE);
-
- ssl_var_register(p);
-+
-+ othermod_proxy_enable = APR_RETRIEVE_OPTIONAL_FN(ssl_proxy_enable);
-+ othermod_engine_disable = APR_RETRIEVE_OPTIONAL_FN(ssl_engine_disable);
-
- APR_REGISTER_OPTIONAL_FN(ssl_proxy_enable);
- APR_REGISTER_OPTIONAL_FN(ssl_engine_disable);
-diff --git a/modules/ssl/ssl_engine_vars.c b/modules/ssl/ssl_engine_vars.c
-index a6b0d0d..24fd8c7 100644
---- a/modules/ssl/ssl_engine_vars.c
-+++ b/modules/ssl/ssl_engine_vars.c
-@@ -54,6 +54,8 @@ static char *ssl_var_lookup_ssl_cipher(apr_pool_t *p, SSLConnRec *sslconn, char
- static void ssl_var_lookup_ssl_cipher_bits(SSL *ssl, int *usekeysize, int *algkeysize);
- static char *ssl_var_lookup_ssl_version(apr_pool_t *p, char *var);
- static char *ssl_var_lookup_ssl_compress_meth(SSL *ssl);
-+static APR_OPTIONAL_FN_TYPE(ssl_is_https) *othermod_is_https;
-+static APR_OPTIONAL_FN_TYPE(ssl_var_lookup) *othermod_var_lookup;
-
- static SSLConnRec *ssl_get_effective_config(conn_rec *c)
- {
-@@ -68,7 +70,9 @@ static SSLConnRec *ssl_get_effective_config(conn_rec *c)
- static int ssl_is_https(conn_rec *c)
- {
- SSLConnRec *sslconn = ssl_get_effective_config(c);
-- return sslconn && sslconn->ssl;
-+
-+ return (sslconn && sslconn->ssl)
-+ || (othermod_is_https && othermod_is_https(c));
- }
-
- static const char var_interface[] = "mod_ssl/" AP_SERVER_BASEREVISION;
-@@ -137,6 +141,9 @@ void ssl_var_register(apr_pool_t *p)
- {
- char *cp, *cp2;
-
-+ othermod_is_https = APR_RETRIEVE_OPTIONAL_FN(ssl_is_https);
-+ othermod_var_lookup = APR_RETRIEVE_OPTIONAL_FN(ssl_var_lookup);
-+
- APR_REGISTER_OPTIONAL_FN(ssl_is_https);
- APR_REGISTER_OPTIONAL_FN(ssl_var_lookup);
- APR_REGISTER_OPTIONAL_FN(ssl_ext_list);
-@@ -272,6 +279,15 @@ char *ssl_var_lookup(apr_pool_t *p, server_rec *s, conn_rec *c, request_rec *r,
- */
- if (result == NULL && c != NULL) {
- SSLConnRec *sslconn = ssl_get_effective_config(c);
-+
-+ if (strlen(var) > 4 && strcEQn(var, "SSL_", 4)
-+ && (!sslconn || !sslconn->ssl) && othermod_var_lookup) {
-+ /* For an SSL_* variable, if mod_ssl is not enabled for
-+ * this connection and another SSL module is present, pass
-+ * through to that module. */
-+ return othermod_var_lookup(p, s, c, r, var);
-+ }
-+
- if (strlen(var) > 4 && strcEQn(var, "SSL_", 4)
- && sslconn && sslconn->ssl)
- result = ssl_var_lookup_ssl(p, sslconn, r, var+4);
From 935fcaceb70646cf9aaef3b96883dffa3d6d6d37 Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Mon, 16 Apr 2018 08:44:11 +0100
Subject: [PATCH 089/359] Apply sslmultiproxy patch.
---
httpd-2.4.33-sslmultiproxy.patch | 254 +++++++++++++++----------------
1 file changed, 120 insertions(+), 134 deletions(-)
diff --git a/httpd-2.4.33-sslmultiproxy.patch b/httpd-2.4.33-sslmultiproxy.patch
index 5879134..679f229 100644
--- a/httpd-2.4.33-sslmultiproxy.patch
+++ b/httpd-2.4.33-sslmultiproxy.patch
@@ -1,140 +1,126 @@
-From 11f3375333ca795939d90e14a761f2f288034704 Mon Sep 17 00:00:00 2001
-From: Rob Crittenden
-Date: Fri, 13 Apr 2018 11:14:57 -0400
-Subject: [PATCH] Update sslmultiproxy patch to work with 2.4.33
+From ce2d1d7d4b2bebe34cf37fdeb30d35050092c5b5 Mon Sep 17 00:00:00 2001
+From: Rob Crittenden
+Date: Thu, 12 Apr 2018 14:36:28 -0400
+Subject: [PATCH] httpd-2.4.18-sslmultiproxy.patch
---
- httpd-2.4.18-sslmultiproxy.patch | 85 +++++++++++++++++++++++++++-------------
- 1 file changed, 58 insertions(+), 27 deletions(-)
+ modules/ssl/mod_ssl.c | 24 ++++++++++++++++++++++--
+ modules/ssl/ssl_engine_vars.c | 18 +++++++++++++++++-
+ 2 files changed, 39 insertions(+), 3 deletions(-)
-diff --git a/httpd-2.4.18-sslmultiproxy.patch b/httpd-2.4.18-sslmultiproxy.patch
-index 3f00f3f..9e311ea 100644
---- a/httpd-2.4.18-sslmultiproxy.patch
-+++ b/httpd-2.4.18-sslmultiproxy.patch
-@@ -1,53 +1,81 @@
-+From ce2d1d7d4b2bebe34cf37fdeb30d35050092c5b5 Mon Sep 17 00:00:00 2001
-+From: Rob Crittenden
-+Date: Thu, 12 Apr 2018 14:36:28 -0400
-+Subject: [PATCH] httpd-2.4.18-sslmultiproxy.patch
+diff --git a/modules/ssl/mod_ssl.c b/modules/ssl/mod_ssl.c
+index 48d64cb..42e85a3 100644
+diff -uap httpd-2.4.33/modules/ssl/mod_ssl.c.sslmultiproxy httpd-2.4.33/modules/ssl/mod_ssl.c
+--- httpd-2.4.33/modules/ssl/mod_ssl.c.sslmultiproxy
++++ httpd-2.4.33/modules/ssl/mod_ssl.c
+@@ -444,12 +444,19 @@
+ return OK;
+ }
+
++static APR_OPTIONAL_FN_TYPE(ssl_engine_disable) *othermod_engine_disable;
++static APR_OPTIONAL_FN_TYPE(ssl_engine_set) *othermod_engine_set;
+
-+---
-+ modules/ssl/mod_ssl.c | 24 ++++++++++++++++++++++--
-+ modules/ssl/ssl_engine_vars.c | 18 +++++++++++++++++-
-+ 2 files changed, 39 insertions(+), 3 deletions(-)
+ static SSLConnRec *ssl_init_connection_ctx(conn_rec *c,
+ ap_conf_vector_t *per_dir_config)
+ {
+ SSLConnRec *sslconn = myConnConfig(c);
+ SSLSrvConfigRec *sc;
+
++ if (othermod_engine_disable) {
++ othermod_engine_disable(c);
++ }
+
- diff --git a/modules/ssl/mod_ssl.c b/modules/ssl/mod_ssl.c
--index 717a694..a3ce718 100644
-+index 48d64cb..42e85a3 100644
- --- a/modules/ssl/mod_ssl.c
- +++ b/modules/ssl/mod_ssl.c
--@@ -395,6 +395,9 @@ static SSLConnRec *ssl_init_connection_ctx(conn_rec *c)
-- return sslconn;
-+@@ -444,12 +444,19 @@ static int ssl_hook_pre_config(apr_pool_t *pconf,
-+ return OK;
- }
-
--+static typeof(ssl_proxy_enable) *othermod_proxy_enable;
- +static typeof(ssl_engine_disable) *othermod_engine_disable;
-++static typeof(ssl_engine_set) *othermod_engine_set;
- +
-- int ssl_proxy_enable(conn_rec *c)
-+ static SSLConnRec *ssl_init_connection_ctx(conn_rec *c,
-+ ap_conf_vector_t *per_dir_config)
- {
-- SSLSrvConfigRec *sc;
--@@ -403,6 +406,12 @@ int ssl_proxy_enable(conn_rec *c)
-- sc = mySrvConfig(sslconn->server);
--
-- if (!sc->proxy_enabled) {
--+ if (othermod_proxy_enable) {
--+ ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c,
--+ "mod_ssl proxy not configured, passing through to other module.");
--+ return othermod_proxy_enable(c);
--+ }
--+
-- ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, c, APLOGNO(01961)
-- "SSL Proxy requested for %s but not enabled "
-- "[Hint: SSLProxyEngine]", sc->vhost_id);
--@@ -422,6 +431,10 @@ int ssl_engine_disable(conn_rec *c)
--
- SSLConnRec *sslconn = myConnConfig(c);
-+ SSLSrvConfigRec *sc;
-
- + if (othermod_engine_disable) {
- + othermod_engine_disable(c);
- + }
- +
- if (sslconn) {
-- sc = mySrvConfig(sslconn->server);
-+ return sslconn;
- }
--@@ -621,6 +634,9 @@ static void ssl_register_hooks(apr_pool_t *p)
-- ap_hook_post_read_request(ssl_hook_ReadReq, pre_prr,NULL, APR_HOOK_MIDDLE);
-+@@ -508,6 +515,10 @@ static int ssl_engine_set(conn_rec *c,
-+ {
-+ SSLConnRec *sslconn;
-+ int status;
-++
-++ if (othermod_engine_set) {
-++ return othermod_engine_set(c, per_dir_config, proxy, enable);
-++ }
-+
-+ if (proxy) {
-+ sslconn = ssl_init_connection_ctx(c, per_dir_config);
-+@@ -537,12 +548,18 @@ static int ssl_engine_set(conn_rec *c,
-+
-+ static int ssl_proxy_enable(conn_rec *c)
-+ {
-+- return ssl_engine_set(c, NULL, 1, 1);
-++ if (othermod_engine_set)
-++ return othermod_engine_set(c, NULL, 1, 1);
-++ else
-++ return ssl_engine_set(c, NULL, 1, 1);
-+ }
-+
-+ static int ssl_engine_disable(conn_rec *c)
-+ {
-+- return ssl_engine_set(c, NULL, 0, 0);
-++ if (othermod_engine_set)
-++ return othermod_engine_set(c, NULL, 0, 0);
-++ else
-++ return ssl_engine_set(c, NULL, 0, 0);
-+ }
-+
-+ int ssl_init_ssl_connection(conn_rec *c, request_rec *r)
-+@@ -730,6 +747,9 @@ static void ssl_register_hooks(apr_pool_t *p)
-+ APR_HOOK_MIDDLE);
-
- ssl_var_register(p);
- +
--+ othermod_proxy_enable = APR_RETRIEVE_OPTIONAL_FN(ssl_proxy_enable);
- + othermod_engine_disable = APR_RETRIEVE_OPTIONAL_FN(ssl_engine_disable);
-++ othermod_engine_set = APR_RETRIEVE_OPTIONAL_FN(ssl_engine_set);
-
- APR_REGISTER_OPTIONAL_FN(ssl_proxy_enable);
- APR_REGISTER_OPTIONAL_FN(ssl_engine_disable);
- diff --git a/modules/ssl/ssl_engine_vars.c b/modules/ssl/ssl_engine_vars.c
--index a6b0d0d..24fd8c7 100644
-+index a28d4dd..caf7131 100644
- --- a/modules/ssl/ssl_engine_vars.c
- +++ b/modules/ssl/ssl_engine_vars.c
- @@ -54,6 +54,8 @@ static char *ssl_var_lookup_ssl_cipher(apr_pool_t *p, SSLConnRec *sslconn, char
-@@ -80,7 +108,7 @@ index a6b0d0d..24fd8c7 100644
- APR_REGISTER_OPTIONAL_FN(ssl_is_https);
- APR_REGISTER_OPTIONAL_FN(ssl_var_lookup);
- APR_REGISTER_OPTIONAL_FN(ssl_ext_list);
--@@ -272,6 +279,15 @@ char *ssl_var_lookup(apr_pool_t *p, server_rec *s, conn_rec *c, request_rec *r,
-+@@ -271,6 +278,15 @@ char *ssl_var_lookup(apr_pool_t *p, server_rec *s, conn_rec *c, request_rec *r,
- */
- if (result == NULL && c != NULL) {
- SSLConnRec *sslconn = ssl_get_effective_config(c);
-@@ -96,3 +124,6 @@ index a6b0d0d..24fd8c7 100644
- if (strlen(var) > 4 && strcEQn(var, "SSL_", 4)
- && sslconn && sslconn->ssl)
- result = ssl_var_lookup_ssl(p, sslconn, r, var+4);
-+--
-+2.14.3
+ if (sslconn) {
+ return sslconn;
+ }
+@@ -508,6 +515,10 @@
+ {
+ SSLConnRec *sslconn;
+ int status;
+
---
-2.13.6
-
++ if (othermod_engine_set) {
++ return othermod_engine_set(c, per_dir_config, proxy, enable);
++ }
+
+ if (proxy) {
+ sslconn = ssl_init_connection_ctx(c, per_dir_config);
+@@ -537,12 +548,18 @@
+
+ static int ssl_proxy_enable(conn_rec *c)
+ {
+- return ssl_engine_set(c, NULL, 1, 1);
++ if (othermod_engine_set)
++ return othermod_engine_set(c, NULL, 1, 1);
++ else
++ return ssl_engine_set(c, NULL, 1, 1);
+ }
+
+ static int ssl_engine_disable(conn_rec *c)
+ {
+- return ssl_engine_set(c, NULL, 0, 0);
++ if (othermod_engine_set)
++ return othermod_engine_set(c, NULL, 0, 0);
++ else
++ return ssl_engine_set(c, NULL, 0, 0);
+ }
+
+ int ssl_init_ssl_connection(conn_rec *c, request_rec *r)
+@@ -730,6 +747,9 @@
+ APR_HOOK_MIDDLE);
+
+ ssl_var_register(p);
++
++ othermod_engine_disable = APR_RETRIEVE_OPTIONAL_FN(ssl_engine_disable);
++ othermod_engine_set = APR_RETRIEVE_OPTIONAL_FN(ssl_engine_set);
+
+ APR_REGISTER_OPTIONAL_FN(ssl_proxy_enable);
+ APR_REGISTER_OPTIONAL_FN(ssl_engine_disable);
+diff -uap httpd-2.4.33/modules/ssl/ssl_engine_vars.c.sslmultiproxy httpd-2.4.33/modules/ssl/ssl_engine_vars.c
+--- httpd-2.4.33/modules/ssl/ssl_engine_vars.c.sslmultiproxy
++++ httpd-2.4.33/modules/ssl/ssl_engine_vars.c
+@@ -54,6 +54,8 @@
+ static void ssl_var_lookup_ssl_cipher_bits(SSL *ssl, int *usekeysize, int *algkeysize);
+ static char *ssl_var_lookup_ssl_version(apr_pool_t *p, char *var);
+ static char *ssl_var_lookup_ssl_compress_meth(SSL *ssl);
++static APR_OPTIONAL_FN_TYPE(ssl_is_https) *othermod_is_https;
++static APR_OPTIONAL_FN_TYPE(ssl_var_lookup) *othermod_var_lookup;
+
+ static SSLConnRec *ssl_get_effective_config(conn_rec *c)
+ {
+@@ -68,7 +70,9 @@
+ static int ssl_is_https(conn_rec *c)
+ {
+ SSLConnRec *sslconn = ssl_get_effective_config(c);
+- return sslconn && sslconn->ssl;
++
++ return (sslconn && sslconn->ssl)
++ || (othermod_is_https && othermod_is_https(c));
+ }
+
+ static const char var_interface[] = "mod_ssl/" AP_SERVER_BASEREVISION;
+@@ -137,6 +141,9 @@
+ {
+ char *cp, *cp2;
+
++ othermod_is_https = APR_RETRIEVE_OPTIONAL_FN(ssl_is_https);
++ othermod_var_lookup = APR_RETRIEVE_OPTIONAL_FN(ssl_var_lookup);
++
+ APR_REGISTER_OPTIONAL_FN(ssl_is_https);
+ APR_REGISTER_OPTIONAL_FN(ssl_var_lookup);
+ APR_REGISTER_OPTIONAL_FN(ssl_ext_list);
+@@ -271,6 +278,15 @@
+ */
+ if (result == NULL && c != NULL) {
+ SSLConnRec *sslconn = ssl_get_effective_config(c);
++
++ if (strlen(var) > 4 && strcEQn(var, "SSL_", 4)
++ && (!sslconn || !sslconn->ssl) && othermod_var_lookup) {
++ /* For an SSL_* variable, if mod_ssl is not enabled for
++ * this connection and another SSL module is present, pass
++ * through to that module. */
++ return othermod_var_lookup(p, s, c, r, var);
++ }
++
+ if (strlen(var) > 4 && strcEQn(var, "SSL_", 4)
+ && sslconn && sslconn->ssl)
+ result = ssl_var_lookup_ssl(p, sslconn, r, var+4);
From 799dcecff84cab0900592a65440333e378b0a89a Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Mon, 16 Apr 2018 08:44:34 +0100
Subject: [PATCH 090/359] Use updated sslmultiproxy patch.
---
httpd.spec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/httpd.spec b/httpd.spec
index 4702136..b89f424 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -68,7 +68,7 @@ Patch26: httpd-2.4.4-r1337344+.patch
Patch27: httpd-2.4.2-icons.patch
Patch29: httpd-2.4.27-systemd.patch
Patch30: httpd-2.4.4-cachehardmax.patch
-Patch31: httpd-2.4.18-sslmultiproxy.patch
+Patch31: httpd-2.4.33-sslmultiproxy.patch
Patch34: httpd-2.4.17-socket-activation.patch
Patch35: httpd-2.4.33-sslciphdefault.patch
From 5860daab1113a7ccce3c7977e6d509c7df3dbd2b Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Thu, 19 Apr 2018 17:18:11 +0100
Subject: [PATCH 091/359] add httpd@.service; update httpd.service(8) and add
new stub
---
httpd.service.xml | 51 ++++++++++++++++++++++++++++++++++++++++++++---
httpd.spec | 23 +++++++++++++++++++--
httpd@.service | 23 +++++++++++++++++++++
instance.conf | 22 ++++++++++++++++++++
4 files changed, 114 insertions(+), 5 deletions(-)
create mode 100644 httpd@.service
create mode 100644 instance.conf
diff --git a/httpd.service.xml b/httpd.service.xml
index 8008b16..bc6c503 100644
--- a/httpd.service.xml
+++ b/httpd.service.xml
@@ -4,7 +4,7 @@
]>
From e47d696aed71fd566e6efbe939baa1342ab70e63 Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Fri, 6 Jul 2018 14:03:23 +0100
Subject: [PATCH 110/359] Filter patches harder.
---
pullrev.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pullrev.sh b/pullrev.sh
index 255cda4..8ed3a64 100755
--- a/pullrev.sh
+++ b/pullrev.sh
@@ -35,7 +35,7 @@ prev=/dev/null
for r in $*; do
echo "+ fetching ${r}"
this=`mktemp /tmp/pullrevXXXXXX`
- svn diff -c ${r} ${repo} | filterdiff --remove-timestamps --clean -x 'CHANGES' -x 'next-number' -x 'STATUS' \
+ svn diff -c ${r} ${repo} | filterdiff --remove-timestamps --clean -x 'CHANGES' -x '*/next-number' -x 'STATUS' \
--addprefix="${prefix}/" > ${this}
next=`mktemp /tmp/pullrevXXXXXX`
combinediff --quiet ${prev} ${this} > ${next}
From ea1a9f29fa33aec23b1805734829f22ae6592b35 Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Fri, 6 Jul 2018 14:03:44 +0100
Subject: [PATCH 111/359] Ignore mock builds.
---
.gitignore | 1 +
1 file changed, 1 insertion(+)
diff --git a/.gitignore b/.gitignore
index 29c6655..4f0a93f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -30,3 +30,4 @@ x86_64
/httpd-2.4.27.tar.bz2
/httpd-*.tar.bz2
/httpd*.8
+/results_httpd
From 1d78fa49cb5091b75ce3d2c8972665e211c1c6c0 Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Fri, 6 Jul 2018 14:04:07 +0100
Subject: [PATCH 112/359] mod_ssl: add PKCS#11 cert/key support (Anderson
Sasaki)
---
httpd-2.4.33-r1830819+.patch | 690 +++++++++++++++++++++++++++++++++++
httpd.spec | 8 +-
2 files changed, 697 insertions(+), 1 deletion(-)
create mode 100644 httpd-2.4.33-r1830819+.patch
diff --git a/httpd-2.4.33-r1830819+.patch b/httpd-2.4.33-r1830819+.patch
new file mode 100644
index 0000000..0b2d90d
--- /dev/null
+++ b/httpd-2.4.33-r1830819+.patch
@@ -0,0 +1,690 @@
+# ./pullrev.sh 1830819 1830836 1830912 1830913 1830927 1831168 1831173
+
+http://svn.apache.org/viewvc?view=revision&revision=1830819
+http://svn.apache.org/viewvc?view=revision&revision=1830912
+http://svn.apache.org/viewvc?view=revision&revision=1830913
+http://svn.apache.org/viewvc?view=revision&revision=1830927
+http://svn.apache.org/viewvc?view=revision&revision=1831168
+http://svn.apache.org/viewvc?view=revision&revision=1831173
+http://svn.apache.org/viewvc?view=revision&revision=1835240
+http://svn.apache.org/viewvc?view=revision&revision=1835242
+
+--- httpd-2.4.33/modules/ssl/ssl_engine_config.c.r1830819+
++++ httpd-2.4.33/modules/ssl/ssl_engine_config.c
+@@ -891,7 +891,9 @@
+ SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
+ const char *err;
+
+- if ((err = ssl_cmd_check_file(cmd, &arg))) {
++ /* Only check for non-ENGINE based certs. */
++ if (!modssl_is_engine_id(arg)
++ && (err = ssl_cmd_check_file(cmd, &arg))) {
+ return err;
+ }
+
+@@ -907,7 +909,9 @@
+ SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
+ const char *err;
+
+- if ((err = ssl_cmd_check_file(cmd, &arg))) {
++ /* Check keyfile exists for non-ENGINE keys. */
++ if (!modssl_is_engine_id(arg)
++ && (err = ssl_cmd_check_file(cmd, &arg))) {
+ return err;
+ }
+
+--- httpd-2.4.33/modules/ssl/ssl_engine_init.c.r1830819+
++++ httpd-2.4.33/modules/ssl/ssl_engine_init.c
+@@ -1181,12 +1182,18 @@
+ (certfile = APR_ARRAY_IDX(mctx->pks->cert_files, i,
+ const char *));
+ i++) {
++ EVP_PKEY *pkey;
++ const char *engine_certfile = NULL;
++
+ key_id = apr_psprintf(ptemp, "%s:%d", vhost_id, i);
+
+ ERR_clear_error();
+
+ /* first the certificate (public key) */
+- if (mctx->cert_chain) {
++ if (modssl_is_engine_id(certfile)) {
++ engine_certfile = certfile;
++ }
++ else if (mctx->cert_chain) {
+ if ((SSL_CTX_use_certificate_file(mctx->ssl_ctx, certfile,
+ SSL_FILETYPE_PEM) < 1)) {
+ ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(02561)
+@@ -1215,12 +1222,46 @@
+
+ ERR_clear_error();
+
+- if ((SSL_CTX_use_PrivateKey_file(mctx->ssl_ctx, keyfile,
+- SSL_FILETYPE_PEM) < 1) &&
+- (ERR_GET_FUNC(ERR_peek_last_error())
+- != X509_F_X509_CHECK_PRIVATE_KEY)) {
++ if (modssl_is_engine_id(keyfile)) {
++ apr_status_t rv;
++
++ cert = NULL;
++
++ if ((rv = modssl_load_engine_keypair(s, ptemp, vhost_id,
++ engine_certfile, keyfile,
++ &cert, &pkey))) {
++ return rv;
++ }
++
++ if (cert) {
++ if (SSL_CTX_use_certificate(mctx->ssl_ctx, cert) < 1) {
++ ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(10137)
++ "Failed to configure engine certificate %s, check %s",
++ key_id, certfile);
++ ssl_log_ssl_error(SSLLOG_MARK, APLOG_EMERG, s);
++ return APR_EGENERAL;
++ }
++
++ /* SSL_CTX now owns the cert. */
++ X509_free(cert);
++ }
++
++ if (SSL_CTX_use_PrivateKey(mctx->ssl_ctx, pkey) < 1) {
++ ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(10130)
++ "Failed to configure private key %s from engine",
++ keyfile);
++ ssl_log_ssl_error(SSLLOG_MARK, APLOG_EMERG, s);
++ return APR_EGENERAL;
++ }
++
++ /* SSL_CTX now owns the key */
++ EVP_PKEY_free(pkey);
++ }
++ else if ((SSL_CTX_use_PrivateKey_file(mctx->ssl_ctx, keyfile,
++ SSL_FILETYPE_PEM) < 1)
++ && (ERR_GET_FUNC(ERR_peek_last_error())
++ != X509_F_X509_CHECK_PRIVATE_KEY)) {
+ ssl_asn1_t *asn1;
+- EVP_PKEY *pkey;
+ const unsigned char *ptr;
+
+ ERR_clear_error();
+@@ -1307,8 +1348,9 @@
+ /*
+ * Try to read DH parameters from the (first) SSLCertificateFile
+ */
+- if ((certfile = APR_ARRAY_IDX(mctx->pks->cert_files, 0, const char *)) &&
+- (dhparams = ssl_dh_GetParamFromFile(certfile))) {
++ certfile = APR_ARRAY_IDX(mctx->pks->cert_files, 0, const char *);
++ if (certfile && !modssl_is_engine_id(certfile)
++ && (dhparams = ssl_dh_GetParamFromFile(certfile))) {
+ SSL_CTX_set_tmp_dh(mctx->ssl_ctx, dhparams);
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(02540)
+ "Custom DH parameters (%d bits) for %s loaded from %s",
+@@ -1320,10 +1362,10 @@
+ /*
+ * Similarly, try to read the ECDH curve name from SSLCertificateFile...
+ */
+- if ((certfile != NULL) &&
+- (ecparams = ssl_ec_GetParamFromFile(certfile)) &&
+- (nid = EC_GROUP_get_curve_name(ecparams)) &&
+- (eckey = EC_KEY_new_by_curve_name(nid))) {
++ if (certfile && !modssl_is_engine_id(certfile)
++ && (ecparams = ssl_ec_GetParamFromFile(certfile))
++ && (nid = EC_GROUP_get_curve_name(ecparams))
++ && (eckey = EC_KEY_new_by_curve_name(nid))) {
+ SSL_CTX_set_tmp_ecdh(mctx->ssl_ctx, eckey);
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(02541)
+ "ECDH curve %s for %s specified in %s",
+--- httpd-2.4.33/modules/ssl/ssl_engine_pphrase.c.r1830819+
++++ httpd-2.4.33/modules/ssl/ssl_engine_pphrase.c
+@@ -143,9 +143,6 @@
+ const char *key_id = asn1_table_vhost_key(mc, p, sc->vhost_id, idx);
+ EVP_PKEY *pPrivateKey = NULL;
+ ssl_asn1_t *asn1;
+- unsigned char *ucp;
+- long int length;
+- BOOL bReadable;
+ int nPassPhrase = (*pphrases)->nelts;
+ int nPassPhraseRetry = 0;
+ apr_time_t pkey_mtime = 0;
+@@ -222,16 +219,12 @@
+ * is not empty. */
+ ERR_clear_error();
+
+- bReadable = ((pPrivateKey = modssl_read_privatekey(ppcb_arg.pkey_file,
+- NULL, ssl_pphrase_Handle_CB, &ppcb_arg)) != NULL ?
+- TRUE : FALSE);
+-
+- /*
+- * when the private key file now was readable,
+- * it's fine and we go out of the loop
+- */
+- if (bReadable)
+- break;
++ pPrivateKey = modssl_read_privatekey(ppcb_arg.pkey_file,
++ ssl_pphrase_Handle_CB, &ppcb_arg);
++ /* If the private key was successfully read, nothing more to
++ do here. */
++ if (pPrivateKey != NULL)
++ break;
+
+ /*
+ * when we have more remembered pass phrases
+@@ -356,19 +349,12 @@
+ nPassPhrase++;
+ }
+
+- /*
+- * Insert private key into the global module configuration
+- * (we convert it to a stand-alone DER byte sequence
+- * because the SSL library uses static variables inside a
+- * RSA structure which do not survive DSO reloads!)
+- */
+- length = i2d_PrivateKey(pPrivateKey, NULL);
+- ucp = ssl_asn1_table_set(mc->tPrivateKey, key_id, length);
+- (void)i2d_PrivateKey(pPrivateKey, &ucp); /* 2nd arg increments */
++ /* Cache the private key in the global module configuration so it
++ * can be used after subsequent reloads. */
++ asn1 = ssl_asn1_table_set(mc->tPrivateKey, key_id, pPrivateKey);
+
+ if (ppcb_arg.nPassPhraseDialogCur != 0) {
+ /* remember mtime of encrypted keys */
+- asn1 = ssl_asn1_table_get(mc->tPrivateKey, key_id);
+ asn1->source_mtime = pkey_mtime;
+ }
+
+@@ -619,3 +605,288 @@
+ */
+ return (len);
+ }
++
++
++#if defined(HAVE_OPENSSL_ENGINE_H) && defined(HAVE_ENGINE_INIT)
++
++/* OpenSSL UI implementation for passphrase entry; largely duplicated
++ * from ssl_pphrase_Handle_CB but adjusted for UI API. TODO: Might be
++ * worth trying to shift pphrase handling over to the UI API
++ * completely. */
++static int passphrase_ui_open(UI *ui)
++{
++ pphrase_cb_arg_t *ppcb = UI_get0_user_data(ui);
++ SSLSrvConfigRec *sc = mySrvConfig(ppcb->s);
++
++ ppcb->nPassPhraseDialog++;
++ ppcb->nPassPhraseDialogCur++;
++
++ /*
++ * Builtin or Pipe dialog
++ */
++ if (sc->server->pphrase_dialog_type == SSL_PPTYPE_BUILTIN
++ || sc->server->pphrase_dialog_type == SSL_PPTYPE_PIPE) {
++ if (sc->server->pphrase_dialog_type == SSL_PPTYPE_PIPE) {
++ if (!readtty) {
++ ap_log_error(APLOG_MARK, APLOG_INFO, 0, ppcb->s,
++ APLOGNO(10143)
++ "Init: Creating pass phrase dialog pipe child "
++ "'%s'", sc->server->pphrase_dialog_path);
++ if (ssl_pipe_child_create(ppcb->p,
++ sc->server->pphrase_dialog_path)
++ != APR_SUCCESS) {
++ ap_log_error(APLOG_MARK, APLOG_ERR, 0, ppcb->s,
++ APLOGNO(10144)
++ "Init: Failed to create pass phrase pipe '%s'",
++ sc->server->pphrase_dialog_path);
++ return 0;
++ }
++ }
++ ap_log_error(APLOG_MARK, APLOG_INFO, 0, ppcb->s, APLOGNO(10145)
++ "Init: Requesting pass phrase via piped dialog");
++ }
++ else { /* sc->server->pphrase_dialog_type == SSL_PPTYPE_BUILTIN */
++#ifdef WIN32
++ ap_log_error(APLOG_MARK, APLOG_ERR, 0, ppcb->s, APLOGNO(10146)
++ "Init: Failed to create pass phrase pipe '%s'",
++ sc->server->pphrase_dialog_path);
++ return 0;
++#else
++ /*
++ * stderr has already been redirected to the error_log.
++ * rather than attempting to temporarily rehook it to the terminal,
++ * we print the prompt to stdout before EVP_read_pw_string turns
++ * off tty echo
++ */
++ apr_file_open_stdout(&writetty, ppcb->p);
++
++ ap_log_error(APLOG_MARK, APLOG_INFO, 0, ppcb->s, APLOGNO(10147)
++ "Init: Requesting pass phrase via builtin terminal "
++ "dialog");
++#endif
++ }
++
++ /*
++ * The first time display a header to inform the user about what
++ * program he actually speaks to, which module is responsible for
++ * this terminal dialog and why to the hell he has to enter
++ * something...
++ */
++ if (ppcb->nPassPhraseDialog == 1) {
++ apr_file_printf(writetty, "%s mod_ssl (Pass Phrase Dialog)\n",
++ AP_SERVER_BASEVERSION);
++ apr_file_printf(writetty,
++ "A pass phrase is required to access the private key.\n");
++ }
++ if (ppcb->bPassPhraseDialogOnce) {
++ ppcb->bPassPhraseDialogOnce = FALSE;
++ apr_file_printf(writetty, "\n");
++ apr_file_printf(writetty, "Private key %s (%s)\n",
++ ppcb->key_id, ppcb->pkey_file);
++ }
++ }
++
++ return 1;
++}
++
++static int passphrase_ui_read(UI *ui, UI_STRING *uis)
++{
++ pphrase_cb_arg_t *ppcb = UI_get0_user_data(ui);
++ SSLSrvConfigRec *sc = mySrvConfig(ppcb->s);
++ const char *prompt;
++ int i;
++ int bufsize;
++ int len;
++ char *buf;
++
++ prompt = UI_get0_output_string(uis);
++ if (prompt == NULL) {
++ prompt = "Enter pass phrase:";
++ }
++
++ /*
++ * Get the maximum expected size and allocate the buffer
++ */
++ bufsize = UI_get_result_maxsize(uis);
++ buf = apr_pcalloc(ppcb->p, bufsize);
++
++ if (sc->server->pphrase_dialog_type == SSL_PPTYPE_BUILTIN
++ || sc->server->pphrase_dialog_type == SSL_PPTYPE_PIPE) {
++ /*
++ * Get the pass phrase through a callback.
++ * Empty input is not accepted.
++ */
++ for (;;) {
++ if (sc->server->pphrase_dialog_type == SSL_PPTYPE_PIPE) {
++ i = pipe_get_passwd_cb(buf, bufsize, "", FALSE);
++ }
++ else { /* sc->server->pphrase_dialog_type == SSL_PPTYPE_BUILTIN */
++ i = EVP_read_pw_string(buf, bufsize, "", FALSE);
++ }
++ if (i != 0) {
++ OPENSSL_cleanse(buf, bufsize);
++ return 0;
++ }
++ len = strlen(buf);
++ if (len < 1){
++ apr_file_printf(writetty, "Apache:mod_ssl:Error: Pass phrase"
++ "empty (needs to be at least 1 character).\n");
++ apr_file_puts(prompt, writetty);
++ }
++ else {
++ break;
++ }
++ }
++ }
++ /*
++ * Filter program
++ */
++ else if (sc->server->pphrase_dialog_type == SSL_PPTYPE_FILTER) {
++ const char *cmd = sc->server->pphrase_dialog_path;
++ const char **argv = apr_palloc(ppcb->p, sizeof(char *) * 3);
++ char *result;
++
++ ap_log_error(APLOG_MARK, APLOG_INFO, 0, ppcb->s, APLOGNO(10148)
++ "Init: Requesting pass phrase from dialog filter "
++ "program (%s)", cmd);
++
++ argv[0] = cmd;
++ argv[1] = ppcb->key_id;
++ argv[2] = NULL;
++
++ result = ssl_util_readfilter(ppcb->s, ppcb->p, cmd, argv);
++ apr_cpystrn(buf, result, bufsize);
++ len = strlen(buf);
++ }
++
++ /*
++ * Ok, we now have the pass phrase, so give it back
++ */
++ ppcb->cpPassPhraseCur = apr_pstrdup(ppcb->p, buf);
++ UI_set_result(ui, uis, buf);
++
++ /* Clear sensitive data. */
++ OPENSSL_cleanse(buf, bufsize);
++ return 1;
++}
++
++static int passphrase_ui_write(UI *ui, UI_STRING *uis)
++{
++ pphrase_cb_arg_t *ppcb = UI_get0_user_data(ui);
++ SSLSrvConfigRec *sc;
++ const char *prompt;
++
++ sc = mySrvConfig(ppcb->s);
++
++ if (sc->server->pphrase_dialog_type == SSL_PPTYPE_BUILTIN
++ || sc->server->pphrase_dialog_type == SSL_PPTYPE_PIPE) {
++ prompt = UI_get0_output_string(uis);
++ apr_file_puts(prompt, writetty);
++ }
++
++ return 1;
++}
++
++static int passphrase_ui_close(UI *ui)
++{
++ /*
++ * Close the pipes if they were opened
++ */
++ if (readtty) {
++ apr_file_close(readtty);
++ apr_file_close(writetty);
++ readtty = writetty = NULL;
++ }
++ return 1;
++}
++
++static apr_status_t pp_ui_method_cleanup(void *uip)
++{
++ UI_METHOD *uim = uip;
++
++ UI_destroy_method(uim);
++
++ return APR_SUCCESS;
++}
++
++static UI_METHOD *get_passphrase_ui(apr_pool_t *p)
++{
++ UI_METHOD *ui_method = UI_create_method("Passphrase UI");
++
++ UI_method_set_opener(ui_method, passphrase_ui_open);
++ UI_method_set_reader(ui_method, passphrase_ui_read);
++ UI_method_set_writer(ui_method, passphrase_ui_write);
++ UI_method_set_closer(ui_method, passphrase_ui_close);
++
++ apr_pool_cleanup_register(p, ui_method, pp_ui_method_cleanup,
++ pp_ui_method_cleanup);
++
++ return ui_method;
++}
++
++
++apr_status_t modssl_load_engine_keypair(server_rec *s, apr_pool_t *p,
++ const char *vhostid,
++ const char *certid, const char *keyid,
++ X509 **pubkey, EVP_PKEY **privkey)
++{
++ SSLModConfigRec *mc = myModConfig(s);
++ ENGINE *e;
++ UI_METHOD *ui_method = get_passphrase_ui(p);
++ pphrase_cb_arg_t ppcb;
++
++ memset(&ppcb, 0, sizeof ppcb);
++ ppcb.s = s;
++ ppcb.p = p;
++ ppcb.bPassPhraseDialogOnce = TRUE;
++ ppcb.key_id = vhostid;
++ ppcb.pkey_file = keyid;
++
++ if (!mc->szCryptoDevice) {
++ ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(10131)
++ "Init: Cannot load private key `%s' without engine",
++ keyid);
++ return ssl_die(s);
++ }
++
++ if (!(e = ENGINE_by_id(mc->szCryptoDevice))) {
++ ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(10132)
++ "Init: Failed to load Crypto Device API `%s'",
++ mc->szCryptoDevice);
++ ssl_log_ssl_error(SSLLOG_MARK, APLOG_EMERG, s);
++ return ssl_die(s);
++ }
++
++ if (APLOGdebug(s)) {
++ ENGINE_ctrl_cmd_string(e, "VERBOSE", NULL, 0);
++ }
++
++ if (certid) {
++ struct {
++ const char *cert_id;
++ X509 *cert;
++ } params = { certid, NULL };
++
++ if (!ENGINE_ctrl_cmd(e, "LOAD_CERT_CTRL", 0, ¶ms, NULL, 1)) {
++ ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(10136)
++ "Init: Unable to get the certificate");
++ ssl_log_ssl_error(SSLLOG_MARK, APLOG_EMERG, s);
++ return ssl_die(s);
++ }
++
++ *pubkey = params.cert;
++ }
++
++ *privkey = ENGINE_load_private_key(e, keyid, ui_method, &ppcb);
++ if (*privkey == NULL) {
++ ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(10133)
++ "Init: Unable to get the private key");
++ ssl_log_ssl_error(SSLLOG_MARK, APLOG_EMERG, s);
++ return ssl_die(s);
++ }
++
++ ENGINE_free(e);
++
++ return APR_SUCCESS;
++}
++#endif
+--- httpd-2.4.33/modules/ssl/ssl_private.h.r1830819+
++++ httpd-2.4.33/modules/ssl/ssl_private.h
+@@ -976,21 +976,28 @@
+ apr_status_t ssl_load_encrypted_pkey(server_rec *, apr_pool_t *, int,
+ const char *, apr_array_header_t **);
+
++/* Load public and/or private key from the configured ENGINE. Private
++ * key returned as *pkey. certid can be NULL, in which case *pubkey
++ * is not altered. Errors logged on failure. */
++apr_status_t modssl_load_engine_keypair(server_rec *s, apr_pool_t *p,
++ const char *vhostid,
++ const char *certid, const char *keyid,
++ X509 **pubkey, EVP_PKEY **privkey);
++
+ /** Diffie-Hellman Parameter Support */
+ DH *ssl_dh_GetParamFromFile(const char *);
+ #ifdef HAVE_ECC
+ EC_GROUP *ssl_ec_GetParamFromFile(const char *);
+ #endif
+
+-unsigned char *ssl_asn1_table_set(apr_hash_t *table,
+- const char *key,
+- long int length);
+-
+-ssl_asn1_t *ssl_asn1_table_get(apr_hash_t *table,
+- const char *key);
+-
+-void ssl_asn1_table_unset(apr_hash_t *table,
+- const char *key);
++/* Store the EVP_PKEY key (serialized into DER) in the hash table with
++ * key, returning the ssl_asn1_t structure pointer. */
++ssl_asn1_t *ssl_asn1_table_set(apr_hash_t *table, const char *key,
++ EVP_PKEY *pkey);
++/* Retrieve the ssl_asn1_t structure with given key from the hash. */
++ssl_asn1_t *ssl_asn1_table_get(apr_hash_t *table, const char *key);
++/* Remove and free the ssl_asn1_t structure with given key. */
++void ssl_asn1_table_unset(apr_hash_t *table, const char *key);
+
+ /** Mutex Support */
+ int ssl_mutex_init(server_rec *, apr_pool_t *);
+@@ -1078,6 +1085,10 @@
+ int ssl_is_challenge(conn_rec *c, const char *servername,
+ X509 **pcert, EVP_PKEY **pkey);
+
++/* Returns non-zero if the cert/key filename should be handled through
++ * the configured ENGINE. */
++int modssl_is_engine_id(const char *name);
++
+ #endif /* SSL_PRIVATE_H */
+ /** @} */
+
+--- httpd-2.4.33/modules/ssl/ssl_util.c.r1830819+
++++ httpd-2.4.33/modules/ssl/ssl_util.c
+@@ -181,45 +181,37 @@
+ return TRUE;
+ }
+
+-/*
+- * certain key data needs to survive restarts,
+- * which are stored in the user data table of s->process->pool.
+- * to prevent "leaking" of this data, we use malloc/free
+- * rather than apr_palloc and these wrappers to help make sure
+- * we do not leak the malloc-ed data.
+- */
+-unsigned char *ssl_asn1_table_set(apr_hash_t *table,
+- const char *key,
+- long int length)
++/* Decrypted private keys are cached to survive restarts. The cached
++ * data must have lifetime of the process (hence malloc/free rather
++ * than pools), and uses raw DER since the EVP_PKEY structure
++ * internals may not survive across a module reload. */
++ssl_asn1_t *ssl_asn1_table_set(apr_hash_t *table, const char *key,
++ EVP_PKEY *pkey)
+ {
+ apr_ssize_t klen = strlen(key);
+ ssl_asn1_t *asn1 = apr_hash_get(table, key, klen);
++ apr_size_t length = i2d_PrivateKey(pkey, NULL);
++ unsigned char *p;
+
+- /*
+- * if a value for this key already exists,
+- * reuse as much of the already malloc-ed data
+- * as possible.
+- */
++ /* Re-use structure if cached previously. */
+ if (asn1) {
+ if (asn1->nData != length) {
+- free(asn1->cpData); /* XXX: realloc? */
+- asn1->cpData = NULL;
++ asn1->cpData = ap_realloc(asn1->cpData, length);
+ }
+ }
+ else {
+ asn1 = ap_malloc(sizeof(*asn1));
+ asn1->source_mtime = 0; /* used as a note for encrypted private keys */
+- asn1->cpData = NULL;
+- }
+-
+- asn1->nData = length;
+- if (!asn1->cpData) {
+ asn1->cpData = ap_malloc(length);
++
++ apr_hash_set(table, key, klen, asn1);
+ }
+
+- apr_hash_set(table, key, klen, asn1);
++ asn1->nData = length;
++ p = asn1->cpData;
++ i2d_PrivateKey(pkey, &p); /* increases p by length */
+
+- return asn1->cpData; /* caller will assign a value to this */
++ return asn1;
+ }
+
+ ssl_asn1_t *ssl_asn1_table_get(apr_hash_t *table,
+@@ -469,3 +461,13 @@
+ }
+
+ #endif /* #if APR_HAS_THREADS && MODSSL_USE_OPENSSL_PRE_1_1_API */
++
++int modssl_is_engine_id(const char *name)
++{
++#if defined(HAVE_OPENSSL_ENGINE_H) && defined(HAVE_ENGINE_INIT)
++ /* ### Can handle any other special ENGINE key names here? */
++ return strncmp(name, "pkcs11:", 7) == 0;
++#else
++ return 0;
++#endif
++}
+--- httpd-2.4.33/modules/ssl/ssl_util_ssl.c.r1830819+
++++ httpd-2.4.33/modules/ssl/ssl_util_ssl.c
+@@ -74,7 +74,7 @@
+ ** _________________________________________________________________
+ */
+
+-EVP_PKEY *modssl_read_privatekey(const char* filename, EVP_PKEY **key, pem_password_cb *cb, void *s)
++EVP_PKEY *modssl_read_privatekey(const char *filename, pem_password_cb *cb, void *s)
+ {
+ EVP_PKEY *rc;
+ BIO *bioS;
+@@ -83,7 +83,7 @@
+ /* 1. try PEM (= DER+Base64+headers) */
+ if ((bioS=BIO_new_file(filename, "r")) == NULL)
+ return NULL;
+- rc = PEM_read_bio_PrivateKey(bioS, key, cb, s);
++ rc = PEM_read_bio_PrivateKey(bioS, NULL, cb, s);
+ BIO_free(bioS);
+
+ if (rc == NULL) {
+@@ -107,41 +107,9 @@
+ BIO_free(bioS);
+ }
+ }
+- if (rc != NULL && key != NULL) {
+- if (*key != NULL)
+- EVP_PKEY_free(*key);
+- *key = rc;
+- }
+ return rc;
+ }
+
+-typedef struct {
+- const char *pass;
+- int pass_len;
+-} pass_ctx;
+-
+-static int provide_pass(char *buf, int size, int rwflag, void *baton)
+-{
+- pass_ctx *ctx = baton;
+- if (ctx->pass_len > 0) {
+- if (ctx->pass_len < size) {
+- size = (int)ctx->pass_len;
+- }
+- memcpy(buf, ctx->pass, size);
+- }
+- return ctx->pass_len;
+-}
+-
+-EVP_PKEY *modssl_read_encrypted_pkey(const char *filename, EVP_PKEY **key,
+- const char *pass, apr_size_t pass_len)
+-{
+- pass_ctx ctx;
+-
+- ctx.pass = pass;
+- ctx.pass_len = pass_len;
+- return modssl_read_privatekey(filename, key, provide_pass, &ctx);
+-}
+-
+ /* _________________________________________________________________
+ **
+ ** Smart shutdown
+--- httpd-2.4.33/modules/ssl/ssl_util_ssl.h.r1830819+
++++ httpd-2.4.33/modules/ssl/ssl_util_ssl.h
+@@ -64,8 +64,11 @@
+ void modssl_init_app_data2_idx(void);
+ void *modssl_get_app_data2(SSL *);
+ void modssl_set_app_data2(SSL *, void *);
+-EVP_PKEY *modssl_read_privatekey(const char *, EVP_PKEY **, pem_password_cb *, void *);
+-EVP_PKEY *modssl_read_encrypted_pkey(const char *, EVP_PKEY **, const char *, apr_size_t);
++
++/* Read private key from filename in either PEM or raw base64(DER)
++ * format, using password entry callback cb and userdata. */
++EVP_PKEY *modssl_read_privatekey(const char *filename, pem_password_cb *cb, void *ud);
++
+ int modssl_smart_shutdown(SSL *ssl);
+ BOOL modssl_X509_getBC(X509 *, int *, int *);
+ char *modssl_X509_NAME_ENTRY_to_string(apr_pool_t *p, X509_NAME_ENTRY *xsne,
diff --git a/httpd.spec b/httpd.spec
index 0760824..5543eae 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -13,7 +13,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.33
-Release: 6%{?dist}
+Release: 7%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -73,6 +73,7 @@ Patch30: httpd-2.4.4-cachehardmax.patch
Patch31: httpd-2.4.33-sslmultiproxy.patch
Patch34: httpd-2.4.17-socket-activation.patch
Patch35: httpd-2.4.33-sslciphdefault.patch
+Patch36: httpd-2.4.33-r1830819+.patch
# Bug fixes
# https://bugzilla.redhat.com/show_bug.cgi?id=1397243
@@ -232,6 +233,8 @@ interface for storing and accessing per-user session data.
%patch31 -p1 -b .sslmultiproxy
%patch34 -p1 -b .socketactivation
%patch35 -p1 -b .sslciphdefault
+%patch36 -p1 -b .r1830819+
+
%patch58 -p1 -b .r1738878
%patch59 -p1 -b .sslmerging
@@ -725,6 +728,9 @@ exit $rv
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Fri Jul 6 2018 Joe Orton - 2.4.33-7
+- mod_ssl: add PKCS#11 cert/key support (Anderson Sasaki)
+
* Tue Jun 12 2018 Joe Orton - 2.4.33-6
- mod_systemd: show bound ports in status and log to journal
at startup.
From 57759762322e764ae8472a5cb6ad536ca45d5af5 Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Fri, 6 Jul 2018 17:03:16 +0100
Subject: [PATCH 113/359] Update to 2.4.33.
---
pullrev.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pullrev.sh b/pullrev.sh
index 8ed3a64..e389b56 100755
--- a/pullrev.sh
+++ b/pullrev.sh
@@ -6,8 +6,8 @@ if [ $# -lt 1 ]; then
fi
repo="https://svn.apache.org/repos/asf/httpd/httpd/trunk"
-#repo="https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x"
-ver=2.4.27
+repo="https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x"
+ver=2.4.33
prefix="httpd-${ver}"
suffix="r$1${2:++}"
fn="${prefix}-${suffix}.patch"
From 8ab39c8ee0a67248967e885e763afddb314cb0df Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Fri, 6 Jul 2018 17:03:22 +0100
Subject: [PATCH 114/359] add per-request memory leak fix (upstream r1833014)
---
httpd-2.4.33-r1833841.patch | 59 +++++++++++++++++++++++++++++++++++++
httpd.spec | 7 ++++-
2 files changed, 65 insertions(+), 1 deletion(-)
create mode 100644 httpd-2.4.33-r1833841.patch
diff --git a/httpd-2.4.33-r1833841.patch b/httpd-2.4.33-r1833841.patch
new file mode 100644
index 0000000..749d67f
--- /dev/null
+++ b/httpd-2.4.33-r1833841.patch
@@ -0,0 +1,59 @@
+# ./pullrev.sh 1833841
+http://svn.apache.org/viewvc?view=revision&revision=1833841
+
+--- httpd-2.4.33/modules/http/http_request.c
++++ httpd-2.4.33/modules/http/http_request.c
+@@ -345,6 +345,16 @@
+ return rv;
+ }
+
++#define RETRIEVE_BRIGADE_FROM_POOL(bb, key, pool, allocator) do { \
++ apr_pool_userdata_get((void **)&bb, key, pool); \
++ if (bb == NULL) { \
++ bb = apr_brigade_create(pool, allocator); \
++ apr_pool_userdata_setn((const void *)bb, key, NULL, pool); \
++ } \
++ else { \
++ apr_brigade_cleanup(bb); \
++ } \
++} while(0)
+
+ AP_DECLARE(void) ap_process_request_after_handler(request_rec *r)
+ {
+@@ -357,7 +367,8 @@
+ * this bucket is destroyed, the request will be logged and
+ * its pool will be freed
+ */
+- bb = apr_brigade_create(c->pool, c->bucket_alloc);
++ RETRIEVE_BRIGADE_FROM_POOL(bb, "ap_process_request_after_handler_brigade",
++ c->pool, c->bucket_alloc);
+ b = ap_bucket_eor_create(c->bucket_alloc, r);
+ APR_BRIGADE_INSERT_HEAD(bb, b);
+
+@@ -383,7 +394,7 @@
+ */
+ rv = ap_check_pipeline(c, bb, DEFAULT_LIMIT_BLANK_LINES);
+ c->data_in_input_filters = (rv == APR_SUCCESS);
+- apr_brigade_destroy(bb);
++ apr_brigade_cleanup(bb);
+
+ if (c->cs)
+ c->cs->state = (c->aborted) ? CONN_STATE_LINGER
+@@ -477,7 +488,8 @@
+ ap_process_async_request(r);
+
+ if (!c->data_in_input_filters) {
+- bb = apr_brigade_create(c->pool, c->bucket_alloc);
++ RETRIEVE_BRIGADE_FROM_POOL(bb, "ap_process_request_brigade",
++ c->pool, c->bucket_alloc);
+ b = apr_bucket_flush_create(c->bucket_alloc);
+ APR_BRIGADE_INSERT_HEAD(bb, b);
+ rv = ap_pass_brigade(c->output_filters, bb);
+@@ -490,6 +502,7 @@
+ ap_log_cerror(APLOG_MARK, APLOG_INFO, rv, c, APLOGNO(01581)
+ "flushing data to the client");
+ }
++ apr_brigade_cleanup(bb);
+ }
+ if (ap_extended_status) {
+ ap_time_process_request(c->sbh, STOP_PREQUEST);
diff --git a/httpd.spec b/httpd.spec
index 5543eae..f7e0765 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -13,7 +13,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.33
-Release: 7%{?dist}
+Release: 8%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -80,6 +80,7 @@ Patch36: httpd-2.4.33-r1830819+.patch
Patch58: httpd-2.4.33-r1738878.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1564537
Patch59: httpd-2.4.33-sslmerging.patch
+Patch60: httpd-2.4.33-r1833841.patch
# Security fixes
@@ -237,6 +238,7 @@ interface for storing and accessing per-user session data.
%patch58 -p1 -b .r1738878
%patch59 -p1 -b .sslmerging
+%patch60 -p1 -b .r1833841
# Patch in the vendor string
sed -i '/^#define PLATFORM/s/Unix/%{vstring}/' os/unix/os.h
@@ -728,6 +730,9 @@ exit $rv
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Fri Jul 6 2018 Joe Orton - 2.4.33-8
+- add per-request memory leak fix (upstream r1833014)
+
* Fri Jul 6 2018 Joe Orton - 2.4.33-7
- mod_ssl: add PKCS#11 cert/key support (Anderson Sasaki)
From 1ee4430d4280365a45b96bf3f6c9f32cb1e59dab Mon Sep 17 00:00:00 2001
From: Jason Tibbitts
Date: Tue, 10 Jul 2018 01:20:33 -0500
Subject: [PATCH 115/359] Remove needless use of %defattr
---
httpd.spec | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/httpd.spec b/httpd.spec
index f479b9e..553f46e 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -582,7 +582,6 @@ set -x
exit $rv
%files
-%defattr(-,root,root)
%doc ABOUT_APACHE README CHANGES LICENSE VERSIONING NOTICE
%doc docs/conf/extra/*.conf
@@ -673,7 +672,6 @@ exit $rv
%attr(755,root,root) %dir %{_unitdir}/httpd.socket.d
%files tools
-%defattr(-,root,root)
%{_bindir}/*
%{_mandir}/man1/*
%doc LICENSE NOTICE
@@ -681,12 +679,10 @@ exit $rv
%exclude %{_mandir}/man1/apxs.1*
%files manual
-%defattr(-,root,root)
%{contentdir}/manual
%config(noreplace) %{_sysconfdir}/httpd/conf.d/manual.conf
%files -n mod_ssl
-%defattr(-,root,root)
%{_libdir}/httpd/modules/mod_ssl.so
%config(noreplace) %{_sysconfdir}/httpd/conf.modules.d/00-ssl.conf
%config(noreplace) %{_sysconfdir}/httpd/conf.d/ssl.conf
@@ -698,29 +694,24 @@ exit $rv
%{_mandir}/man8/httpd-init.*
%files -n mod_proxy_html
-%defattr(-,root,root)
%{_libdir}/httpd/modules/mod_proxy_html.so
%{_libdir}/httpd/modules/mod_xml2enc.so
%config(noreplace) %{_sysconfdir}/httpd/conf.modules.d/00-proxyhtml.conf
%files -n mod_ldap
-%defattr(-,root,root)
%{_libdir}/httpd/modules/mod_*ldap.so
%config(noreplace) %{_sysconfdir}/httpd/conf.modules.d/01-ldap.conf
%files -n mod_session
-%defattr(-,root,root)
%{_libdir}/httpd/modules/mod_session*.so
%{_libdir}/httpd/modules/mod_auth_form.so
%config(noreplace) %{_sysconfdir}/httpd/conf.modules.d/01-session.conf
%files -n mod_md
-%defattr(-,root,root)
%{_libdir}/httpd/modules/mod_md.so
%config(noreplace) %{_sysconfdir}/httpd/conf.modules.d/01-md.conf
%files devel
-%defattr(-,root,root)
%{_includedir}/httpd
%{_bindir}/apxs
%{_mandir}/man1/apxs.1*
From 68920957bf7bf106d75f78598dda3255f0ad1740 Mon Sep 17 00:00:00 2001
From: Fedora Release Engineering
Date: Fri, 13 Jul 2018 05:07:26 +0000
Subject: [PATCH 116/359] - Rebuilt for
https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering
---
httpd.spec | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/httpd.spec b/httpd.spec
index 553f46e..c9927ce 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -13,7 +13,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.33
-Release: 8%{?dist}
+Release: 9%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -721,6 +721,9 @@ exit $rv
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Fri Jul 13 2018 Fedora Release Engineering - 2.4.33-9
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
+
* Fri Jul 6 2018 Joe Orton - 2.4.33-8
- add per-request memory leak fix (upstream r1833014)
From 2279af3204a62ddaa161fcbc00a15d9839855df1 Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Mon, 16 Jul 2018 16:48:41 +0100
Subject: [PATCH 117/359] Tweak wording in privkey passphrase prompt.
---
httpd-ssl-pass-dialog | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/httpd-ssl-pass-dialog b/httpd-ssl-pass-dialog
index 1e850cd..79318a6 100755
--- a/httpd-ssl-pass-dialog
+++ b/httpd-ssl-pass-dialog
@@ -1,3 +1,3 @@
#!/bin/sh
-exec /bin/systemd-ask-password "Enter SSL pass phrase for $1 ($2) : "
+exec /bin/systemd-ask-password "Enter TLS private key passphrase for $1 ($2) : "
From 7a7c76fbe05fe657b4de60d41fcb9aa5e4fea04d Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Mon, 16 Jul 2018 17:01:34 +0100
Subject: [PATCH 118/359] add Lua-based /server-status example page to docs
---
httpd.spec | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/httpd.spec b/httpd.spec
index c9927ce..4594e86 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -13,7 +13,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.33
-Release: 9%{?dist}
+Release: 10%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -24,6 +24,7 @@ Source5: httpd.tmpfiles
Source6: httpd.service
Source7: action-graceful.sh
Source8: action-configtest.sh
+Source9: server-status.conf
Source10: httpd.conf
Source11: 00-base.conf
Source12: 00-mpm.conf
@@ -255,6 +256,7 @@ sed < $RPM_SOURCE_DIR/httpd.conf >> instance.conf '
/^ *ErrorLog .logs/s,logs/,logs/${HTTPD_INSTANCE}_,
'
touch -r $RPM_SOURCE_DIR/instance.conf instance.conf
+cp -p $RPM_SOURCE_DIR/server-status.conf server-status.conf
# Safety check: prevent build if defined MMN does not equal upstream MMN.
vmmn=`echo MODULE_MAGIC_NUMBER_MAJOR | cpp -include include/ap_mmn.h | sed -n '/^2/p'`
@@ -430,9 +432,12 @@ cat > $RPM_BUILD_ROOT%{_rpmconfigdir}/macros.d/macros.httpd < - 2.4.33-10
+- add Lua-based /server-status example page to docs
+
* Fri Jul 13 2018 Fedora Release Engineering - 2.4.33-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
From 23fb452daee23c23d64d203dc22f8924486a7b02 Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Mon, 16 Jul 2018 17:02:14 +0100
Subject: [PATCH 119/359] don't block on service try-restart in posttrans
scriptlet
---
httpd.spec | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/httpd.spec b/httpd.spec
index 4594e86..55e7748 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -556,7 +556,7 @@ exit 0
%posttrans
test -f /etc/sysconfig/httpd-disable-posttrans || \
- /bin/systemctl try-restart httpd.service htcacheclean.service >/dev/null 2>&1 || :
+ /bin/systemctl try-restart --no-block httpd.service htcacheclean.service >/dev/null 2>&1 || :
%check
# Check the built modules are all PIC
@@ -729,6 +729,7 @@ exit $rv
%changelog
* Mon Jul 16 2018 Joe Orton - 2.4.33-10
+- don't block on service try-restart in posttrans scriptlet
- add Lua-based /server-status example page to docs
* Fri Jul 13 2018 Fedora Release Engineering - 2.4.33-9
From f7e11bc804e9dacc2a1f02480b830d96663544ef Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Mon, 16 Jul 2018 17:03:11 +0100
Subject: [PATCH 120/359] Add example lua server-status config.
---
server-status.conf | 10 ++++++++++
1 file changed, 10 insertions(+)
create mode 100644 server-status.conf
diff --git a/server-status.conf b/server-status.conf
new file mode 100644
index 0000000..be98f1b
--- /dev/null
+++ b/server-status.conf
@@ -0,0 +1,10 @@
+#
+# Lua-based server-status page; requires mod_lua to be loaded
+# as per default configuration.
+#
+LuaMapHandler ^/server-status$ /usr/share/httpd/server-status/server-status.lua
+
+
+ AllowOverride None
+ Require local
+
From 6fd32168ffabf701a0e76e1ba264963f7352e9e7 Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Mon, 16 Jul 2018 17:11:20 +0100
Subject: [PATCH 121/359] don't block on service try-restart in posttrans
scriptlet add Lua-based /server-status example page to docs obsoletes: and
provides: for mod_proxy_uswgi (#1599113) Resolves: rhbz#1599113
---
httpd.spec | 3 +++
1 file changed, 3 insertions(+)
diff --git a/httpd.spec b/httpd.spec
index 55e7748..dda419f 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -104,6 +104,8 @@ Requires(preun): systemd-units
Requires(postun): systemd-units
Requires(post): systemd-units
Conflicts: apr < 1.5.0-1
+Provides: mod_proxy_uwsgi = %{version}-%{release}
+Obsoletes: mod_proxy_uwsgi < 2.0.17-1
%description
The Apache HTTP Server is a powerful, efficient, and extensible
@@ -731,6 +733,7 @@ exit $rv
* Mon Jul 16 2018 Joe Orton - 2.4.33-10
- don't block on service try-restart in posttrans scriptlet
- add Lua-based /server-status example page to docs
+- obsoletes: and provides: for mod_proxy_uswgi (#1599113)
* Fri Jul 13 2018 Fedora Release Engineering - 2.4.33-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
From bc2b0a9538baa13d8436f120d24231c624e836b4 Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Mon, 16 Jul 2018 20:41:32 +0100
Subject: [PATCH 122/359] BR gcc
---
httpd.spec | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/httpd.spec b/httpd.spec
index dda419f..8f22536 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -87,10 +87,10 @@ Patch60: httpd-2.4.33-r1833841.patch
License: ASL 2.0
Group: System Environment/Daemons
-BuildRequires: autoconf, perl-interpreter, perl-generators, pkgconfig, findutils, xmlto
+BuildRequires: gcc, autoconf, pkgconfig, findutils, xmlto
+BuildRequires: perl-interpreter, perl-generators, systemd-devel
BuildRequires: zlib-devel, libselinux-devel, lua-devel, brotli-devel
BuildRequires: apr-devel >= 1.5.0, apr-util-devel >= 1.5.0, pcre-devel >= 5.0
-BuildRequires: systemd-devel
Requires: /etc/mime.types, system-logos-httpd
Obsoletes: httpd-suexec
Provides: webserver
From 5072c65a7ba0a2cda7310b48f4135eb0a5017a8b Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Wed, 18 Jul 2018 11:55:03 +0100
Subject: [PATCH 123/359] update to 2.4.34 (#1601160) Resolves: rhbz#1601160
---
httpd-2.4.33-r1833841.patch | 59 -------------------
httpd-2.4.33-sslmerging.patch | 15 -----
...38878.patch => httpd-2.4.34-r1738878.patch | 43 ++++++--------
httpd.spec | 16 +++--
4 files changed, 25 insertions(+), 108 deletions(-)
delete mode 100644 httpd-2.4.33-r1833841.patch
delete mode 100644 httpd-2.4.33-sslmerging.patch
rename httpd-2.4.33-r1738878.patch => httpd-2.4.34-r1738878.patch (74%)
diff --git a/httpd-2.4.33-r1833841.patch b/httpd-2.4.33-r1833841.patch
deleted file mode 100644
index 749d67f..0000000
--- a/httpd-2.4.33-r1833841.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-# ./pullrev.sh 1833841
-http://svn.apache.org/viewvc?view=revision&revision=1833841
-
---- httpd-2.4.33/modules/http/http_request.c
-+++ httpd-2.4.33/modules/http/http_request.c
-@@ -345,6 +345,16 @@
- return rv;
- }
-
-+#define RETRIEVE_BRIGADE_FROM_POOL(bb, key, pool, allocator) do { \
-+ apr_pool_userdata_get((void **)&bb, key, pool); \
-+ if (bb == NULL) { \
-+ bb = apr_brigade_create(pool, allocator); \
-+ apr_pool_userdata_setn((const void *)bb, key, NULL, pool); \
-+ } \
-+ else { \
-+ apr_brigade_cleanup(bb); \
-+ } \
-+} while(0)
-
- AP_DECLARE(void) ap_process_request_after_handler(request_rec *r)
- {
-@@ -357,7 +367,8 @@
- * this bucket is destroyed, the request will be logged and
- * its pool will be freed
- */
-- bb = apr_brigade_create(c->pool, c->bucket_alloc);
-+ RETRIEVE_BRIGADE_FROM_POOL(bb, "ap_process_request_after_handler_brigade",
-+ c->pool, c->bucket_alloc);
- b = ap_bucket_eor_create(c->bucket_alloc, r);
- APR_BRIGADE_INSERT_HEAD(bb, b);
-
-@@ -383,7 +394,7 @@
- */
- rv = ap_check_pipeline(c, bb, DEFAULT_LIMIT_BLANK_LINES);
- c->data_in_input_filters = (rv == APR_SUCCESS);
-- apr_brigade_destroy(bb);
-+ apr_brigade_cleanup(bb);
-
- if (c->cs)
- c->cs->state = (c->aborted) ? CONN_STATE_LINGER
-@@ -477,7 +488,8 @@
- ap_process_async_request(r);
-
- if (!c->data_in_input_filters) {
-- bb = apr_brigade_create(c->pool, c->bucket_alloc);
-+ RETRIEVE_BRIGADE_FROM_POOL(bb, "ap_process_request_brigade",
-+ c->pool, c->bucket_alloc);
- b = apr_bucket_flush_create(c->bucket_alloc);
- APR_BRIGADE_INSERT_HEAD(bb, b);
- rv = ap_pass_brigade(c->output_filters, bb);
-@@ -490,6 +502,7 @@
- ap_log_cerror(APLOG_MARK, APLOG_INFO, rv, c, APLOGNO(01581)
- "flushing data to the client");
- }
-+ apr_brigade_cleanup(bb);
- }
- if (ap_extended_status) {
- ap_time_process_request(c->sbh, STOP_PREQUEST);
diff --git a/httpd-2.4.33-sslmerging.patch b/httpd-2.4.33-sslmerging.patch
deleted file mode 100644
index 066b5c8..0000000
--- a/httpd-2.4.33-sslmerging.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-
-https://bugzilla.redhat.com/show_bug.cgi?id=1564537
-
---- httpd-2.4.33/modules/ssl/ssl_engine_init.c.sslmerging
-+++ httpd-2.4.33/modules/ssl/ssl_engine_init.c
-@@ -261,7 +261,8 @@
- * the protocol is https. */
- if (ap_get_server_protocol(s)
- && strcmp("https", ap_get_server_protocol(s)) == 0
-- && sc->enabled == SSL_ENABLED_UNSET) {
-+ && sc->enabled == SSL_ENABLED_UNSET
-+ && (!apr_is_empty_array(sc->server->pks->cert_files))) {
- sc->enabled = SSL_ENABLED_TRUE;
- }
-
diff --git a/httpd-2.4.33-r1738878.patch b/httpd-2.4.34-r1738878.patch
similarity index 74%
rename from httpd-2.4.33-r1738878.patch
rename to httpd-2.4.34-r1738878.patch
index d7ef42f..5af48f5 100644
--- a/httpd-2.4.33-r1738878.patch
+++ b/httpd-2.4.34-r1738878.patch
@@ -1,8 +1,5 @@
-diff --git a/modules/proxy/ajp.h b/modules/proxy/ajp.h
-index c119a7e..267150a 100644
-diff -uap httpd-2.4.33/modules/proxy/ajp_header.c.r1738878 httpd-2.4.33/modules/proxy/ajp_header.c
---- httpd-2.4.33/modules/proxy/ajp_header.c.r1738878
-+++ httpd-2.4.33/modules/proxy/ajp_header.c
+--- httpd-2.4.34/modules/proxy/ajp_header.c.r1738878
++++ httpd-2.4.34/modules/proxy/ajp_header.c
@@ -213,7 +213,8 @@
static apr_status_t ajp_marshal_into_msgb(ajp_msg_t *msg,
@@ -53,9 +50,8 @@ diff -uap httpd-2.4.33/modules/proxy/ajp_header.c.r1738878 httpd-2.4.33/modules/
if (rc != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00988)
"ajp_send_header: ajp_marshal_into_msgb failed");
-diff -uap httpd-2.4.33/modules/proxy/ajp.h.r1738878 httpd-2.4.33/modules/proxy/ajp.h
---- httpd-2.4.33/modules/proxy/ajp.h.r1738878
-+++ httpd-2.4.33/modules/proxy/ajp.h
+--- httpd-2.4.34/modules/proxy/ajp.h.r1738878
++++ httpd-2.4.34/modules/proxy/ajp.h
@@ -413,12 +413,14 @@
* @param sock backend socket
* @param r current request
@@ -72,9 +68,8 @@ diff -uap httpd-2.4.33/modules/proxy/ajp.h.r1738878 httpd-2.4.33/modules/proxy/a
/**
* Read the ajp message and return the type of the message.
-diff -uap httpd-2.4.33/modules/proxy/mod_proxy_ajp.c.r1738878 httpd-2.4.33/modules/proxy/mod_proxy_ajp.c
---- httpd-2.4.33/modules/proxy/mod_proxy_ajp.c.r1738878
-+++ httpd-2.4.33/modules/proxy/mod_proxy_ajp.c
+--- httpd-2.4.34/modules/proxy/mod_proxy_ajp.c.r1738878
++++ httpd-2.4.34/modules/proxy/mod_proxy_ajp.c
@@ -193,6 +193,7 @@
apr_off_t content_length = 0;
int original_status = r->status;
@@ -100,10 +95,9 @@ diff -uap httpd-2.4.33/modules/proxy/mod_proxy_ajp.c.r1738878 httpd-2.4.33/modul
if (status != APR_SUCCESS) {
conn->close = 1;
ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(00868)
-diff -uap httpd-2.4.33/modules/proxy/mod_proxy.c.r1738878 httpd-2.4.33/modules/proxy/mod_proxy.c
---- httpd-2.4.33/modules/proxy/mod_proxy.c.r1738878
-+++ httpd-2.4.33/modules/proxy/mod_proxy.c
-@@ -318,6 +318,12 @@
+--- httpd-2.4.34/modules/proxy/mod_proxy.c.r1738878
++++ httpd-2.4.34/modules/proxy/mod_proxy.c
+@@ -319,6 +319,12 @@
(int)sizeof(worker->s->upgrade));
}
}
@@ -113,13 +107,12 @@ diff -uap httpd-2.4.33/modules/proxy/mod_proxy.c.r1738878 httpd-2.4.33/modules/p
+ (int)sizeof(worker->s->secret));
+ }
+ }
- else {
- if (set_worker_hc_param_f) {
- return set_worker_hc_param_f(p, s, worker, key, val, NULL);
-diff -uap httpd-2.4.33/modules/proxy/mod_proxy.h.r1738878 httpd-2.4.33/modules/proxy/mod_proxy.h
---- httpd-2.4.33/modules/proxy/mod_proxy.h.r1738878
-+++ httpd-2.4.33/modules/proxy/mod_proxy.h
-@@ -353,6 +353,7 @@
+ else if (!strcasecmp(key, "responsefieldsize")) {
+ long s = atol(val);
+ if (s < 0) {
+--- httpd-2.4.34/modules/proxy/mod_proxy.h.r1738878
++++ httpd-2.4.34/modules/proxy/mod_proxy.h
+@@ -357,6 +357,7 @@
#define PROXY_WORKER_MAX_HOSTNAME_SIZE 64
#define PROXY_BALANCER_MAX_HOSTNAME_SIZE PROXY_WORKER_MAX_HOSTNAME_SIZE
#define PROXY_BALANCER_MAX_STICKY_SIZE 64
@@ -127,10 +120,10 @@ diff -uap httpd-2.4.33/modules/proxy/mod_proxy.h.r1738878 httpd-2.4.33/modules/p
#define PROXY_RFC1035_HOSTNAME_SIZE 256
-@@ -447,6 +448,7 @@
- apr_interval_time_t interval;
- char upgrade[PROXY_WORKER_MAX_SCHEME_SIZE];/* upgrade protocol used by mod_proxy_wstunnel */
+@@ -453,6 +454,7 @@
char hostname_ex[PROXY_RFC1035_HOSTNAME_SIZE]; /* RFC1035 compliant version of the remote backend address */
+ apr_size_t response_field_size; /* Size of proxy response buffer in bytes. */
+ unsigned int response_field_size_set:1;
+ char secret[PROXY_WORKER_MAX_SECRET_SIZE]; /* authentication secret (e.g. AJP13) */
} proxy_worker_shared;
diff --git a/httpd.spec b/httpd.spec
index 8f22536..8e30af1 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -12,8 +12,8 @@
Summary: Apache HTTP Server
Name: httpd
-Version: 2.4.33
-Release: 10%{?dist}
+Version: 2.4.34
+Release: 1%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -78,10 +78,7 @@ Patch36: httpd-2.4.33-r1830819+.patch
# Bug fixes
# https://bugzilla.redhat.com/show_bug.cgi?id=1397243
-Patch58: httpd-2.4.33-r1738878.patch
-# https://bugzilla.redhat.com/show_bug.cgi?id=1564537
-Patch59: httpd-2.4.33-sslmerging.patch
-Patch60: httpd-2.4.33-r1833841.patch
+Patch58: httpd-2.4.34-r1738878.patch
# Security fixes
@@ -230,7 +227,7 @@ interface for storing and accessing per-user session data.
%patch23 -p1 -b .export
%patch24 -p1 -b .corelimit
%patch25 -p1 -b .selinux
-%patch26 -p1 -b .r1337344+
+#patch26 -p1 -b .r1337344+
%patch27 -p1 -b .icons
%patch29 -p1 -b .systemd
%patch30 -p1 -b .cachehardmax
@@ -240,8 +237,6 @@ interface for storing and accessing per-user session data.
%patch36 -p1 -b .r1830819+
%patch58 -p1 -b .r1738878
-%patch59 -p1 -b .sslmerging
-%patch60 -p1 -b .r1833841
# Patch in the vendor string
sed -i '/^#define PLATFORM/s/Unix/%{vstring}/' os/unix/os.h
@@ -730,6 +725,9 @@ exit $rv
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Wed Jul 18 2018 Joe Orton - 2.4.34-1
+- update to 2.4.34 (#1601160)
+
* Mon Jul 16 2018 Joe Orton - 2.4.33-10
- don't block on service try-restart in posttrans scriptlet
- add Lua-based /server-status example page to docs
From 3a7bb1c9cbf2e2d6b2ca30005f04091aefa8217a Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Wed, 18 Jul 2018 12:11:53 +0100
Subject: [PATCH 124/359] Add sources.
---
sources | 1 +
1 file changed, 1 insertion(+)
diff --git a/sources b/sources
index e8c3a89..a131fd4 100644
--- a/sources
+++ b/sources
@@ -1 +1,2 @@
SHA512 (httpd-2.4.33.tar.bz2) = e74b2b3346d67be45a8bc8a7cbb8eabf5c403a5cfe5797a976f94a539529843fbcdf03b9ca0548816b2cf37f4ce0eb301f8d5af25b1270fdf8dd9f5bf0585269
+SHA512 (httpd-2.4.34.tar.bz2) = 2bc09213f08a4722e305929fbac5f5060c7a8444704494894bb9b61f17e4d20bb6e3d663bb93fc5b2030b04a43fb12373d260cc291422b210b299725aaf3b5c8
From e07e4cdf0ff62c65f73258c7e3a120567a1cb02a Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Wed, 18 Jul 2018 12:13:22 +0100
Subject: [PATCH 125/359] Remove old sources.
---
sources | 1 -
1 file changed, 1 deletion(-)
diff --git a/sources b/sources
index a131fd4..1840642 100644
--- a/sources
+++ b/sources
@@ -1,2 +1 @@
-SHA512 (httpd-2.4.33.tar.bz2) = e74b2b3346d67be45a8bc8a7cbb8eabf5c403a5cfe5797a976f94a539529843fbcdf03b9ca0548816b2cf37f4ce0eb301f8d5af25b1270fdf8dd9f5bf0585269
SHA512 (httpd-2.4.34.tar.bz2) = 2bc09213f08a4722e305929fbac5f5060c7a8444704494894bb9b61f17e4d20bb6e3d663bb93fc5b2030b04a43fb12373d260cc291422b210b299725aaf3b5c8
From 71609fae141f89f2ee6602938b80b7ef59ff38de Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Wed, 18 Jul 2018 20:22:36 +0100
Subject: [PATCH 126/359] update Obsoletes for mod_proxy_uswgi (#1599113)
Resolves: rhbz#httpd.spec
---
httpd.spec | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/httpd.spec b/httpd.spec
index 8e30af1..bd55d7a 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -13,7 +13,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.34
-Release: 1%{?dist}
+Release: 2%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -102,7 +102,7 @@ Requires(postun): systemd-units
Requires(post): systemd-units
Conflicts: apr < 1.5.0-1
Provides: mod_proxy_uwsgi = %{version}-%{release}
-Obsoletes: mod_proxy_uwsgi < 2.0.17-1
+Obsoletes: mod_proxy_uwsgi < 2.0.17.1-2
%description
The Apache HTTP Server is a powerful, efficient, and extensible
@@ -725,6 +725,9 @@ exit $rv
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Wed Jul 18 2018 Joe Orton - 2.4.34-2
+- update Obsoletes for mod_proxy_uswgi (#1599113)
+
* Wed Jul 18 2018 Joe Orton - 2.4.34-1
- update to 2.4.34 (#1601160)
From 84d2251c2d61d47cef5fbd15e037ce643ff0086c Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Thu, 19 Jul 2018 18:47:48 +0100
Subject: [PATCH 127/359] - Fedora layout is now upstream, drop patch
---
httpd-2.4.3-layout.patch | 33 ---------------------------------
httpd.spec | 2 --
2 files changed, 35 deletions(-)
delete mode 100644 httpd-2.4.3-layout.patch
diff --git a/httpd-2.4.3-layout.patch b/httpd-2.4.3-layout.patch
deleted file mode 100644
index 163c66b..0000000
--- a/httpd-2.4.3-layout.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-
-Add layout for Fedora.
-
---- httpd-2.4.3/config.layout.layout
-+++ httpd-2.4.3/config.layout
-@@ -370,3 +370,27 @@
- logfiledir: ${localstatedir}/log/httpd
- proxycachedir: ${localstatedir}/cache/httpd
-
-+
-+# Fedora/RHEL layout
-+
-+ prefix: /usr
-+ exec_prefix: ${prefix}
-+ bindir: ${prefix}/bin
-+ sbindir: ${prefix}/sbin
-+ libdir: ${prefix}/lib
-+ libexecdir: ${prefix}/libexec
-+ mandir: ${prefix}/man
-+ sysconfdir: /etc/httpd/conf
-+ datadir: ${prefix}/share/httpd
-+ installbuilddir: ${libdir}/httpd/build
-+ errordir: ${datadir}/error
-+ iconsdir: ${datadir}/icons
-+ htdocsdir: /var/www/html
-+ manualdir: ${datadir}/manual
-+ cgidir: /var/www/cgi-bin
-+ includedir: ${prefix}/include/httpd
-+ localstatedir: /var
-+ runtimedir: /run/httpd
-+ logfiledir: ${localstatedir}/log/httpd
-+ proxycachedir: ${localstatedir}/cache/httpd/proxy
-+
diff --git a/httpd.spec b/httpd.spec
index bd55d7a..e2e8e86 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -58,7 +58,6 @@ Source44: httpd@.service
Patch1: httpd-2.4.1-apctl.patch
Patch2: httpd-2.4.9-apxs.patch
Patch3: httpd-2.4.1-deplibs.patch
-Patch5: httpd-2.4.3-layout.patch
Patch6: httpd-2.4.3-apctl-systemd.patch
# Needed for socket activation and mod_systemd patch
Patch19: httpd-2.4.25-detect-systemd.patch
@@ -218,7 +217,6 @@ interface for storing and accessing per-user session data.
%patch1 -p1 -b .apctl
%patch2 -p1 -b .apxs
%patch3 -p1 -b .deplibs
-%patch5 -p1 -b .layout
%patch6 -p1 -b .apctlsystemd
%patch19 -p1 -b .detectsystemd
From e7a848a3dbca276fc439833e5e6ed62aac023e1a Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Fri, 20 Jul 2018 11:22:10 +0100
Subject: [PATCH 128/359] mod_ssl: fix OCSP regression (upstream r1555631)
---
httpd-2.4.34-r1555631.patch | 14 ++++++++++++++
httpd.spec | 7 ++++++-
pullrev.sh | 4 ++--
3 files changed, 22 insertions(+), 3 deletions(-)
create mode 100644 httpd-2.4.34-r1555631.patch
diff --git a/httpd-2.4.34-r1555631.patch b/httpd-2.4.34-r1555631.patch
new file mode 100644
index 0000000..7ca9478
--- /dev/null
+++ b/httpd-2.4.34-r1555631.patch
@@ -0,0 +1,14 @@
+# ./pullrev.sh 1555631
+http://svn.apache.org/viewvc?view=revision&revision=1555631
+
+--- httpd-2.4.34/modules/ssl/ssl_engine_ocsp.c
++++ httpd-2.4.34/modules/ssl/ssl_engine_ocsp.c
+@@ -61,7 +61,7 @@
+ /* Use default responder URL if forced by configuration, else use
+ * certificate-specified responder, falling back to default if
+ * necessary and possible. */
+- if (sc->server->ocsp_force_default) {
++ if (sc->server->ocsp_force_default == TRUE) {
+ s = sc->server->ocsp_responder;
+ }
+ else {
diff --git a/httpd.spec b/httpd.spec
index e2e8e86..c90d5c5 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -13,7 +13,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.34
-Release: 2%{?dist}
+Release: 3%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -78,6 +78,7 @@ Patch36: httpd-2.4.33-r1830819+.patch
# Bug fixes
# https://bugzilla.redhat.com/show_bug.cgi?id=1397243
Patch58: httpd-2.4.34-r1738878.patch
+Patch59: httpd-2.4.34-r1555631.patch
# Security fixes
@@ -235,6 +236,7 @@ interface for storing and accessing per-user session data.
%patch36 -p1 -b .r1830819+
%patch58 -p1 -b .r1738878
+%patch59 -p1 -b .r1555631
# Patch in the vendor string
sed -i '/^#define PLATFORM/s/Unix/%{vstring}/' os/unix/os.h
@@ -723,6 +725,9 @@ exit $rv
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Fri Jul 20 2018 Joe Orton - 2.4.34-3
+- mod_ssl: fix OCSP regression (upstream r1555631)
+
* Wed Jul 18 2018 Joe Orton - 2.4.34-2
- update Obsoletes for mod_proxy_uswgi (#1599113)
diff --git a/pullrev.sh b/pullrev.sh
index e389b56..dbb97a5 100755
--- a/pullrev.sh
+++ b/pullrev.sh
@@ -6,8 +6,8 @@ if [ $# -lt 1 ]; then
fi
repo="https://svn.apache.org/repos/asf/httpd/httpd/trunk"
-repo="https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x"
-ver=2.4.33
+#repo="https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x"
+ver=2.4.34
prefix="httpd-${ver}"
suffix="r$1${2:++}"
fn="${prefix}-${suffix}.patch"
From 16e8d752336b4300e840b50e4e8604f1fea529c5 Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Mon, 23 Jul 2018 13:43:03 +0100
Subject: [PATCH 129/359] Wording updates.
---
httpd.service.xml | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/httpd.service.xml b/httpd.service.xml
index e079ca2..4a6038d 100644
--- a/httpd.service.xml
+++ b/httpd.service.xml
@@ -56,8 +56,8 @@
This manual page describes the systemd
unit files used to integrate the httpd daemon
- with systemd. Two unit files are available:
- httpd.service allows the
+ with systemd. Two main unit files are
+ available: httpd.service allows the
httpd daemon to be run as a system service, and
httpd.socket allows httpd to be started via
socket-based activation. Most systems will use
@@ -223,8 +223,9 @@ Wants=network-online.target
to which httpd can bind (using the Listen
directive), which parts of the filesystem can be accessed, and
whether outgoing TCP connections are possible. Many of these
- restrictions can be adjusted using semanage
- to change booleans or other types. See
+ restrictions can be relaxed or adjusted by using
+ semanage to change booleans or other
+ types. See
httpd_selinux8
for more information.
From 2f9bc4598d6ae6b6d700bbaf3db7b33315edb06b Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Mon, 13 Aug 2018 14:43:07 +0100
Subject: [PATCH 130/359] mod_ssl: backport TLSv1.3 support changes from
upstream (#1615059) Resolves: rhbz#1615059
---
httpd-2.4.34-layfix.patch | 24 ++
httpd-2.4.34-r1827912+.patch | 737 +++++++++++++++++++++++++++++++++++
httpd.spec | 9 +-
3 files changed, 769 insertions(+), 1 deletion(-)
create mode 100644 httpd-2.4.34-layfix.patch
create mode 100644 httpd-2.4.34-r1827912+.patch
diff --git a/httpd-2.4.34-layfix.patch b/httpd-2.4.34-layfix.patch
new file mode 100644
index 0000000..39728a1
--- /dev/null
+++ b/httpd-2.4.34-layfix.patch
@@ -0,0 +1,24 @@
+--- httpd-2.4.34/config.layout.layfix
++++ httpd-2.4.34/config.layout
+@@ -133,6 +133,7 @@
+ # Layout used in Fedora httpd packaging.
+
+ prefix: /usr
++ localstatedir: /var
+ exec_prefix: ${prefix}
+ bindir: ${prefix}/bin
+ sbindir: ${prefix}/sbin
+@@ -144,11 +145,10 @@
+ installbuilddir: ${libdir}/httpd/build
+ errordir: ${datadir}/error
+ iconsdir: ${datadir}/icons
+- htdocsdir: /var/www/html
++ htdocsdir: ${localstatedir}/www/html
+ manualdir: ${datadir}/manual
+- cgidir: /var/www/cgi-bin
++ cgidir: ${localstatedir}/www/cgi-bin
+ includedir: ${prefix}/include/httpd
+- localstatedir: /var
+ runtimedir: /run/httpd
+ logfiledir: ${localstatedir}/log/httpd
+ proxycachedir: ${localstatedir}/cache/httpd/proxy
diff --git a/httpd-2.4.34-r1827912+.patch b/httpd-2.4.34-r1827912+.patch
new file mode 100644
index 0000000..a4567a6
--- /dev/null
+++ b/httpd-2.4.34-r1827912+.patch
@@ -0,0 +1,737 @@
+# ./pullrev.sh 1827912 1827924 1827992 1828220 1828222 1828720 1828723 1828790 1828791 1828792
+http://svn.apache.org/viewvc?view=revision&revision=1827912
+http://svn.apache.org/viewvc?view=revision&revision=1827924
+http://svn.apache.org/viewvc?view=revision&revision=1827992
+http://svn.apache.org/viewvc?view=revision&revision=1828220
+http://svn.apache.org/viewvc?view=revision&revision=1828222
+http://svn.apache.org/viewvc?view=revision&revision=1828720
+http://svn.apache.org/viewvc?view=revision&revision=1828723
+http://svn.apache.org/viewvc?view=revision&revision=1828790
+http://svn.apache.org/viewvc?view=revision&revision=1828791
+http://svn.apache.org/viewvc?view=revision&revision=1828792
+
+--- httpd-2.4.34/modules/ssl/mod_ssl.c.r1827912+
++++ httpd-2.4.34/modules/ssl/mod_ssl.c
+@@ -93,9 +93,9 @@
+ SSL_CMD_SRV(FIPS, FLAG,
+ "Enable FIPS-140 mode "
+ "(`on', `off')")
+- SSL_CMD_ALL(CipherSuite, TAKE1,
+- "Colon-delimited list of permitted SSL Ciphers "
+- "('XXX:...:XXX' - see manual)")
++ SSL_CMD_ALL(CipherSuite, TAKE12,
++ "Colon-delimited list of permitted SSL Ciphers, optional preceeded "
++ "by protocol identifier ('XXX:...:XXX' - see manual)")
+ SSL_CMD_SRV(CertificateFile, TAKE1,
+ "SSL Server Certificate file "
+ "('/path/to/file' - PEM or DER encoded)")
+@@ -185,9 +185,9 @@
+ SSL_CMD_PXY(ProxyProtocol, RAW_ARGS,
+ "SSL Proxy: enable or disable SSL protocol flavors "
+ "('[+-][" SSL_PROTOCOLS "] ...' - see manual)")
+- SSL_CMD_PXY(ProxyCipherSuite, TAKE1,
++ SSL_CMD_PXY(ProxyCipherSuite, TAKE12,
+ "SSL Proxy: colon-delimited list of permitted SSL ciphers "
+- "('XXX:...:XXX' - see manual)")
++ ", optionally preceeded by protocol specifier ('XXX:...:XXX' - see manual)")
+ SSL_CMD_PXY(ProxyVerify, TAKE1,
+ "SSL Proxy: whether to verify the remote certificate "
+ "('on' or 'off')")
+@@ -398,7 +398,7 @@
+ /* We must register the library in full, to ensure our configuration
+ * code can successfully test the SSL environment.
+ */
+-#if MODSSL_USE_OPENSSL_PRE_1_1_API
++#if MODSSL_USE_OPENSSL_PRE_1_1_API || defined(LIBRESSL_VERSION_NUMBER)
+ (void)CRYPTO_malloc_init();
+ #else
+ OPENSSL_malloc_init();
+--- httpd-2.4.34/modules/ssl/ssl_engine_config.c.r1827912+
++++ httpd-2.4.34/modules/ssl/ssl_engine_config.c
+@@ -136,6 +136,7 @@
+ mctx->auth.cipher_suite = NULL;
+ mctx->auth.verify_depth = UNSET;
+ mctx->auth.verify_mode = SSL_CVERIFY_UNSET;
++ mctx->auth.tls13_ciphers = NULL;
+
+ mctx->ocsp_mask = UNSET;
+ mctx->ocsp_force_default = UNSET;
+@@ -280,6 +281,7 @@
+ cfgMergeString(auth.cipher_suite);
+ cfgMergeInt(auth.verify_depth);
+ cfgMerge(auth.verify_mode, SSL_CVERIFY_UNSET);
++ cfgMergeString(auth.tls13_ciphers);
+
+ cfgMergeInt(ocsp_mask);
+ cfgMergeBool(ocsp_force_default);
+@@ -761,24 +763,39 @@
+
+ const char *ssl_cmd_SSLCipherSuite(cmd_parms *cmd,
+ void *dcfg,
+- const char *arg)
++ const char *arg1, const char *arg2)
+ {
+ SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
+ SSLDirConfigRec *dc = (SSLDirConfigRec *)dcfg;
+
+- /* Disable null and export ciphers by default, except for PROFILE=
+- * configs where the parser doesn't cope. */
+- if (strncmp(arg, "PROFILE=", 8) != 0)
+- arg = apr_pstrcat(cmd->pool, arg, ":!aNULL:!eNULL:!EXP", NULL);
+-
+- if (cmd->path) {
+- dc->szCipherSuite = arg;
+- }
+- else {
+- sc->server->auth.cipher_suite = arg;
++ if (arg2 == NULL) {
++ arg2 = arg1;
++ arg1 = "SSL";
+ }
+-
+- return NULL;
++
++ if (!strcmp("SSL", arg1)) {
++ /* Disable null and export ciphers by default, except for PROFILE=
++ * configs where the parser doesn't cope. */
++ if (strncmp(arg2, "PROFILE=", 8) != 0)
++ arg2 = apr_pstrcat(cmd->pool, arg2, ":!aNULL:!eNULL:!EXP", NULL);
++ if (cmd->path) {
++ dc->szCipherSuite = arg2;
++ }
++ else {
++ sc->server->auth.cipher_suite = arg2;
++ }
++ return NULL;
++ }
++#ifdef SSL_OP_NO_TLSv1_3
++ else if (!strcmp("TLSv1.3", arg1)) {
++ if (cmd->path) {
++ return "TLSv1.3 ciphers cannot be set inside a directory context";
++ }
++ sc->server->auth.tls13_ciphers = arg2;
++ return NULL;
++ }
++#endif
++ return apr_pstrcat(cmd->pool, "procotol '", arg1, "' not supported", NULL);
+ }
+
+ #define SSL_FLAGS_CHECK_FILE \
+@@ -1451,6 +1468,9 @@
+ else if (strcEQ(w, "TLSv1.2")) {
+ thisopt = SSL_PROTOCOL_TLSV1_2;
+ }
++ else if (SSL_HAVE_PROTOCOL_TLSV1_3 && strcEQ(w, "TLSv1.3")) {
++ thisopt = SSL_PROTOCOL_TLSV1_3;
++ }
+ #endif
+ else if (strcEQ(w, "all")) {
+ thisopt = SSL_PROTOCOL_ALL;
+@@ -1512,18 +1532,30 @@
+
+ const char *ssl_cmd_SSLProxyCipherSuite(cmd_parms *cmd,
+ void *dcfg,
+- const char *arg)
++ const char *arg1, const char *arg2)
+ {
+ SSLDirConfigRec *dc = (SSLDirConfigRec *)dcfg;
+-
+- /* Disable null and export ciphers by default, except for PROFILE=
+- * configs where the parser doesn't cope. */
+- if (strncmp(arg, "PROFILE=", 8) != 0)
+- arg = apr_pstrcat(cmd->pool, arg, ":!aNULL:!eNULL:!EXP", NULL);
+-
+- dc->proxy->auth.cipher_suite = arg;
+-
+- return NULL;
++
++ if (arg2 == NULL) {
++ arg2 = arg1;
++ arg1 = "SSL";
++ }
++
++ if (!strcmp("SSL", arg1)) {
++ /* Disable null and export ciphers by default, except for PROFILE=
++ * configs where the parser doesn't cope. */
++ if (strncmp(arg2, "PROFILE=", 8) != 0)
++ arg2 = apr_pstrcat(cmd->pool, arg2, ":!aNULL:!eNULL:!EXP", NULL);
++ dc->proxy->auth.cipher_suite = arg2;
++ return NULL;
++ }
++#ifdef SSL_OP_NO_TLSv1_3
++ else if (!strcmp("TLSv1.3", arg1)) {
++ dc->proxy->auth.tls13_ciphers = arg2;
++ return NULL;
++ }
++#endif
++ return apr_pstrcat(cmd->pool, "procotol '", arg1, "' not supported", NULL);
+ }
+
+ const char *ssl_cmd_SSLProxyVerify(cmd_parms *cmd,
+--- httpd-2.4.34/modules/ssl/ssl_engine_init.c.r1827912+
++++ httpd-2.4.34/modules/ssl/ssl_engine_init.c
+@@ -568,6 +568,9 @@
+ #ifdef HAVE_TLSV1_X
+ (protocol & SSL_PROTOCOL_TLSV1_1 ? "TLSv1.1, " : ""),
+ (protocol & SSL_PROTOCOL_TLSV1_2 ? "TLSv1.2, " : ""),
++#if SSL_HAVE_PROTOCOL_TLSV1_3
++ (protocol & SSL_PROTOCOL_TLSV1_3 ? "TLSv1.3, " : ""),
++#endif
+ #endif
+ NULL);
+ cp[strlen(cp)-2] = NUL;
+@@ -600,6 +603,13 @@
+ TLSv1_2_client_method() : /* proxy */
+ TLSv1_2_server_method(); /* server */
+ }
++#ifdef SSL_OP_NO_TLSv1_3
++ else if (protocol == SSL_PROTOCOL_TLSV1_3) {
++ method = mctx->pkp ?
++ TLSv1_3_client_method() : /* proxy */
++ TLSv1_3_server_method(); /* server */
++ }
++#endif
+ #endif
+ else { /* For multiple protocols, we need a flexible method */
+ method = mctx->pkp ?
+@@ -617,7 +627,8 @@
+
+ SSL_CTX_set_options(ctx, SSL_OP_ALL);
+
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || \
++ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20800000L)
+ /* always disable SSLv2, as per RFC 6176 */
+ SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv2);
+
+@@ -640,9 +651,19 @@
+ SSL_CTX_set_options(ctx, SSL_OP_NO_TLSv1_2);
+ }
+ #endif
++#ifdef SSL_OP_NO_TLSv1_3
++ if (!(protocol & SSL_PROTOCOL_TLSV1_3)) {
++ SSL_CTX_set_options(ctx, SSL_OP_NO_TLSv1_3);
++ }
++#endif
+
+ #else /* #if OPENSSL_VERSION_NUMBER < 0x10100000L */
+ /* We first determine the maximum protocol version we should provide */
++#ifdef SSL_OP_NO_TLSv1_3
++ if (SSL_HAVE_PROTOCOL_TLSV1_3 && (protocol & SSL_PROTOCOL_TLSV1_3)) {
++ prot = TLS1_3_VERSION;
++ } else
++#endif
+ if (protocol & SSL_PROTOCOL_TLSV1_2) {
+ prot = TLS1_2_VERSION;
+ } else if (protocol & SSL_PROTOCOL_TLSV1_1) {
+@@ -664,6 +685,11 @@
+
+ /* Next we scan for the minimal protocol version we should provide,
+ * but we do not allow holes between max and min */
++#ifdef SSL_OP_NO_TLSv1_3
++ if (prot == TLS1_3_VERSION && protocol & SSL_PROTOCOL_TLSV1_2) {
++ prot = TLS1_2_VERSION;
++ }
++#endif
+ if (prot == TLS1_2_VERSION && protocol & SSL_PROTOCOL_TLSV1_1) {
+ prot = TLS1_1_VERSION;
+ }
+@@ -888,7 +914,15 @@
+ ssl_log_ssl_error(SSLLOG_MARK, APLOG_EMERG, s);
+ return ssl_die(s);
+ }
+-
++#ifdef SSL_OP_NO_TLSv1_3
++ if (mctx->auth.tls13_ciphers
++ && !SSL_CTX_set_ciphersuites(ctx, mctx->auth.tls13_ciphers)) {
++ ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO()
++ "Unable to configure permitted TLSv1.3 ciphers");
++ ssl_log_ssl_error(SSLLOG_MARK, APLOG_EMERG, s);
++ return ssl_die(s);
++ }
++#endif
+ return APR_SUCCESS;
+ }
+
+--- httpd-2.4.34/modules/ssl/ssl_engine_kernel.c.r1827912+
++++ httpd-2.4.34/modules/ssl/ssl_engine_kernel.c
+@@ -188,6 +188,12 @@
+ || strcmp(a1->cipher_suite, a2->cipher_suite))) {
+ return 0;
+ }
++ /* both have the same ca cipher suite string */
++ if ((a1->tls13_ciphers != a2->tls13_ciphers)
++ && (!a1->tls13_ciphers || !a2->tls13_ciphers
++ || strcmp(a1->tls13_ciphers, a2->tls13_ciphers))) {
++ return 0;
++ }
+ return 1;
+ }
+
+@@ -424,21 +430,55 @@
+ }
+ }
+
++static int ssl_check_post_client_verify(request_rec *r, SSLSrvConfigRec *sc,
++ SSLDirConfigRec *dc, SSL *ssl)
++{
++ /*
++ * Finally check for acceptable renegotiation results
++ */
++ if ((dc->nVerifyClient != SSL_CVERIFY_NONE) ||
++ (sc->server->auth.verify_mode != SSL_CVERIFY_NONE)) {
++ BOOL do_verify = ((dc->nVerifyClient == SSL_CVERIFY_REQUIRE) ||
++ (sc->server->auth.verify_mode == SSL_CVERIFY_REQUIRE));
++
++ if (do_verify && (SSL_get_verify_result(ssl) != X509_V_OK)) {
++ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02262)
++ "Re-negotiation handshake failed: "
++ "Client verification failed");
++
++ return HTTP_FORBIDDEN;
++ }
++
++ if (do_verify) {
++ X509 *peercert;
++
++ if ((peercert = SSL_get_peer_certificate(ssl)) == NULL) {
++ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02263)
++ "Re-negotiation handshake failed: "
++ "Client certificate missing");
++
++ return HTTP_FORBIDDEN;
++ }
++
++ X509_free(peercert);
++ }
++ }
++ return OK;
++}
++
+ /*
+- * Access Handler
++ * Access Handler, classic flavour, for SSL/TLS up to v1.2
++ * where everything can be renegotiated and no one is happy.
+ */
+-int ssl_hook_Access(request_rec *r)
++static int ssl_hook_Access_classic(request_rec *r, SSLSrvConfigRec *sc, SSLDirConfigRec *dc,
++ SSLConnRec *sslconn, SSL *ssl)
+ {
+- SSLDirConfigRec *dc = myDirConfig(r);
+- SSLSrvConfigRec *sc = mySrvConfig(r->server);
+- SSLConnRec *sslconn = myConnConfig(r->connection);
+- SSL *ssl = sslconn ? sslconn->ssl : NULL;
+ server_rec *handshakeserver = sslconn ? sslconn->server : NULL;
+ SSLSrvConfigRec *hssc = handshakeserver? mySrvConfig(handshakeserver) : NULL;
+ SSL_CTX *ctx = NULL;
+ apr_array_header_t *requires;
+ ssl_require_t *ssl_requires;
+- int ok, i;
++ int ok, i, rc;
+ BOOL renegotiate = FALSE, renegotiate_quick = FALSE;
+ X509 *cert;
+ X509 *peercert;
+@@ -446,66 +486,9 @@
+ X509_STORE_CTX *cert_store_ctx;
+ STACK_OF(SSL_CIPHER) *cipher_list_old = NULL, *cipher_list = NULL;
+ const SSL_CIPHER *cipher = NULL;
+- int depth, verify_old, verify, n, is_slave = 0;
++ int depth, verify_old, verify, n;
+ const char *ncipher_suite;
+
+- /* On a slave connection, we do not expect to have an SSLConnRec, but
+- * our master connection might have one. */
+- if (!(sslconn && ssl) && r->connection->master) {
+- sslconn = myConnConfig(r->connection->master);
+- ssl = sslconn ? sslconn->ssl : NULL;
+- handshakeserver = sslconn ? sslconn->server : NULL;
+- hssc = handshakeserver? mySrvConfig(handshakeserver) : NULL;
+- is_slave = 1;
+- }
+-
+- if (ssl) {
+- /*
+- * We should have handshaken here (on handshakeserver),
+- * otherwise we are being redirected (ErrorDocument) from
+- * a renegotiation failure below. The access is still
+- * forbidden in the latter case, let ap_die() handle
+- * this recursive (same) error.
+- */
+- if (!SSL_is_init_finished(ssl)) {
+- return HTTP_FORBIDDEN;
+- }
+- ctx = SSL_get_SSL_CTX(ssl);
+- }
+-
+- /*
+- * Support for SSLRequireSSL directive
+- */
+- if (dc->bSSLRequired && !ssl) {
+- if ((sc->enabled == SSL_ENABLED_OPTIONAL) && !is_slave) {
+- /* This vhost was configured for optional SSL, just tell the
+- * client that we need to upgrade.
+- */
+- apr_table_setn(r->err_headers_out, "Upgrade", "TLS/1.0, HTTP/1.1");
+- apr_table_setn(r->err_headers_out, "Connection", "Upgrade");
+-
+- return HTTP_UPGRADE_REQUIRED;
+- }
+-
+- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02219)
+- "access to %s failed, reason: %s",
+- r->filename, "SSL connection required");
+-
+- /* remember forbidden access for strict require option */
+- apr_table_setn(r->notes, "ssl-access-forbidden", "1");
+-
+- return HTTP_FORBIDDEN;
+- }
+-
+- /*
+- * Check to see whether SSL is in use; if it's not, then no
+- * further access control checks are relevant. (the test for
+- * sc->enabled is probably strictly unnecessary)
+- */
+- if (sc->enabled == SSL_ENABLED_FALSE || !ssl) {
+- return DECLINED;
+- }
+-
+ #ifdef HAVE_SRP
+ /*
+ * Support for per-directory reconfigured SSL connection parameters
+@@ -581,7 +564,7 @@
+ }
+
+ /* configure new state */
+- if (is_slave) {
++ if (r->connection->master) {
+ /* TODO: this categorically fails changed cipher suite settings
+ * on slave connections. We could do better by
+ * - create a new SSL* from our SSL_CTX and set cipher suite there,
+@@ -659,7 +642,7 @@
+ }
+
+ if (renegotiate) {
+- if (is_slave) {
++ if (r->connection->master) {
+ /* The request causes renegotiation on a slave connection.
+ * This is not allowed since we might have concurrent requests
+ * on this connection.
+@@ -732,7 +715,7 @@
+ (verify & SSL_VERIFY_FAIL_IF_NO_PEER_CERT)))
+ {
+ renegotiate = TRUE;
+- if (is_slave) {
++ if (r->connection->master) {
+ /* The request causes renegotiation on a slave connection.
+ * This is not allowed since we might have concurrent requests
+ * on this connection.
+@@ -1050,30 +1033,8 @@
+ /*
+ * Finally check for acceptable renegotiation results
+ */
+- if ((dc->nVerifyClient != SSL_CVERIFY_NONE) ||
+- (sc->server->auth.verify_mode != SSL_CVERIFY_NONE)) {
+- BOOL do_verify = ((dc->nVerifyClient == SSL_CVERIFY_REQUIRE) ||
+- (sc->server->auth.verify_mode == SSL_CVERIFY_REQUIRE));
+-
+- if (do_verify && (SSL_get_verify_result(ssl) != X509_V_OK)) {
+- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02262)
+- "Re-negotiation handshake failed: "
+- "Client verification failed");
+-
+- return HTTP_FORBIDDEN;
+- }
+-
+- if (do_verify) {
+- if ((peercert = SSL_get_peer_certificate(ssl)) == NULL) {
+- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02263)
+- "Re-negotiation handshake failed: "
+- "Client certificate missing");
+-
+- return HTTP_FORBIDDEN;
+- }
+-
+- X509_free(peercert);
+- }
++ if (OK != (rc = ssl_check_post_client_verify(r, sc, dc, ssl))) {
++ return rc;
+ }
+
+ /*
+@@ -1167,6 +1128,195 @@
+ return DECLINED;
+ }
+
++#ifdef SSL_OP_NO_TLSv1_3
++/*
++ * Access Handler, modern flavour, for SSL/TLS v1.3 and onward.
++ * Only client certificates can be requested, everything else stays.
++ */
++static int ssl_hook_Access_modern(request_rec *r, SSLSrvConfigRec *sc, SSLDirConfigRec *dc,
++ SSLConnRec *sslconn, SSL *ssl)
++{
++ if ((dc->nVerifyClient != SSL_CVERIFY_UNSET) ||
++ (sc->server->auth.verify_mode != SSL_CVERIFY_UNSET)) {
++ int vmode_inplace, vmode_needed;
++ int change_vmode = FALSE;
++ int old_state, n, rc;
++
++ vmode_inplace = SSL_get_verify_mode(ssl);
++ vmode_needed = SSL_VERIFY_NONE;
++
++ if ((dc->nVerifyClient == SSL_CVERIFY_REQUIRE) ||
++ (sc->server->auth.verify_mode == SSL_CVERIFY_REQUIRE)) {
++ vmode_needed |= SSL_VERIFY_PEER_STRICT;
++ }
++
++ if ((dc->nVerifyClient == SSL_CVERIFY_OPTIONAL) ||
++ (dc->nVerifyClient == SSL_CVERIFY_OPTIONAL_NO_CA) ||
++ (sc->server->auth.verify_mode == SSL_CVERIFY_OPTIONAL) ||
++ (sc->server->auth.verify_mode == SSL_CVERIFY_OPTIONAL_NO_CA))
++ {
++ vmode_needed |= SSL_VERIFY_PEER;
++ }
++
++ if (vmode_needed == SSL_VERIFY_NONE) {
++ return DECLINED;
++ }
++
++ vmode_needed |= SSL_VERIFY_CLIENT_ONCE;
++ if (vmode_inplace != vmode_needed) {
++ /* Need to change, if new setting is more restrictive than existing one */
++
++ if ((vmode_inplace == SSL_VERIFY_NONE)
++ || (!(vmode_inplace & SSL_VERIFY_PEER)
++ && (vmode_needed & SSL_VERIFY_PEER))
++ || (!(vmode_inplace & SSL_VERIFY_FAIL_IF_NO_PEER_CERT)
++ && (vmode_needed & SSL_VERIFY_FAIL_IF_NO_PEER_CERT))) {
++ /* need to change the effective verify mode */
++ change_vmode = TRUE;
++ }
++ else {
++ /* FIXME: does this work with TLSv1.3? Is this more than re-inspecting
++ * the certificate we should already have? */
++ /*
++ * override of SSLVerifyDepth
++ *
++ * The depth checks are handled by us manually inside the
++ * verify callback function and not by OpenSSL internally
++ * (and our function is aware of both the per-server and
++ * per-directory contexts). So we cannot ask OpenSSL about
++ * the currently verify depth. Instead we remember it in our
++ * SSLConnRec attached to the SSL* of OpenSSL. We've to force
++ * the renegotiation if the reconfigured/new verify depth is
++ * less than the currently active/remembered verify depth
++ * (because this means more restriction on the certificate
++ * chain).
++ */
++ n = (sslconn->verify_depth != UNSET)?
++ sslconn->verify_depth : sc->server->auth.verify_depth;
++ /* determine the new depth */
++ sslconn->verify_depth = (dc->nVerifyDepth != UNSET)
++ ? dc->nVerifyDepth
++ : sc->server->auth.verify_depth;
++ if (sslconn->verify_depth < n) {
++ change_vmode = TRUE;
++ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO()
++ "Reduced client verification depth will "
++ "force renegotiation");
++ }
++ }
++ }
++
++ if (change_vmode) {
++ char peekbuf[1];
++
++ if (r->connection->master) {
++ /* FIXME: modifying the SSL on a slave connection is no good.
++ * We would need to push this back to the master connection
++ * somehow.
++ */
++ apr_table_setn(r->notes, "ssl-renegotiate-forbidden", "verify-client");
++ return HTTP_FORBIDDEN;
++ }
++
++ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO() "verify client post handshake");
++
++ SSL_set_verify(ssl, vmode_needed, ssl_callback_SSLVerify);
++ SSL_verify_client_post_handshake(ssl);
++
++ old_state = sslconn->reneg_state;
++ sslconn->reneg_state = RENEG_ALLOW;
++ modssl_set_app_data2(ssl, r);
++
++ SSL_do_handshake(ssl);
++ /* Need to trigger renegotiation handshake by reading.
++ * Peeking 0 bytes actually works.
++ * See: http://marc.info/?t=145493359200002&r=1&w=2
++ */
++ SSL_peek(ssl, peekbuf, 0);
++
++ sslconn->reneg_state = old_state;
++ modssl_set_app_data2(ssl, NULL);
++
++ /*
++ * Finally check for acceptable renegotiation results
++ */
++ if (OK != (rc = ssl_check_post_client_verify(r, sc, dc, ssl))) {
++ return rc;
++ }
++ }
++ }
++
++ return DECLINED;
++}
++#endif
++
++int ssl_hook_Access(request_rec *r)
++{
++ SSLDirConfigRec *dc = myDirConfig(r);
++ SSLSrvConfigRec *sc = mySrvConfig(r->server);
++ SSLConnRec *sslconn = myConnConfig(r->connection);
++ SSL *ssl = sslconn ? sslconn->ssl : NULL;
++
++ /* On a slave connection, we do not expect to have an SSLConnRec, but
++ * our master connection might have one. */
++ if (!(sslconn && ssl) && r->connection->master) {
++ sslconn = myConnConfig(r->connection->master);
++ ssl = sslconn ? sslconn->ssl : NULL;
++ }
++
++ /*
++ * We should have handshaken here, otherwise we are being
++ * redirected (ErrorDocument) from a renegotiation failure below.
++ * The access is still forbidden in the latter case, let ap_die() handle
++ * this recursive (same) error.
++ */
++ if (ssl && !SSL_is_init_finished(ssl)) {
++ return HTTP_FORBIDDEN;
++ }
++
++ /*
++ * Support for SSLRequireSSL directive
++ */
++ if (dc->bSSLRequired && !ssl) {
++ if ((sc->enabled == SSL_ENABLED_OPTIONAL) && !r->connection->master) {
++ /* This vhost was configured for optional SSL, just tell the
++ * client that we need to upgrade.
++ */
++ apr_table_setn(r->err_headers_out, "Upgrade", "TLS/1.0, HTTP/1.1");
++ apr_table_setn(r->err_headers_out, "Connection", "Upgrade");
++
++ return HTTP_UPGRADE_REQUIRED;
++ }
++
++ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02219)
++ "access to %s failed, reason: %s",
++ r->filename, "SSL connection required");
++
++ /* remember forbidden access for strict require option */
++ apr_table_setn(r->notes, "ssl-access-forbidden", "1");
++
++ return HTTP_FORBIDDEN;
++ }
++
++ /*
++ * Check to see whether SSL is in use; if it's not, then no
++ * further access control checks are relevant. (the test for
++ * sc->enabled is probably strictly unnecessary)
++ */
++ if (sc->enabled == SSL_ENABLED_FALSE || !ssl) {
++ return DECLINED;
++ }
++
++#ifdef SSL_OP_NO_TLSv1_3
++ /* TLSv1.3+ is less complicated here. Branch off into a new codeline
++ * and avoid messing with the past. */
++ if (SSL_version(ssl) >= TLS1_3_VERSION) {
++ return ssl_hook_Access_modern(r, sc, dc, sslconn, ssl);
++ }
++#endif
++ return ssl_hook_Access_classic(r, sc, dc, sslconn, ssl);
++}
++
+ /*
+ * Authentication Handler:
+ * Fake a Basic authentication from the X509 client certificate.
+--- httpd-2.4.34/modules/ssl/ssl_private.h.r1827912+
++++ httpd-2.4.34/modules/ssl/ssl_private.h
+@@ -132,13 +132,14 @@
+ SSL_CTX_ctrl(ctx, SSL_CTRL_SET_MIN_PROTO_VERSION, version, NULL)
+ #define SSL_CTX_set_max_proto_version(ctx, version) \
+ SSL_CTX_ctrl(ctx, SSL_CTRL_SET_MAX_PROTO_VERSION, version, NULL)
+-#endif
+-/* LibreSSL declares OPENSSL_VERSION_NUMBER == 2.0 but does not include most
+- * changes from OpenSSL >= 1.1 (new functions, macros, deprecations, ...), so
+- * we have to work around this...
++#elif LIBRESSL_VERSION_NUMBER < 0x2070000f
++/* LibreSSL before 2.7 declares OPENSSL_VERSION_NUMBER == 2.0 but does not
++ * include most changes from OpenSSL >= 1.1 (new functions, macros,
++ * deprecations, ...), so we have to work around this...
+ */
+ #define MODSSL_USE_OPENSSL_PRE_1_1_API (1)
+-#else
++#endif /* LIBRESSL_VERSION_NUMBER < 0x2060000f */
++#else /* defined(LIBRESSL_VERSION_NUMBER) */
+ #define MODSSL_USE_OPENSSL_PRE_1_1_API (OPENSSL_VERSION_NUMBER < 0x10100000L)
+ #endif
+
+@@ -238,7 +239,8 @@
+ void free_bio_methods(void);
+ #endif
+
+-#if OPENSSL_VERSION_NUMBER < 0x10002000L || defined(LIBRESSL_VERSION_NUMBER)
++#if OPENSSL_VERSION_NUMBER < 0x10002000L || \
++ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000f)
+ #define X509_STORE_CTX_get0_store(x) (x->ctx)
+ #endif
+
+@@ -372,8 +374,17 @@
+ #ifdef HAVE_TLSV1_X
+ #define SSL_PROTOCOL_TLSV1_1 (1<<3)
+ #define SSL_PROTOCOL_TLSV1_2 (1<<4)
++#define SSL_PROTOCOL_TLSV1_3 (1<<5)
++
++#ifdef SSL_OP_NO_TLSv1_3
++#define SSL_HAVE_PROTOCOL_TLSV1_3 (1)
++#define SSL_PROTOCOL_ALL (SSL_PROTOCOL_BASIC| \
++ SSL_PROTOCOL_TLSV1_1|SSL_PROTOCOL_TLSV1_2|SSL_PROTOCOL_TLSV1_3)
++#else
++#define SSL_HAVE_PROTOCOL_TLSV1_3 (0)
+ #define SSL_PROTOCOL_ALL (SSL_PROTOCOL_BASIC| \
+ SSL_PROTOCOL_TLSV1_1|SSL_PROTOCOL_TLSV1_2)
++#endif
+ #else
+ #define SSL_PROTOCOL_ALL (SSL_PROTOCOL_BASIC)
+ #endif
+@@ -646,6 +657,11 @@
+ /** for client or downstream server authentication */
+ int verify_depth;
+ ssl_verify_t verify_mode;
++
++ /** TLSv1.3 has its separate cipher list, separate from the
++ settings for older TLS protocol versions. Since which one takes
++ effect is a matter of negotiation, we need separate settings */
++ const char *tls13_ciphers;
+ } modssl_auth_ctx_t;
+
+ #ifdef HAVE_TLS_SESSION_TICKETS
+@@ -801,7 +817,7 @@
+ const char *ssl_cmd_SSLCryptoDevice(cmd_parms *, void *, const char *);
+ const char *ssl_cmd_SSLRandomSeed(cmd_parms *, void *, const char *, const char *, const char *);
+ const char *ssl_cmd_SSLEngine(cmd_parms *, void *, const char *);
+-const char *ssl_cmd_SSLCipherSuite(cmd_parms *, void *, const char *);
++const char *ssl_cmd_SSLCipherSuite(cmd_parms *, void *, const char *, const char *);
+ const char *ssl_cmd_SSLCertificateFile(cmd_parms *, void *, const char *);
+ const char *ssl_cmd_SSLCertificateKeyFile(cmd_parms *, void *, const char *);
+ const char *ssl_cmd_SSLCertificateChainFile(cmd_parms *, void *, const char *);
+@@ -830,7 +846,7 @@
+
+ const char *ssl_cmd_SSLProxyEngine(cmd_parms *cmd, void *dcfg, int flag);
+ const char *ssl_cmd_SSLProxyProtocol(cmd_parms *, void *, const char *);
+-const char *ssl_cmd_SSLProxyCipherSuite(cmd_parms *, void *, const char *);
++const char *ssl_cmd_SSLProxyCipherSuite(cmd_parms *, void *, const char *, const char *);
+ const char *ssl_cmd_SSLProxyVerify(cmd_parms *, void *, const char *);
+ const char *ssl_cmd_SSLProxyVerifyDepth(cmd_parms *, void *, const char *);
+ const char *ssl_cmd_SSLProxyCACertificatePath(cmd_parms *, void *, const char *);
diff --git a/httpd.spec b/httpd.spec
index c90d5c5..d87e1c6 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -13,7 +13,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.34
-Release: 3%{?dist}
+Release: 4%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -58,6 +58,7 @@ Source44: httpd@.service
Patch1: httpd-2.4.1-apctl.patch
Patch2: httpd-2.4.9-apxs.patch
Patch3: httpd-2.4.1-deplibs.patch
+Patch4: httpd-2.4.34-layfix.patch
Patch6: httpd-2.4.3-apctl-systemd.patch
# Needed for socket activation and mod_systemd patch
Patch19: httpd-2.4.25-detect-systemd.patch
@@ -74,6 +75,7 @@ Patch31: httpd-2.4.33-sslmultiproxy.patch
Patch34: httpd-2.4.17-socket-activation.patch
Patch35: httpd-2.4.33-sslciphdefault.patch
Patch36: httpd-2.4.33-r1830819+.patch
+Patch37: httpd-2.4.34-r1827912+.patch
# Bug fixes
# https://bugzilla.redhat.com/show_bug.cgi?id=1397243
@@ -218,6 +220,7 @@ interface for storing and accessing per-user session data.
%patch1 -p1 -b .apctl
%patch2 -p1 -b .apxs
%patch3 -p1 -b .deplibs
+%patch4 -p1 -b .layfix
%patch6 -p1 -b .apctlsystemd
%patch19 -p1 -b .detectsystemd
@@ -234,6 +237,7 @@ interface for storing and accessing per-user session data.
%patch34 -p1 -b .socketactivation
%patch35 -p1 -b .sslciphdefault
%patch36 -p1 -b .r1830819+
+%patch37 -p1 -b .r1827912+
%patch58 -p1 -b .r1738878
%patch59 -p1 -b .r1555631
@@ -725,6 +729,9 @@ exit $rv
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Mon Aug 13 2018 Joe Orton - 2.4.34-4
+- mod_ssl: backport TLSv1.3 support changes from upstream (#1615059)
+
* Fri Jul 20 2018 Joe Orton - 2.4.34-3
- mod_ssl: fix OCSP regression (upstream r1555631)
From b52ebeb33d4b79ff9ec399502499fc92b56a3ee1 Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Tue, 21 Aug 2018 08:34:34 +0100
Subject: [PATCH 131/359] mod_ssl: further TLSv1.3 fix (#1619389) Resolves:
rhbz#1619389
---
httpd-2.4.34-r1827912+.patch | 61 ++++++++++++++++++++++++++++++++++++
httpd.spec | 5 ++-
2 files changed, 65 insertions(+), 1 deletion(-)
diff --git a/httpd-2.4.34-r1827912+.patch b/httpd-2.4.34-r1827912+.patch
index a4567a6..b4b2acc 100644
--- a/httpd-2.4.34-r1827912+.patch
+++ b/httpd-2.4.34-r1827912+.patch
@@ -9,6 +9,7 @@ http://svn.apache.org/viewvc?view=revision&revision=1828723
http://svn.apache.org/viewvc?view=revision&revision=1828790
http://svn.apache.org/viewvc?view=revision&revision=1828791
http://svn.apache.org/viewvc?view=revision&revision=1828792
+http://svn.apache.org/viewvc?view=revision&revision=1833588
--- httpd-2.4.34/modules/ssl/mod_ssl.c.r1827912+
+++ httpd-2.4.34/modules/ssl/mod_ssl.c
@@ -655,6 +656,66 @@ http://svn.apache.org/viewvc?view=revision&revision=1828792
/*
* Authentication Handler:
* Fake a Basic authentication from the X509 client certificate.
+@@ -2080,31 +2230,43 @@
+ {
+ conn_rec *c;
+ server_rec *s;
+- SSLConnRec *scr;
+
+ /* Retrieve the conn_rec and the associated SSLConnRec. */
+ if ((c = (conn_rec *)SSL_get_app_data((SSL *)ssl)) == NULL) {
+ return;
+ }
+
+- if ((scr = myConnConfig(c)) == NULL) {
+- return;
+- }
++ /* With TLS 1.3 this callback may be called multiple times on the first
++ * negotiation, so the below logic to detect renegotiations can't work.
++ * Fortunately renegotiations are forbidden starting with TLS 1.3, and
++ * this is enforced by OpenSSL so there's nothing to be done here.
++ */
++#if SSL_HAVE_PROTOCOL_TLSV1_3
++ if (SSL_version(ssl) < TLS1_3_VERSION)
++#endif
++ {
++ SSLConnRec *sslconn;
+
+- /* If the reneg state is to reject renegotiations, check the SSL
+- * state machine and move to ABORT if a Client Hello is being
+- * read. */
+- if (!scr->is_proxy &&
+- (where & SSL_CB_HANDSHAKE_START) &&
+- scr->reneg_state == RENEG_REJECT) {
+- scr->reneg_state = RENEG_ABORT;
++ if ((sslconn = myConnConfig(c)) == NULL) {
++ return;
++ }
++
++ /* If the reneg state is to reject renegotiations, check the SSL
++ * state machine and move to ABORT if a Client Hello is being
++ * read. */
++ if (!sslconn->is_proxy &&
++ (where & SSL_CB_HANDSHAKE_START) &&
++ sslconn->reneg_state == RENEG_REJECT) {
++ sslconn->reneg_state = RENEG_ABORT;
+ ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, c, APLOGNO(02042)
+ "rejecting client initiated renegotiation");
+- }
+- /* If the first handshake is complete, change state to reject any
+- * subsequent client-initiated renegotiation. */
+- else if ((where & SSL_CB_HANDSHAKE_DONE) && scr->reneg_state == RENEG_INIT) {
+- scr->reneg_state = RENEG_REJECT;
++ }
++ /* If the first handshake is complete, change state to reject any
++ * subsequent client-initiated renegotiation. */
++ else if ((where & SSL_CB_HANDSHAKE_DONE)
++ && sslconn->reneg_state == RENEG_INIT) {
++ sslconn->reneg_state = RENEG_REJECT;
++ }
+ }
+
+ s = mySrvFromConn(c);
--- httpd-2.4.34/modules/ssl/ssl_private.h.r1827912+
+++ httpd-2.4.34/modules/ssl/ssl_private.h
@@ -132,13 +132,14 @@
diff --git a/httpd.spec b/httpd.spec
index d87e1c6..697b97e 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -13,7 +13,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.34
-Release: 4%{?dist}
+Release: 5%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -729,6 +729,9 @@ exit $rv
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Tue Aug 21 2018 Joe Orton - 2.4.34-5
+- mod_ssl: further TLSv1.3 fix (#1619389)
+
* Mon Aug 13 2018 Joe Orton - 2.4.34-4
- mod_ssl: backport TLSv1.3 support changes from upstream (#1615059)
From 5bf30dc15619f53f8d281e3a35360d9c67bf9ea2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lubo=C5=A1=20Uhliarik?=
Date: Mon, 3 Sep 2018 11:29:22 +0200
Subject: [PATCH 132/359] mod_ssl: enable SSLv3 and change behavior of
"SSLProtocol All" configuration (#1624777)
Resolves: #1624777
---
httpd-2.4.34-enable-sslv3.patch | 60 +++++++++++++++++++++++++++++++++
httpd.spec | 8 ++++-
2 files changed, 67 insertions(+), 1 deletion(-)
create mode 100644 httpd-2.4.34-enable-sslv3.patch
diff --git a/httpd-2.4.34-enable-sslv3.patch b/httpd-2.4.34-enable-sslv3.patch
new file mode 100644
index 0000000..f559bf9
--- /dev/null
+++ b/httpd-2.4.34-enable-sslv3.patch
@@ -0,0 +1,60 @@
+diff --git a/modules/ssl/ssl_engine_config.c b/modules/ssl/ssl_engine_config.c
+index 517ce30..075f7e1 100644
+--- a/modules/ssl/ssl_engine_config.c
++++ b/modules/ssl/ssl_engine_config.c
+@@ -1474,6 +1474,8 @@ static const char *ssl_cmd_protocol_parse(cmd_parms *parms,
+ #endif
+ else if (strcEQ(w, "all")) {
+ thisopt = SSL_PROTOCOL_ALL;
++ // by default, ALL kw doesn't turn on SSLv3
++ thisopt &= ~SSL_PROTOCOL_SSLV3;
+ }
+ else {
+ return apr_pstrcat(parms->temp_pool,
+diff --git a/modules/ssl/ssl_engine_init.c b/modules/ssl/ssl_engine_init.c
+index 60df45f..f6645c2 100644
+--- a/modules/ssl/ssl_engine_init.c
++++ b/modules/ssl/ssl_engine_init.c
+@@ -537,6 +537,28 @@ static apr_status_t ssl_init_ctx_tls_extensions(server_rec *s,
+ }
+ #endif
+
++/*
++ * Enable/disable SSLProtocol. If the mod_ssl enables protocol
++ * which is disabled by default by OpenSSL, show a warning.
++ * "option" is for example SSL_OP_NO_SSLv3.
++ */
++static void ssl_set_ctx_protocol_option(server_rec *s,
++ SSL_CTX *ctx,
++ long option,
++ int enabled,
++ const char *name)
++{
++ if (!enabled) {
++ SSL_CTX_set_options(ctx, option);
++ }
++ else if (SSL_CTX_get_options(ctx) & option) {
++ SSL_CTX_clear_options(ctx, option);
++ ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(02904)
++ "Allowing SSLProtocol %s even though it is disabled "
++ "by OpenSSL by default on this system", name);
++ }
++}
++
+ static apr_status_t ssl_init_ctx_protocol(server_rec *s,
+ apr_pool_t *p,
+ apr_pool_t *ptemp,
+@@ -695,9 +719,13 @@ static apr_status_t ssl_init_ctx_protocol(server_rec *s,
+ }
+ if (prot == TLS1_1_VERSION && protocol & SSL_PROTOCOL_TLSV1) {
+ prot = TLS1_VERSION;
++ ssl_set_ctx_protocol_option(s, ctx, SSL_OP_NO_TLSv1,
++ protocol & SSL_PROTOCOL_TLSV1, "TLSv1");
+ }
+ #ifndef OPENSSL_NO_SSL3
+ if (prot == TLS1_VERSION && protocol & SSL_PROTOCOL_SSLV3) {
++ ssl_set_ctx_protocol_option(s, ctx, SSL_OP_NO_SSLv3,
++ protocol & SSL_PROTOCOL_SSLV3, "SSLv3");
+ prot = SSL3_VERSION;
+ }
+ #endif
diff --git a/httpd.spec b/httpd.spec
index 697b97e..5d98218 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -13,7 +13,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.34
-Release: 5%{?dist}
+Release: 6%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -81,6 +81,7 @@ Patch37: httpd-2.4.34-r1827912+.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1397243
Patch58: httpd-2.4.34-r1738878.patch
Patch59: httpd-2.4.34-r1555631.patch
+Patch60: httpd-2.4.34-enable-sslv3.patch
# Security fixes
@@ -241,6 +242,7 @@ interface for storing and accessing per-user session data.
%patch58 -p1 -b .r1738878
%patch59 -p1 -b .r1555631
+%patch60 -p1 -b .enablesslv3
# Patch in the vendor string
sed -i '/^#define PLATFORM/s/Unix/%{vstring}/' os/unix/os.h
@@ -729,6 +731,10 @@ exit $rv
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Tue Aug 28 2018 Luboš Uhliarik - 2.4.34-6
+- mod_ssl: enable SSLv3 and change behavior of "SSLProtocol All"
+ configuration (#1624777)
+
* Tue Aug 21 2018 Joe Orton - 2.4.34-5
- mod_ssl: further TLSv1.3 fix (#1619389)
From 369db50dd0f2e26d94699d80e69ae0e196fb585c Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Tue, 18 Sep 2018 13:57:48 +0100
Subject: [PATCH 133/359] mod_ssl: more TLSv1.3 fixes (#1619389) Resolves:
rhbz#1619389
---
httpd-2.4.33-sslciphdefault.patch | 33 ---
httpd-2.4.34-r1827912+.patch | 356 +++++++++++++++++-------------
httpd-2.4.34-sslciphdefault.patch | 34 +++
httpd.spec | 9 +-
4 files changed, 248 insertions(+), 184 deletions(-)
delete mode 100644 httpd-2.4.33-sslciphdefault.patch
create mode 100644 httpd-2.4.34-sslciphdefault.patch
diff --git a/httpd-2.4.33-sslciphdefault.patch b/httpd-2.4.33-sslciphdefault.patch
deleted file mode 100644
index f2919b8..0000000
--- a/httpd-2.4.33-sslciphdefault.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-
-https://bugzilla.redhat.com/show_bug.cgi?id=1109119
-
-Don't prepend !aNULL etc if PROFILE= is used with SSLCipherSuite.
-
---- httpd-2.4.33/modules/ssl/ssl_engine_config.c.sslciphdefault
-+++ httpd-2.4.33/modules/ssl/ssl_engine_config.c
-@@ -758,8 +758,10 @@
- SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
- SSLDirConfigRec *dc = (SSLDirConfigRec *)dcfg;
-
-- /* always disable null and export ciphers */
-- arg = apr_pstrcat(cmd->pool, arg, ":!aNULL:!eNULL:!EXP", NULL);
-+ /* Disable null and export ciphers by default, except for PROFILE=
-+ * configs where the parser doesn't cope. */
-+ if (strncmp(arg, "PROFILE=", 8) != 0)
-+ arg = apr_pstrcat(cmd->pool, arg, ":!aNULL:!eNULL:!EXP", NULL);
-
- if (cmd->path) {
- dc->szCipherSuite = arg;
-@@ -1502,8 +1504,10 @@
- {
- SSLDirConfigRec *dc = (SSLDirConfigRec *)dcfg;
-
-- /* always disable null and export ciphers */
-- arg = apr_pstrcat(cmd->pool, arg, ":!aNULL:!eNULL:!EXP", NULL);
-+ /* Disable null and export ciphers by default, except for PROFILE=
-+ * configs where the parser doesn't cope. */
-+ if (strncmp(arg, "PROFILE=", 8) != 0)
-+ arg = apr_pstrcat(cmd->pool, arg, ":!aNULL:!eNULL:!EXP", NULL);
-
- dc->proxy->auth.cipher_suite = arg;
-
diff --git a/httpd-2.4.34-r1827912+.patch b/httpd-2.4.34-r1827912+.patch
index b4b2acc..98c7ac8 100644
--- a/httpd-2.4.34-r1827912+.patch
+++ b/httpd-2.4.34-r1827912+.patch
@@ -1,15 +1,7 @@
-# ./pullrev.sh 1827912 1827924 1827992 1828220 1828222 1828720 1828723 1828790 1828791 1828792
-http://svn.apache.org/viewvc?view=revision&revision=1827912
-http://svn.apache.org/viewvc?view=revision&revision=1827924
-http://svn.apache.org/viewvc?view=revision&revision=1827992
-http://svn.apache.org/viewvc?view=revision&revision=1828220
-http://svn.apache.org/viewvc?view=revision&revision=1828222
-http://svn.apache.org/viewvc?view=revision&revision=1828720
-http://svn.apache.org/viewvc?view=revision&revision=1828723
-http://svn.apache.org/viewvc?view=revision&revision=1828790
-http://svn.apache.org/viewvc?view=revision&revision=1828791
-http://svn.apache.org/viewvc?view=revision&revision=1828792
-http://svn.apache.org/viewvc?view=revision&revision=1833588
+
+Pull all changes from upstream integration branch:
+
+svn diff -r1840105:1841219 https://svn.apache.org/repos/asf/httpd/httpd/branches/tlsv1.3-for-2.4.x
--- httpd-2.4.34/modules/ssl/mod_ssl.c.r1827912+
+++ httpd-2.4.34/modules/ssl/mod_ssl.c
@@ -65,7 +57,7 @@ http://svn.apache.org/viewvc?view=revision&revision=1833588
cfgMergeInt(ocsp_mask);
cfgMergeBool(ocsp_force_default);
-@@ -761,24 +763,39 @@
+@@ -761,22 +763,37 @@
const char *ssl_cmd_SSLCipherSuite(cmd_parms *cmd,
void *dcfg,
@@ -75,28 +67,21 @@ http://svn.apache.org/viewvc?view=revision&revision=1833588
SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
SSLDirConfigRec *dc = (SSLDirConfigRec *)dcfg;
-- /* Disable null and export ciphers by default, except for PROFILE=
-- * configs where the parser doesn't cope. */
-- if (strncmp(arg, "PROFILE=", 8) != 0)
-- arg = apr_pstrcat(cmd->pool, arg, ":!aNULL:!eNULL:!EXP", NULL);
+- /* always disable null and export ciphers */
+- arg = apr_pstrcat(cmd->pool, arg, ":!aNULL:!eNULL:!EXP", NULL);
-
- if (cmd->path) {
- dc->szCipherSuite = arg;
-- }
-- else {
-- sc->server->auth.cipher_suite = arg;
+ if (arg2 == NULL) {
+ arg2 = arg1;
+ arg1 = "SSL";
}
--
-- return NULL;
+- else {
+- sc->server->auth.cipher_suite = arg;
+
+ if (!strcmp("SSL", arg1)) {
-+ /* Disable null and export ciphers by default, except for PROFILE=
-+ * configs where the parser doesn't cope. */
-+ if (strncmp(arg2, "PROFILE=", 8) != 0)
-+ arg2 = apr_pstrcat(cmd->pool, arg2, ":!aNULL:!eNULL:!EXP", NULL);
++ /* always disable null and export ciphers */
++ arg2 = apr_pstrcat(cmd->pool, arg2, ":!aNULL:!eNULL:!EXP", NULL);
+ if (cmd->path) {
+ dc->szCipherSuite = arg2;
+ }
@@ -104,21 +89,23 @@ http://svn.apache.org/viewvc?view=revision&revision=1833588
+ sc->server->auth.cipher_suite = arg2;
+ }
+ return NULL;
-+ }
-+#ifdef SSL_OP_NO_TLSv1_3
+ }
+-
+- return NULL;
++#if SSL_HAVE_PROTOCOL_TLSV1_3
+ else if (!strcmp("TLSv1.3", arg1)) {
+ if (cmd->path) {
+ return "TLSv1.3 ciphers cannot be set inside a directory context";
+ }
+ sc->server->auth.tls13_ciphers = arg2;
+ return NULL;
-+ }
++ }
+#endif
+ return apr_pstrcat(cmd->pool, "procotol '", arg1, "' not supported", NULL);
}
#define SSL_FLAGS_CHECK_FILE \
-@@ -1451,6 +1468,9 @@
+@@ -1449,6 +1466,9 @@
else if (strcEQ(w, "TLSv1.2")) {
thisopt = SSL_PROTOCOL_TLSV1_2;
}
@@ -128,7 +115,7 @@ http://svn.apache.org/viewvc?view=revision&revision=1833588
#endif
else if (strcEQ(w, "all")) {
thisopt = SSL_PROTOCOL_ALL;
-@@ -1512,18 +1532,30 @@
+@@ -1510,16 +1530,28 @@
const char *ssl_cmd_SSLProxyCipherSuite(cmd_parms *cmd,
void *dcfg,
@@ -137,10 +124,8 @@ http://svn.apache.org/viewvc?view=revision&revision=1833588
{
SSLDirConfigRec *dc = (SSLDirConfigRec *)dcfg;
-
-- /* Disable null and export ciphers by default, except for PROFILE=
-- * configs where the parser doesn't cope. */
-- if (strncmp(arg, "PROFILE=", 8) != 0)
-- arg = apr_pstrcat(cmd->pool, arg, ":!aNULL:!eNULL:!EXP", NULL);
+- /* always disable null and export ciphers */
+- arg = apr_pstrcat(cmd->pool, arg, ":!aNULL:!eNULL:!EXP", NULL);
-
- dc->proxy->auth.cipher_suite = arg;
-
@@ -152,14 +137,12 @@ http://svn.apache.org/viewvc?view=revision&revision=1833588
+ }
+
+ if (!strcmp("SSL", arg1)) {
-+ /* Disable null and export ciphers by default, except for PROFILE=
-+ * configs where the parser doesn't cope. */
-+ if (strncmp(arg2, "PROFILE=", 8) != 0)
-+ arg2 = apr_pstrcat(cmd->pool, arg2, ":!aNULL:!eNULL:!EXP", NULL);
++ /* always disable null and export ciphers */
++ arg2 = apr_pstrcat(cmd->pool, arg2, ":!aNULL:!eNULL:!EXP", NULL);
+ dc->proxy->auth.cipher_suite = arg2;
+ return NULL;
+ }
-+#ifdef SSL_OP_NO_TLSv1_3
++#if SSL_HAVE_PROTOCOL_TLSV1_3
+ else if (!strcmp("TLSv1.3", arg1)) {
+ dc->proxy->auth.tls13_ciphers = arg2;
+ return NULL;
@@ -185,7 +168,7 @@ http://svn.apache.org/viewvc?view=revision&revision=1833588
TLSv1_2_client_method() : /* proxy */
TLSv1_2_server_method(); /* server */
}
-+#ifdef SSL_OP_NO_TLSv1_3
++#if SSL_HAVE_PROTOCOL_TLSV1_3
+ else if (protocol == SSL_PROTOCOL_TLSV1_3) {
+ method = mctx->pkp ?
+ TLSv1_3_client_method() : /* proxy */
@@ -205,31 +188,31 @@ http://svn.apache.org/viewvc?view=revision&revision=1833588
/* always disable SSLv2, as per RFC 6176 */
SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv2);
-@@ -640,9 +651,19 @@
+@@ -639,10 +650,19 @@
+ if (!(protocol & SSL_PROTOCOL_TLSV1_2)) {
SSL_CTX_set_options(ctx, SSL_OP_NO_TLSv1_2);
}
- #endif
-+#ifdef SSL_OP_NO_TLSv1_3
-+ if (!(protocol & SSL_PROTOCOL_TLSV1_3)) {
-+ SSL_CTX_set_options(ctx, SSL_OP_NO_TLSv1_3);
-+ }
++#if SSL_HAVE_PROTOCOL_TLSV1_3
++ ssl_set_ctx_protocol_option(s, ctx, SSL_OP_NO_TLSv1_3,
++ protocol & SSL_PROTOCOL_TLSV1_3, "TLSv1.3");
+#endif
+ #endif
#else /* #if OPENSSL_VERSION_NUMBER < 0x10100000L */
/* We first determine the maximum protocol version we should provide */
-+#ifdef SSL_OP_NO_TLSv1_3
++#if SSL_HAVE_PROTOCOL_TLSV1_3
+ if (SSL_HAVE_PROTOCOL_TLSV1_3 && (protocol & SSL_PROTOCOL_TLSV1_3)) {
+ prot = TLS1_3_VERSION;
-+ } else
++ } else
+#endif
if (protocol & SSL_PROTOCOL_TLSV1_2) {
prot = TLS1_2_VERSION;
} else if (protocol & SSL_PROTOCOL_TLSV1_1) {
-@@ -664,6 +685,11 @@
+@@ -664,6 +684,11 @@
/* Next we scan for the minimal protocol version we should provide,
* but we do not allow holes between max and min */
-+#ifdef SSL_OP_NO_TLSv1_3
++#if SSL_HAVE_PROTOCOL_TLSV1_3
+ if (prot == TLS1_3_VERSION && protocol & SSL_PROTOCOL_TLSV1_2) {
+ prot = TLS1_2_VERSION;
+ }
@@ -237,12 +220,26 @@ http://svn.apache.org/viewvc?view=revision&revision=1833588
if (prot == TLS1_2_VERSION && protocol & SSL_PROTOCOL_TLSV1_1) {
prot = TLS1_1_VERSION;
}
-@@ -888,7 +914,15 @@
+@@ -736,6 +761,13 @@
+ SSL_CTX_set_mode(ctx, SSL_MODE_RELEASE_BUFFERS);
+ #endif
+
++#if OPENSSL_VERSION_NUMBER >= 0x1010100fL
++ /* For OpenSSL >=1.1.1, disable auto-retry mode so it's possible
++ * to consume handshake records without blocking for app-data.
++ * https://github.com/openssl/openssl/issues/7178 */
++ SSL_CTX_clear_mode(ctx, SSL_MODE_AUTO_RETRY);
++#endif
++
+ return APR_SUCCESS;
+ }
+
+@@ -888,7 +920,15 @@
ssl_log_ssl_error(SSLLOG_MARK, APLOG_EMERG, s);
return ssl_die(s);
}
-
-+#ifdef SSL_OP_NO_TLSv1_3
++#if SSL_HAVE_PROTOCOL_TLSV1_3
+ if (mctx->auth.tls13_ciphers
+ && !SSL_CTX_set_ciphersuites(ctx, mctx->auth.tls13_ciphers)) {
+ ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO()
@@ -254,6 +251,20 @@ http://svn.apache.org/viewvc?view=revision&revision=1833588
return APR_SUCCESS;
}
+@@ -1493,6 +1533,13 @@
+ X509_STORE_CTX *sctx;
+ X509_STORE *store = SSL_CTX_get_cert_store(mctx->ssl_ctx);
+
++#if OPENSSL_VERSION_NUMBER >= 0x1010100fL
++ /* For OpenSSL >=1.1.1, turn on client cert support which is
++ * otherwise turned off by default (by design).
++ * https://github.com/openssl/openssl/issues/6933 */
++ SSL_CTX_set_post_handshake_auth(mctx->ssl_ctx, 1);
++#endif
++
+ SSL_CTX_set_client_cert_cb(mctx->ssl_ctx,
+ ssl_callback_proxy_cert);
+
--- httpd-2.4.34/modules/ssl/ssl_engine_kernel.c.r1827912+
+++ httpd-2.4.34/modules/ssl/ssl_engine_kernel.c
@@ -188,6 +188,12 @@
@@ -269,77 +280,38 @@ http://svn.apache.org/viewvc?view=revision&revision=1833588
return 1;
}
-@@ -424,21 +430,55 @@
+@@ -424,87 +430,70 @@
}
}
-+static int ssl_check_post_client_verify(request_rec *r, SSLSrvConfigRec *sc,
-+ SSLDirConfigRec *dc, SSL *ssl)
-+{
-+ /*
-+ * Finally check for acceptable renegotiation results
-+ */
-+ if ((dc->nVerifyClient != SSL_CVERIFY_NONE) ||
-+ (sc->server->auth.verify_mode != SSL_CVERIFY_NONE)) {
-+ BOOL do_verify = ((dc->nVerifyClient == SSL_CVERIFY_REQUIRE) ||
-+ (sc->server->auth.verify_mode == SSL_CVERIFY_REQUIRE));
-+
-+ if (do_verify && (SSL_get_verify_result(ssl) != X509_V_OK)) {
-+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02262)
-+ "Re-negotiation handshake failed: "
-+ "Client verification failed");
-+
-+ return HTTP_FORBIDDEN;
-+ }
-+
-+ if (do_verify) {
-+ X509 *peercert;
-+
-+ if ((peercert = SSL_get_peer_certificate(ssl)) == NULL) {
-+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02263)
-+ "Re-negotiation handshake failed: "
-+ "Client certificate missing");
-+
-+ return HTTP_FORBIDDEN;
-+ }
-+
-+ X509_free(peercert);
-+ }
-+ }
-+ return OK;
-+}
-+
- /*
+-/*
- * Access Handler
-+ * Access Handler, classic flavour, for SSL/TLS up to v1.2
-+ * where everything can be renegotiated and no one is happy.
- */
+- */
-int ssl_hook_Access(request_rec *r)
-+static int ssl_hook_Access_classic(request_rec *r, SSLSrvConfigRec *sc, SSLDirConfigRec *dc,
-+ SSLConnRec *sslconn, SSL *ssl)
++static int ssl_check_post_client_verify(request_rec *r, SSLSrvConfigRec *sc,
++ SSLDirConfigRec *dc, SSLConnRec *sslconn,
++ SSL *ssl)
{
- SSLDirConfigRec *dc = myDirConfig(r);
- SSLSrvConfigRec *sc = mySrvConfig(r->server);
- SSLConnRec *sslconn = myConnConfig(r->connection);
- SSL *ssl = sslconn ? sslconn->ssl : NULL;
- server_rec *handshakeserver = sslconn ? sslconn->server : NULL;
- SSLSrvConfigRec *hssc = handshakeserver? mySrvConfig(handshakeserver) : NULL;
- SSL_CTX *ctx = NULL;
- apr_array_header_t *requires;
- ssl_require_t *ssl_requires;
+- server_rec *handshakeserver = sslconn ? sslconn->server : NULL;
+- SSLSrvConfigRec *hssc = handshakeserver? mySrvConfig(handshakeserver) : NULL;
+- SSL_CTX *ctx = NULL;
+- apr_array_header_t *requires;
+- ssl_require_t *ssl_requires;
- int ok, i;
-+ int ok, i, rc;
- BOOL renegotiate = FALSE, renegotiate_quick = FALSE;
+- BOOL renegotiate = FALSE, renegotiate_quick = FALSE;
X509 *cert;
- X509 *peercert;
-@@ -446,66 +486,9 @@
- X509_STORE_CTX *cert_store_ctx;
- STACK_OF(SSL_CIPHER) *cipher_list_old = NULL, *cipher_list = NULL;
- const SSL_CIPHER *cipher = NULL;
+- X509 *peercert;
+- X509_STORE *cert_store = NULL;
+- X509_STORE_CTX *cert_store_ctx;
+- STACK_OF(SSL_CIPHER) *cipher_list_old = NULL, *cipher_list = NULL;
+- const SSL_CIPHER *cipher = NULL;
- int depth, verify_old, verify, n, is_slave = 0;
-+ int depth, verify_old, verify, n;
- const char *ncipher_suite;
-
+- const char *ncipher_suite;
+-
- /* On a slave connection, we do not expect to have an SSLConnRec, but
- * our master connection might have one. */
- if (!(sslconn && ssl) && r->connection->master) {
@@ -349,7 +321,7 @@ http://svn.apache.org/viewvc?view=revision&revision=1833588
- hssc = handshakeserver? mySrvConfig(handshakeserver) : NULL;
- is_slave = 1;
- }
--
+
- if (ssl) {
- /*
- * We should have handshaken here (on handshakeserver),
@@ -360,13 +332,23 @@ http://svn.apache.org/viewvc?view=revision&revision=1833588
- */
- if (!SSL_is_init_finished(ssl)) {
- return HTTP_FORBIDDEN;
-- }
++ /*
++ * Remember the peer certificate's DN
++ */
++ if ((cert = SSL_get_peer_certificate(ssl))) {
++ if (sslconn->client_cert) {
++ X509_free(sslconn->client_cert);
+ }
- ctx = SSL_get_SSL_CTX(ssl);
-- }
++ sslconn->client_cert = cert;
++ sslconn->client_dn = NULL;
+ }
-
-- /*
++
+ /*
- * Support for SSLRequireSSL directive
-- */
++ * Finally check for acceptable renegotiation results
+ */
- if (dc->bSSLRequired && !ssl) {
- if ((sc->enabled == SSL_ENABLED_OPTIONAL) && !is_slave) {
- /* This vhost was configured for optional SSL, just tell the
@@ -374,20 +356,40 @@ http://svn.apache.org/viewvc?view=revision&revision=1833588
- */
- apr_table_setn(r->err_headers_out, "Upgrade", "TLS/1.0, HTTP/1.1");
- apr_table_setn(r->err_headers_out, "Connection", "Upgrade");
--
++ if ((dc->nVerifyClient != SSL_CVERIFY_NONE) ||
++ (sc->server->auth.verify_mode != SSL_CVERIFY_NONE)) {
++ BOOL do_verify = ((dc->nVerifyClient == SSL_CVERIFY_REQUIRE) ||
++ (sc->server->auth.verify_mode == SSL_CVERIFY_REQUIRE));
++
++ if (do_verify && (SSL_get_verify_result(ssl) != X509_V_OK)) {
++ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02262)
++ "Re-negotiation handshake failed: "
++ "Client verification failed");
+
- return HTTP_UPGRADE_REQUIRED;
-- }
--
++ return HTTP_FORBIDDEN;
+ }
+
- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02219)
- "access to %s failed, reason: %s",
- r->filename, "SSL connection required");
-
- /* remember forbidden access for strict require option */
- apr_table_setn(r->notes, "ssl-access-forbidden", "1");
--
++ if (do_verify) {
++ if (cert == NULL) {
++ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02263)
++ "Re-negotiation handshake failed: "
++ "Client certificate missing");
+
- return HTTP_FORBIDDEN;
-- }
--
++ return HTTP_FORBIDDEN;
++ }
++ }
+ }
++ return OK;
++}
+
- /*
- * Check to see whether SSL is in use; if it's not, then no
- * further access control checks are relevant. (the test for
@@ -396,11 +398,28 @@ http://svn.apache.org/viewvc?view=revision&revision=1833588
- if (sc->enabled == SSL_ENABLED_FALSE || !ssl) {
- return DECLINED;
- }
--
++/*
++ * Access Handler, classic flavour, for SSL/TLS up to v1.2
++ * where everything can be renegotiated and no one is happy.
++ */
++static int ssl_hook_Access_classic(request_rec *r, SSLSrvConfigRec *sc, SSLDirConfigRec *dc,
++ SSLConnRec *sslconn, SSL *ssl)
++{
++ server_rec *handshakeserver = sslconn ? sslconn->server : NULL;
++ SSLSrvConfigRec *hssc = handshakeserver? mySrvConfig(handshakeserver) : NULL;
++ SSL_CTX *ctx = NULL;
++ BOOL renegotiate = FALSE, renegotiate_quick = FALSE;
++ X509 *peercert;
++ X509_STORE *cert_store = NULL;
++ X509_STORE_CTX *cert_store_ctx;
++ STACK_OF(SSL_CIPHER) *cipher_list_old = NULL, *cipher_list = NULL;
++ const SSL_CIPHER *cipher = NULL;
++ int depth, verify_old, verify, n, rc;
++ const char *ncipher_suite;
+
#ifdef HAVE_SRP
/*
- * Support for per-directory reconfigured SSL connection parameters
-@@ -581,7 +564,7 @@
+@@ -581,7 +570,7 @@
}
/* configure new state */
@@ -409,7 +428,7 @@ http://svn.apache.org/viewvc?view=revision&revision=1833588
/* TODO: this categorically fails changed cipher suite settings
* on slave connections. We could do better by
* - create a new SSL* from our SSL_CTX and set cipher suite there,
-@@ -659,7 +642,7 @@
+@@ -659,7 +648,7 @@
}
if (renegotiate) {
@@ -418,7 +437,7 @@ http://svn.apache.org/viewvc?view=revision&revision=1833588
/* The request causes renegotiation on a slave connection.
* This is not allowed since we might have concurrent requests
* on this connection.
-@@ -732,7 +715,7 @@
+@@ -732,7 +721,7 @@
(verify & SSL_VERIFY_FAIL_IF_NO_PEER_CERT)))
{
renegotiate = TRUE;
@@ -427,8 +446,29 @@ http://svn.apache.org/viewvc?view=revision&revision=1833588
/* The request causes renegotiation on a slave connection.
* This is not allowed since we might have concurrent requests
* on this connection.
-@@ -1050,30 +1033,8 @@
+@@ -885,6 +874,7 @@
+
+ if (renegotiate_quick) {
+ STACK_OF(X509) *cert_stack;
++ X509 *cert;
+
+ /* perform just a manual re-verification of the peer */
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02258)
+@@ -1037,43 +1027,10 @@
+ }
+
/*
+- * Remember the peer certificate's DN
+- */
+- if ((cert = SSL_get_peer_certificate(ssl))) {
+- if (sslconn->client_cert) {
+- X509_free(sslconn->client_cert);
+- }
+- sslconn->client_cert = cert;
+- sslconn->client_dn = NULL;
+- }
+-
+- /*
* Finally check for acceptable renegotiation results
*/
- if ((dc->nVerifyClient != SSL_CVERIFY_NONE) ||
@@ -455,16 +495,19 @@ http://svn.apache.org/viewvc?view=revision&revision=1833588
-
- X509_free(peercert);
- }
-+ if (OK != (rc = ssl_check_post_client_verify(r, sc, dc, ssl))) {
++ if (OK != (rc = ssl_check_post_client_verify(r, sc, dc, sslconn, ssl))) {
+ return rc;
}
/*
-@@ -1167,6 +1128,195 @@
- return DECLINED;
- }
+@@ -1096,6 +1053,215 @@
+ }
+ }
-+#ifdef SSL_OP_NO_TLSv1_3
++ return DECLINED;
++}
++
++#if SSL_HAVE_PROTOCOL_TLSV1_3
+/*
+ * Access Handler, modern flavour, for SSL/TLS v1.3 and onward.
+ * Only client certificates can be requested, everything else stays.
@@ -557,8 +600,16 @@ http://svn.apache.org/viewvc?view=revision&revision=1833588
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO() "verify client post handshake");
+
+ SSL_set_verify(ssl, vmode_needed, ssl_callback_SSLVerify);
-+ SSL_verify_client_post_handshake(ssl);
+
++ if (SSL_verify_client_post_handshake(ssl) != 1) {
++ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(10158)
++ "cannot perform post-handshake authentication");
++ ssl_log_ssl_error(SSLLOG_MARK, APLOG_ERR, r->server);
++ apr_table_setn(r->notes, "error-notes",
++ "Reason: Cannot perform Post-Handshake Authentication. ");
++ return HTTP_FORBIDDEN;
++ }
++
+ old_state = sslconn->reneg_state;
+ sslconn->reneg_state = RENEG_ALLOW;
+ modssl_set_app_data2(ssl, r);
@@ -576,7 +627,7 @@ http://svn.apache.org/viewvc?view=revision&revision=1833588
+ /*
+ * Finally check for acceptable renegotiation results
+ */
-+ if (OK != (rc = ssl_check_post_client_verify(r, sc, dc, ssl))) {
++ if (OK != (rc = ssl_check_post_client_verify(r, sc, dc, sslconn, ssl))) {
+ return rc;
+ }
+ }
@@ -592,6 +643,9 @@ http://svn.apache.org/viewvc?view=revision&revision=1833588
+ SSLSrvConfigRec *sc = mySrvConfig(r->server);
+ SSLConnRec *sslconn = myConnConfig(r->connection);
+ SSL *ssl = sslconn ? sslconn->ssl : NULL;
++ apr_array_header_t *requires;
++ ssl_require_t *ssl_requires;
++ int ok, i, ret;
+
+ /* On a slave connection, we do not expect to have an SSLConnRec, but
+ * our master connection might have one. */
@@ -643,20 +697,26 @@ http://svn.apache.org/viewvc?view=revision&revision=1833588
+ return DECLINED;
+ }
+
-+#ifdef SSL_OP_NO_TLSv1_3
++#if SSL_HAVE_PROTOCOL_TLSV1_3
+ /* TLSv1.3+ is less complicated here. Branch off into a new codeline
+ * and avoid messing with the past. */
+ if (SSL_version(ssl) >= TLS1_3_VERSION) {
-+ return ssl_hook_Access_modern(r, sc, dc, sslconn, ssl);
-+ }
++ ret = ssl_hook_Access_modern(r, sc, dc, sslconn, ssl);
++ }
++ else
+#endif
-+ return ssl_hook_Access_classic(r, sc, dc, sslconn, ssl);
-+}
++ {
++ ret = ssl_hook_Access_classic(r, sc, dc, sslconn, ssl);
++ }
+
- /*
- * Authentication Handler:
- * Fake a Basic authentication from the X509 client certificate.
-@@ -2080,31 +2230,43 @@
++ if (ret != DECLINED) {
++ return ret;
++ }
++
+ /* If we're trying to have the user name set from a client
+ * certificate then we need to set it here. This should be safe as
+ * the user name probably isn't important from an auth checking point
+@@ -2080,31 +2246,43 @@
{
conn_rec *c;
server_rec *s;
@@ -680,6 +740,10 @@ http://svn.apache.org/viewvc?view=revision&revision=1833588
+#endif
+ {
+ SSLConnRec *sslconn;
++
++ if ((sslconn = myConnConfig(c)) == NULL) {
++ return;
++ }
- /* If the reneg state is to reject renegotiations, check the SSL
- * state machine and move to ABORT if a Client Hello is being
@@ -688,10 +752,6 @@ http://svn.apache.org/viewvc?view=revision&revision=1833588
- (where & SSL_CB_HANDSHAKE_START) &&
- scr->reneg_state == RENEG_REJECT) {
- scr->reneg_state = RENEG_ABORT;
-+ if ((sslconn = myConnConfig(c)) == NULL) {
-+ return;
-+ }
-+
+ /* If the reneg state is to reject renegotiations, check the SSL
+ * state machine and move to ABORT if a Client Hello is being
+ * read. */
diff --git a/httpd-2.4.34-sslciphdefault.patch b/httpd-2.4.34-sslciphdefault.patch
new file mode 100644
index 0000000..6060f24
--- /dev/null
+++ b/httpd-2.4.34-sslciphdefault.patch
@@ -0,0 +1,34 @@
+
+https://bugzilla.redhat.com/show_bug.cgi?id=1109119
+
+Don't prepend !aNULL etc if PROFILE= is used with SSLCipherSuite.
+
+--- httpd-2.4.34/modules/ssl/ssl_engine_config.c.sslciphdefault
++++ httpd-2.4.34/modules/ssl/ssl_engine_config.c
+@@ -774,9 +774,11 @@
+ }
+
+ if (!strcmp("SSL", arg1)) {
+- /* always disable null and export ciphers */
+- arg2 = apr_pstrcat(cmd->pool, arg2, ":!aNULL:!eNULL:!EXP", NULL);
+ if (cmd->path) {
++ /* Disable null and export ciphers by default, except for PROFILE=
++ * configs where the parser doesn't cope. */
++ if (strncmp(arg2, "PROFILE=", 8) != 0)
++ arg2 = apr_pstrcat(cmd->pool, arg2, ":!aNULL:!eNULL:!EXP", NULL);
+ dc->szCipherSuite = arg2;
+ }
+ else {
+@@ -1540,8 +1542,10 @@
+ }
+
+ if (!strcmp("SSL", arg1)) {
+- /* always disable null and export ciphers */
+- arg2 = apr_pstrcat(cmd->pool, arg2, ":!aNULL:!eNULL:!EXP", NULL);
++ /* Disable null and export ciphers by default, except for PROFILE=
++ * configs where the parser doesn't cope. */
++ if (strncmp(arg2, "PROFILE=", 8) != 0)
++ arg2 = apr_pstrcat(cmd->pool, arg2, ":!aNULL:!eNULL:!EXP", NULL);
+ dc->proxy->auth.cipher_suite = arg2;
+ return NULL;
+ }
diff --git a/httpd.spec b/httpd.spec
index 697b97e..6640f65 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -13,7 +13,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.34
-Release: 5%{?dist}
+Release: 6%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -73,9 +73,9 @@ Patch29: httpd-2.4.33-systemd.patch
Patch30: httpd-2.4.4-cachehardmax.patch
Patch31: httpd-2.4.33-sslmultiproxy.patch
Patch34: httpd-2.4.17-socket-activation.patch
-Patch35: httpd-2.4.33-sslciphdefault.patch
Patch36: httpd-2.4.33-r1830819+.patch
Patch37: httpd-2.4.34-r1827912+.patch
+Patch38: httpd-2.4.34-sslciphdefault.patch
# Bug fixes
# https://bugzilla.redhat.com/show_bug.cgi?id=1397243
@@ -235,9 +235,9 @@ interface for storing and accessing per-user session data.
%patch30 -p1 -b .cachehardmax
#patch31 -p1 -b .sslmultiproxy
%patch34 -p1 -b .socketactivation
-%patch35 -p1 -b .sslciphdefault
%patch36 -p1 -b .r1830819+
%patch37 -p1 -b .r1827912+
+%patch38 -p1 -b .sslciphdefault
%patch58 -p1 -b .r1738878
%patch59 -p1 -b .r1555631
@@ -729,6 +729,9 @@ exit $rv
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Tue Sep 18 2018 Joe Orton - 2.4.34-6
+- mod_ssl: more TLSv1.3 fixes (#1619389)
+
* Tue Aug 21 2018 Joe Orton - 2.4.34-5
- mod_ssl: further TLSv1.3 fix (#1619389)
From 86433978a1e5820ebe5ece19a64cebf77053910b Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Fri, 21 Sep 2018 13:07:38 +0100
Subject: [PATCH 134/359] mod_ssl: follow OpenSSL protocol defaults if
SSLProtocol is not configured (Rob Crittenden, #1618371) Resolves:
rhbz#1618371
---
httpd-2.4.34-sslprotdefault.patch | 53 +++++++++++++++++++++++++++++++
httpd.spec | 8 ++++-
2 files changed, 60 insertions(+), 1 deletion(-)
create mode 100644 httpd-2.4.34-sslprotdefault.patch
diff --git a/httpd-2.4.34-sslprotdefault.patch b/httpd-2.4.34-sslprotdefault.patch
new file mode 100644
index 0000000..65f8d40
--- /dev/null
+++ b/httpd-2.4.34-sslprotdefault.patch
@@ -0,0 +1,53 @@
+
+https://bugzilla.redhat.com/show_bug.cgi?id=1618371
+
+--- httpd-2.4.34/modules/ssl/ssl_engine_config.c.sslprotdefault
++++ httpd-2.4.34/modules/ssl/ssl_engine_config.c
+@@ -119,7 +119,7 @@
+ mctx->ticket_key = NULL;
+ #endif
+
+- mctx->protocol = SSL_PROTOCOL_DEFAULT;
++ mctx->protocol = SSL_PROTOCOL_NONE;
+ mctx->protocol_set = 0;
+
+ mctx->pphrase_dialog_type = SSL_PPTYPE_UNSET;
+--- httpd-2.4.34/modules/ssl/ssl_engine_init.c.sslprotdefault
++++ httpd-2.4.34/modules/ssl/ssl_engine_init.c
+@@ -555,9 +555,8 @@
+ * Create the new per-server SSL context
+ */
+ if (protocol == SSL_PROTOCOL_NONE) {
+- ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(02231)
+- "No SSL protocols available [hint: SSLProtocol]");
+- return ssl_die(s);
++ ap_log_error(APLOG_MARK, APLOG_TRACE3, 0, s,
++ "Using OpenSSL/system default SSL/TLS protocols");
+ }
+
+ cp = apr_pstrcat(p,
+@@ -673,14 +672,8 @@
+ } else if (protocol & SSL_PROTOCOL_SSLV3) {
+ prot = SSL3_VERSION;
+ #endif
+- } else {
+- SSL_CTX_free(ctx);
+- mctx->ssl_ctx = NULL;
+- ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(03378)
+- "No SSL protocols available [hint: SSLProtocol]");
+- return ssl_die(s);
+ }
+- SSL_CTX_set_max_proto_version(ctx, prot);
++ if (protocol != SSL_PROTOCOL_NONE) SSL_CTX_set_max_proto_version(ctx, prot);
+
+ /* Next we scan for the minimal protocol version we should provide,
+ * but we do not allow holes between max and min */
+@@ -700,7 +693,7 @@
+ prot = SSL3_VERSION;
+ }
+ #endif
+- SSL_CTX_set_min_proto_version(ctx, prot);
++ if (protocol != SSL_PROTOCOL_NONE) SSL_CTX_set_min_proto_version(ctx, prot);
+ #endif /* if OPENSSL_VERSION_NUMBER < 0x10100000L */
+
+ #ifdef SSL_OP_CIPHER_SERVER_PREFERENCE
diff --git a/httpd.spec b/httpd.spec
index 6640f65..7b97a69 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -13,7 +13,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.34
-Release: 6%{?dist}
+Release: 7%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -76,6 +76,7 @@ Patch34: httpd-2.4.17-socket-activation.patch
Patch36: httpd-2.4.33-r1830819+.patch
Patch37: httpd-2.4.34-r1827912+.patch
Patch38: httpd-2.4.34-sslciphdefault.patch
+Patch39: httpd-2.4.34-sslprotdefault.patch
# Bug fixes
# https://bugzilla.redhat.com/show_bug.cgi?id=1397243
@@ -238,6 +239,7 @@ interface for storing and accessing per-user session data.
%patch36 -p1 -b .r1830819+
%patch37 -p1 -b .r1827912+
%patch38 -p1 -b .sslciphdefault
+%patch39 -p1 -b .sslprotdefault
%patch58 -p1 -b .r1738878
%patch59 -p1 -b .r1555631
@@ -729,6 +731,10 @@ exit $rv
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Fri Sep 21 2018 Joe Orton - 2.4.34-7
+- mod_ssl: follow OpenSSL protocol defaults if SSLProtocol
+ is not configured (Rob Crittenden, #1618371)
+
* Tue Sep 18 2018 Joe Orton - 2.4.34-6
- mod_ssl: more TLSv1.3 fixes (#1619389)
From e6f56309054391f226d45bafc1b9b5b1dc87cf2e Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Fri, 21 Sep 2018 15:22:11 +0100
Subject: [PATCH 135/359] comment-out SSLProtocol, SSLProxyProtocol from
ssl.conf in default configuration; now follow OpenSSL system default
(#1468322) Resolves: rhbz#1468322
---
httpd.spec | 6 +++++-
ssl.conf | 17 ++++++++---------
2 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/httpd.spec b/httpd.spec
index 9ddb745..6ee6bea 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -13,7 +13,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.34
-Release: 7%{?dist}
+Release: 8%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -733,6 +733,10 @@ exit $rv
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Fri Sep 21 2018 Joe Orton - 2.4.34-8
+- comment-out SSLProtocol, SSLProxyProtocol from ssl.conf in
+ default configuration; now follow OpenSSL system default (#1468322)
+
* Fri Sep 21 2018 Joe Orton - 2.4.34-7
- mod_ssl: follow OpenSSL protocol defaults if SSLProtocol
is not configured (Rob Crittenden, #1618371)
diff --git a/ssl.conf b/ssl.conf
index a07bd8f..373b9e5 100644
--- a/ssl.conf
+++ b/ssl.conf
@@ -70,11 +70,10 @@ LogLevel warn
SSLEngine on
# List the protocol versions which clients are allowed to connect with.
-# Disable SSLv3 by default (cf. RFC 7525 3.1.1). TLSv1 (1.0) should be
-# disabled as quickly as practical. By the end of 2016, only the TLSv1.2
-# protocol or later should remain in use.
-SSLProtocol all -SSLv3
-SSLProxyProtocol all -SSLv3
+# The OpenSSL system profile is configured by default. See
+# update-crypto-policies(8) for more details.
+#SSLProtocol all -SSLv3
+#SSLProxyProtocol all -SSLv3
# User agents such as web browsers are not configured for the user's
# own preference of either security or performance, therefore this
@@ -83,10 +82,10 @@ SSLProxyProtocol all -SSLv3
SSLHonorCipherOrder on
# SSL Cipher Suite:
-# List the ciphers that the client is permitted to negotiate.
-# See the mod_ssl documentation for a complete list.
-# The OpenSSL system profile is configured by default. See
-# update-crypto-policies(8) for more details.
+# List the ciphers that the client is permitted to negotiate.
+# See the mod_ssl documentation for a complete list.
+# The OpenSSL system profile is configured by default. See
+# update-crypto-policies(8) for more details.
SSLCipherSuite PROFILE=SYSTEM
SSLProxyCipherSuite PROFILE=SYSTEM
From 1f748ace31801b5aad9f970bd913474f4b059c58 Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Tue, 25 Sep 2018 09:43:59 +0100
Subject: [PATCH 136/359] fix build if OpenSSL built w/o SSLv3 support
---
httpd-2.4.34-enable-sslv3.patch | 25 +++++++++++++------------
httpd.spec | 7 +++++--
2 files changed, 18 insertions(+), 14 deletions(-)
diff --git a/httpd-2.4.34-enable-sslv3.patch b/httpd-2.4.34-enable-sslv3.patch
index f559bf9..a2eba80 100644
--- a/httpd-2.4.34-enable-sslv3.patch
+++ b/httpd-2.4.34-enable-sslv3.patch
@@ -1,21 +1,22 @@
-diff --git a/modules/ssl/ssl_engine_config.c b/modules/ssl/ssl_engine_config.c
-index 517ce30..075f7e1 100644
---- a/modules/ssl/ssl_engine_config.c
-+++ b/modules/ssl/ssl_engine_config.c
-@@ -1474,6 +1474,8 @@ static const char *ssl_cmd_protocol_parse(cmd_parms *parms,
+
+https://bugzilla.redhat.com/show_bug.cgi?id=1623165
+
+--- httpd-2.4.34/modules/ssl/ssl_engine_config.c.enable-sslv3
++++ httpd-2.4.34/modules/ssl/ssl_engine_config.c
+@@ -1474,6 +1474,10 @@
#endif
else if (strcEQ(w, "all")) {
thisopt = SSL_PROTOCOL_ALL;
-+ // by default, ALL kw doesn't turn on SSLv3
++#ifndef OPENSSL_NO_SSL3
++ /* by default, ALL kw doesn't turn on SSLv3 */
+ thisopt &= ~SSL_PROTOCOL_SSLV3;
++#endif
}
else {
return apr_pstrcat(parms->temp_pool,
-diff --git a/modules/ssl/ssl_engine_init.c b/modules/ssl/ssl_engine_init.c
-index 60df45f..f6645c2 100644
---- a/modules/ssl/ssl_engine_init.c
-+++ b/modules/ssl/ssl_engine_init.c
-@@ -537,6 +537,28 @@ static apr_status_t ssl_init_ctx_tls_extensions(server_rec *s,
+--- httpd-2.4.34/modules/ssl/ssl_engine_init.c.enable-sslv3
++++ httpd-2.4.34/modules/ssl/ssl_engine_init.c
+@@ -537,6 +537,28 @@
}
#endif
@@ -44,7 +45,7 @@ index 60df45f..f6645c2 100644
static apr_status_t ssl_init_ctx_protocol(server_rec *s,
apr_pool_t *p,
apr_pool_t *ptemp,
-@@ -695,9 +719,13 @@ static apr_status_t ssl_init_ctx_protocol(server_rec *s,
+@@ -687,9 +709,13 @@
}
if (prot == TLS1_1_VERSION && protocol & SSL_PROTOCOL_TLSV1) {
prot = TLS1_VERSION;
diff --git a/httpd.spec b/httpd.spec
index 6ee6bea..5d42dca 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -13,7 +13,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.34
-Release: 8%{?dist}
+Release: 9%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -244,7 +244,7 @@ interface for storing and accessing per-user session data.
%patch58 -p1 -b .r1738878
%patch59 -p1 -b .r1555631
-%patch60 -p1 -b .enablesslv3
+%patch60 -p1 -b .enable-sslv3
# Patch in the vendor string
sed -i '/^#define PLATFORM/s/Unix/%{vstring}/' os/unix/os.h
@@ -733,6 +733,9 @@ exit $rv
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Tue Sep 25 2018 Joe Orton - 2.4.34-9
+- fix build if OpenSSL built w/o SSLv3 support
+
* Fri Sep 21 2018 Joe Orton - 2.4.34-8
- comment-out SSLProtocol, SSLProxyProtocol from ssl.conf in
default configuration; now follow OpenSSL system default (#1468322)
From f201a4ebc1cf1111d8a761dc9c0ba6662bd463fb Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Fri, 28 Sep 2018 08:51:19 +0100
Subject: [PATCH 137/359] apachectl: don't read /etc/sysconfig/httpd
---
...d.patch => httpd-2.4.34-apctlsystemd.patch | 24 ++++++++++++++-----
httpd.spec | 7 ++++--
2 files changed, 23 insertions(+), 8 deletions(-)
rename httpd-2.4.3-apctl-systemd.patch => httpd-2.4.34-apctlsystemd.patch (63%)
diff --git a/httpd-2.4.3-apctl-systemd.patch b/httpd-2.4.34-apctlsystemd.patch
similarity index 63%
rename from httpd-2.4.3-apctl-systemd.patch
rename to httpd-2.4.34-apctlsystemd.patch
index c6bf5da..996978c 100644
--- a/httpd-2.4.3-apctl-systemd.patch
+++ b/httpd-2.4.34-apctlsystemd.patch
@@ -5,17 +5,29 @@ Note: "apachectl graceful" is documented to start httpd if not running.
Upstream-Status: vendor specific patch
---- httpd-2.4.18/support/apachectl.in.apctlsystemd
-+++ httpd-2.4.18/support/apachectl.in
-@@ -100,9 +100,28 @@ fi
+--- httpd-2.4.34/support/apachectl.in.apctlsystemd
++++ httpd-2.4.34/support/apachectl.in
+@@ -58,11 +58,6 @@
+ # have one, then status and fullstatus will not work.
+ STATUSURL="http://localhost:@PORT@/server-status"
+
+-# Source /etc/sysconfig/httpd for $HTTPD setting, etc.
+-if [ -r /etc/sysconfig/httpd ]; then
+- . /etc/sysconfig/httpd
+-fi
+-
+ #
+ # Set this variable to a command that increases the maximum
+ # number of file descriptors allowed per child process. This is
+@@ -100,9 +95,28 @@
ERROR=$?
}
+if [ "x$2" != "x" ] ; then
+ echo Passing arguments to httpd using apachectl is no longer supported.
+ echo You can only start/stop/restart httpd using this script.
-+ echo If you want to pass extra arguments to httpd, edit the
-+ echo /etc/sysconfig/httpd config file.
++ echo To pass extra arguments to httpd, see the httpd.service(8)
++ echo man page.
+fi
+
case $ACMD in
@@ -38,7 +50,7 @@ Upstream-Status: vendor specific patch
ERROR=$?
;;
startssl|sslstart|start-SSL)
-@@ -114,10 +133,6 @@ startssl|sslstart|start-SSL)
+@@ -114,10 +128,6 @@
configtest)
testconfig
;;
diff --git a/httpd.spec b/httpd.spec
index 5d42dca..8938613 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -13,7 +13,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.34
-Release: 9%{?dist}
+Release: 10%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -59,7 +59,7 @@ Patch1: httpd-2.4.1-apctl.patch
Patch2: httpd-2.4.9-apxs.patch
Patch3: httpd-2.4.1-deplibs.patch
Patch4: httpd-2.4.34-layfix.patch
-Patch6: httpd-2.4.3-apctl-systemd.patch
+Patch6: httpd-2.4.34-apctlsystemd.patch
# Needed for socket activation and mod_systemd patch
Patch19: httpd-2.4.25-detect-systemd.patch
# Features/functional changes
@@ -733,6 +733,9 @@ exit $rv
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Fri Sep 28 2018 Joe Orton - 2.4.34-10
+- apachectl: don't read /etc/sysconfig/httpd
+
* Tue Sep 25 2018 Joe Orton - 2.4.34-9
- fix build if OpenSSL built w/o SSLv3 support
From c72daf66bd5b17af39b0707234d0650118b52815 Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Wed, 31 Oct 2018 10:01:24 +0000
Subject: [PATCH 138/359] add htcacheclean.service(8) man page
---
.gitignore | 1 +
htcacheclean.service | 3 +-
htcacheclean.service.xml | 123 +++++++++++++++++++++++++++++++++++++++
httpd.spec | 9 ++-
4 files changed, 133 insertions(+), 3 deletions(-)
create mode 100644 htcacheclean.service.xml
diff --git a/.gitignore b/.gitignore
index 4f0a93f..00acede 100644
--- a/.gitignore
+++ b/.gitignore
@@ -31,3 +31,4 @@ x86_64
/httpd-*.tar.bz2
/httpd*.8
/results_httpd
+/htcacheclean.service.8
diff --git a/htcacheclean.service b/htcacheclean.service
index 166067b..d1e9d60 100644
--- a/htcacheclean.service
+++ b/htcacheclean.service
@@ -1,6 +1,7 @@
[Unit]
-Description=Disk Cache Cleaning Daemon for Apache HTTP Server
+Description=Disk Cache Cleaning Daemon for the Apache HTTP Server
After=httpd.service
+Documentation=man:htcacheclean.service(8)
[Service]
Type=forking
diff --git a/htcacheclean.service.xml b/htcacheclean.service.xml
new file mode 100644
index 0000000..d771ae7
--- /dev/null
+++ b/htcacheclean.service.xml
@@ -0,0 +1,123 @@
+
+
+
+
+
+ htcacheclean systemd unit
+ httpd
+ AuthorOrtonJoejorton@redhat.com
+
+
+
+ htcacheclean.service
+ 8
+
+
+
+ htcacheclean.service
+ htcacheclean unit file for systemd
+
+
+
+
+ /usr/lib/systemd/system/htcacheclean.service
+
+
+
+
+ Description
+
+ This manual page describes the systemd
+ unit file for the htcacheclean daemon. This
+ unit file provides a service which runs
+ htcacheclean is run in daemon mode,
+ periodically cleaning the disk cache root to ensure disk space
+ usage is within configured limits.
+
+
+
+
+ Options
+
+ The service is configured by configuration file
+ /etc/sysconfig/htcacheclean. The following
+ variables are used, following standard systemd
+ EnvironmentFile= syntax:
+
+
+
+ INTERVAL=
+
+ Sets the interval between cache clean runs, in
+ minutes. By default this is configured as
+ 15.
+
+
+
+ CACHE_ROOT=
+
+ Sets the directory name used for the cache
+ root. By default this is configured as
+ /var/cache/httpd/proxy.
+
+
+
+ LIMIT=
+
+ Sets the total disk cache space limit, in
+ bytes. Use a K or M
+ suffix to signify kilobytes or megabytes. By default this is
+ set to 100M.
+
+
+
+ OPTIONS=
+
+ Any other options to pass to
+ htcacheclean.
+
+
+
+
+
+ Files
+
+ /usr/lib/systemd/system/htcacheclean.service,
+ /etc/sysconfig/htcacheclean
+
+
+
+ See also
+
+
+ htcacheclean8,
+ httpd8,
+ httpd.service8,
+ systemd.exec8
+
+
+
+
+
+
diff --git a/httpd.spec b/httpd.spec
index 8938613..85d661c 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -13,7 +13,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.34
-Release: 10%{?dist}
+Release: 11%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -49,6 +49,7 @@ Source29: 01-md.conf
Source30: README.confd
Source31: README.confmod
Source32: httpd.service.xml
+Source33: htcacheclean.service.xml
Source40: htcacheclean.service
Source41: htcacheclean.sysconf
Source42: httpd-init.service
@@ -275,6 +276,7 @@ sed 's/@MPM@/%{mpm}/' < $RPM_SOURCE_DIR/httpd.service.xml \
> httpd.service.xml
xmlto man ./httpd.service.xml
+xmlto man $RPM_SOURCE_DIR/htcacheclean.service.xml
: Building with MMN %{mmn}, MMN-ISA %{mmnisa}
: Default MPM is %{mpm}, vendor string is '%{vstring}'
@@ -497,7 +499,7 @@ install -m 644 -p $RPM_SOURCE_DIR/httpd.logrotate \
# Install systemd service man pages
install -m 644 -p httpd.service.8 httpd-init.service.8 httpd.socket.8 \
- httpd@.service.8 \
+ httpd@.service.8 htcacheclean.service.8 \
$RPM_BUILD_ROOT%{_mandir}/man8
# fix man page paths
@@ -733,6 +735,9 @@ exit $rv
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Wed Oct 31 2018 Joe Orton - 2.4.34-11
+- add htcacheclean.service(8) man page
+
* Fri Sep 28 2018 Joe Orton - 2.4.34-10
- apachectl: don't read /etc/sysconfig/httpd
From e869b8b79917f05a480544aa297c36a45f0136bc Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Wed, 31 Oct 2018 10:08:18 +0000
Subject: [PATCH 139/359] update to 2.4.37
---
httpd-2.4.34-layfix.patch | 24 -
httpd-2.4.34-r1555631.patch | 14 -
httpd-2.4.34-r1827912+.patch | 858 -----------------------------------
httpd.spec | 13 +-
sources | 2 +-
5 files changed, 6 insertions(+), 905 deletions(-)
delete mode 100644 httpd-2.4.34-layfix.patch
delete mode 100644 httpd-2.4.34-r1555631.patch
delete mode 100644 httpd-2.4.34-r1827912+.patch
diff --git a/httpd-2.4.34-layfix.patch b/httpd-2.4.34-layfix.patch
deleted file mode 100644
index 39728a1..0000000
--- a/httpd-2.4.34-layfix.patch
+++ /dev/null
@@ -1,24 +0,0 @@
---- httpd-2.4.34/config.layout.layfix
-+++ httpd-2.4.34/config.layout
-@@ -133,6 +133,7 @@
- # Layout used in Fedora httpd packaging.
-
- prefix: /usr
-+ localstatedir: /var
- exec_prefix: ${prefix}
- bindir: ${prefix}/bin
- sbindir: ${prefix}/sbin
-@@ -144,11 +145,10 @@
- installbuilddir: ${libdir}/httpd/build
- errordir: ${datadir}/error
- iconsdir: ${datadir}/icons
-- htdocsdir: /var/www/html
-+ htdocsdir: ${localstatedir}/www/html
- manualdir: ${datadir}/manual
-- cgidir: /var/www/cgi-bin
-+ cgidir: ${localstatedir}/www/cgi-bin
- includedir: ${prefix}/include/httpd
-- localstatedir: /var
- runtimedir: /run/httpd
- logfiledir: ${localstatedir}/log/httpd
- proxycachedir: ${localstatedir}/cache/httpd/proxy
diff --git a/httpd-2.4.34-r1555631.patch b/httpd-2.4.34-r1555631.patch
deleted file mode 100644
index 7ca9478..0000000
--- a/httpd-2.4.34-r1555631.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-# ./pullrev.sh 1555631
-http://svn.apache.org/viewvc?view=revision&revision=1555631
-
---- httpd-2.4.34/modules/ssl/ssl_engine_ocsp.c
-+++ httpd-2.4.34/modules/ssl/ssl_engine_ocsp.c
-@@ -61,7 +61,7 @@
- /* Use default responder URL if forced by configuration, else use
- * certificate-specified responder, falling back to default if
- * necessary and possible. */
-- if (sc->server->ocsp_force_default) {
-+ if (sc->server->ocsp_force_default == TRUE) {
- s = sc->server->ocsp_responder;
- }
- else {
diff --git a/httpd-2.4.34-r1827912+.patch b/httpd-2.4.34-r1827912+.patch
deleted file mode 100644
index 98c7ac8..0000000
--- a/httpd-2.4.34-r1827912+.patch
+++ /dev/null
@@ -1,858 +0,0 @@
-
-Pull all changes from upstream integration branch:
-
-svn diff -r1840105:1841219 https://svn.apache.org/repos/asf/httpd/httpd/branches/tlsv1.3-for-2.4.x
-
---- httpd-2.4.34/modules/ssl/mod_ssl.c.r1827912+
-+++ httpd-2.4.34/modules/ssl/mod_ssl.c
-@@ -93,9 +93,9 @@
- SSL_CMD_SRV(FIPS, FLAG,
- "Enable FIPS-140 mode "
- "(`on', `off')")
-- SSL_CMD_ALL(CipherSuite, TAKE1,
-- "Colon-delimited list of permitted SSL Ciphers "
-- "('XXX:...:XXX' - see manual)")
-+ SSL_CMD_ALL(CipherSuite, TAKE12,
-+ "Colon-delimited list of permitted SSL Ciphers, optional preceeded "
-+ "by protocol identifier ('XXX:...:XXX' - see manual)")
- SSL_CMD_SRV(CertificateFile, TAKE1,
- "SSL Server Certificate file "
- "('/path/to/file' - PEM or DER encoded)")
-@@ -185,9 +185,9 @@
- SSL_CMD_PXY(ProxyProtocol, RAW_ARGS,
- "SSL Proxy: enable or disable SSL protocol flavors "
- "('[+-][" SSL_PROTOCOLS "] ...' - see manual)")
-- SSL_CMD_PXY(ProxyCipherSuite, TAKE1,
-+ SSL_CMD_PXY(ProxyCipherSuite, TAKE12,
- "SSL Proxy: colon-delimited list of permitted SSL ciphers "
-- "('XXX:...:XXX' - see manual)")
-+ ", optionally preceeded by protocol specifier ('XXX:...:XXX' - see manual)")
- SSL_CMD_PXY(ProxyVerify, TAKE1,
- "SSL Proxy: whether to verify the remote certificate "
- "('on' or 'off')")
-@@ -398,7 +398,7 @@
- /* We must register the library in full, to ensure our configuration
- * code can successfully test the SSL environment.
- */
--#if MODSSL_USE_OPENSSL_PRE_1_1_API
-+#if MODSSL_USE_OPENSSL_PRE_1_1_API || defined(LIBRESSL_VERSION_NUMBER)
- (void)CRYPTO_malloc_init();
- #else
- OPENSSL_malloc_init();
---- httpd-2.4.34/modules/ssl/ssl_engine_config.c.r1827912+
-+++ httpd-2.4.34/modules/ssl/ssl_engine_config.c
-@@ -136,6 +136,7 @@
- mctx->auth.cipher_suite = NULL;
- mctx->auth.verify_depth = UNSET;
- mctx->auth.verify_mode = SSL_CVERIFY_UNSET;
-+ mctx->auth.tls13_ciphers = NULL;
-
- mctx->ocsp_mask = UNSET;
- mctx->ocsp_force_default = UNSET;
-@@ -280,6 +281,7 @@
- cfgMergeString(auth.cipher_suite);
- cfgMergeInt(auth.verify_depth);
- cfgMerge(auth.verify_mode, SSL_CVERIFY_UNSET);
-+ cfgMergeString(auth.tls13_ciphers);
-
- cfgMergeInt(ocsp_mask);
- cfgMergeBool(ocsp_force_default);
-@@ -761,22 +763,37 @@
-
- const char *ssl_cmd_SSLCipherSuite(cmd_parms *cmd,
- void *dcfg,
-- const char *arg)
-+ const char *arg1, const char *arg2)
- {
- SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
- SSLDirConfigRec *dc = (SSLDirConfigRec *)dcfg;
-
-- /* always disable null and export ciphers */
-- arg = apr_pstrcat(cmd->pool, arg, ":!aNULL:!eNULL:!EXP", NULL);
--
-- if (cmd->path) {
-- dc->szCipherSuite = arg;
-+ if (arg2 == NULL) {
-+ arg2 = arg1;
-+ arg1 = "SSL";
- }
-- else {
-- sc->server->auth.cipher_suite = arg;
-+
-+ if (!strcmp("SSL", arg1)) {
-+ /* always disable null and export ciphers */
-+ arg2 = apr_pstrcat(cmd->pool, arg2, ":!aNULL:!eNULL:!EXP", NULL);
-+ if (cmd->path) {
-+ dc->szCipherSuite = arg2;
-+ }
-+ else {
-+ sc->server->auth.cipher_suite = arg2;
-+ }
-+ return NULL;
- }
--
-- return NULL;
-+#if SSL_HAVE_PROTOCOL_TLSV1_3
-+ else if (!strcmp("TLSv1.3", arg1)) {
-+ if (cmd->path) {
-+ return "TLSv1.3 ciphers cannot be set inside a directory context";
-+ }
-+ sc->server->auth.tls13_ciphers = arg2;
-+ return NULL;
-+ }
-+#endif
-+ return apr_pstrcat(cmd->pool, "procotol '", arg1, "' not supported", NULL);
- }
-
- #define SSL_FLAGS_CHECK_FILE \
-@@ -1449,6 +1466,9 @@
- else if (strcEQ(w, "TLSv1.2")) {
- thisopt = SSL_PROTOCOL_TLSV1_2;
- }
-+ else if (SSL_HAVE_PROTOCOL_TLSV1_3 && strcEQ(w, "TLSv1.3")) {
-+ thisopt = SSL_PROTOCOL_TLSV1_3;
-+ }
- #endif
- else if (strcEQ(w, "all")) {
- thisopt = SSL_PROTOCOL_ALL;
-@@ -1510,16 +1530,28 @@
-
- const char *ssl_cmd_SSLProxyCipherSuite(cmd_parms *cmd,
- void *dcfg,
-- const char *arg)
-+ const char *arg1, const char *arg2)
- {
- SSLDirConfigRec *dc = (SSLDirConfigRec *)dcfg;
--
-- /* always disable null and export ciphers */
-- arg = apr_pstrcat(cmd->pool, arg, ":!aNULL:!eNULL:!EXP", NULL);
--
-- dc->proxy->auth.cipher_suite = arg;
--
-- return NULL;
-+
-+ if (arg2 == NULL) {
-+ arg2 = arg1;
-+ arg1 = "SSL";
-+ }
-+
-+ if (!strcmp("SSL", arg1)) {
-+ /* always disable null and export ciphers */
-+ arg2 = apr_pstrcat(cmd->pool, arg2, ":!aNULL:!eNULL:!EXP", NULL);
-+ dc->proxy->auth.cipher_suite = arg2;
-+ return NULL;
-+ }
-+#if SSL_HAVE_PROTOCOL_TLSV1_3
-+ else if (!strcmp("TLSv1.3", arg1)) {
-+ dc->proxy->auth.tls13_ciphers = arg2;
-+ return NULL;
-+ }
-+#endif
-+ return apr_pstrcat(cmd->pool, "procotol '", arg1, "' not supported", NULL);
- }
-
- const char *ssl_cmd_SSLProxyVerify(cmd_parms *cmd,
---- httpd-2.4.34/modules/ssl/ssl_engine_init.c.r1827912+
-+++ httpd-2.4.34/modules/ssl/ssl_engine_init.c
-@@ -568,6 +568,9 @@
- #ifdef HAVE_TLSV1_X
- (protocol & SSL_PROTOCOL_TLSV1_1 ? "TLSv1.1, " : ""),
- (protocol & SSL_PROTOCOL_TLSV1_2 ? "TLSv1.2, " : ""),
-+#if SSL_HAVE_PROTOCOL_TLSV1_3
-+ (protocol & SSL_PROTOCOL_TLSV1_3 ? "TLSv1.3, " : ""),
-+#endif
- #endif
- NULL);
- cp[strlen(cp)-2] = NUL;
-@@ -600,6 +603,13 @@
- TLSv1_2_client_method() : /* proxy */
- TLSv1_2_server_method(); /* server */
- }
-+#if SSL_HAVE_PROTOCOL_TLSV1_3
-+ else if (protocol == SSL_PROTOCOL_TLSV1_3) {
-+ method = mctx->pkp ?
-+ TLSv1_3_client_method() : /* proxy */
-+ TLSv1_3_server_method(); /* server */
-+ }
-+#endif
- #endif
- else { /* For multiple protocols, we need a flexible method */
- method = mctx->pkp ?
-@@ -617,7 +627,8 @@
-
- SSL_CTX_set_options(ctx, SSL_OP_ALL);
-
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || \
-+ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20800000L)
- /* always disable SSLv2, as per RFC 6176 */
- SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv2);
-
-@@ -639,10 +650,19 @@
- if (!(protocol & SSL_PROTOCOL_TLSV1_2)) {
- SSL_CTX_set_options(ctx, SSL_OP_NO_TLSv1_2);
- }
-+#if SSL_HAVE_PROTOCOL_TLSV1_3
-+ ssl_set_ctx_protocol_option(s, ctx, SSL_OP_NO_TLSv1_3,
-+ protocol & SSL_PROTOCOL_TLSV1_3, "TLSv1.3");
-+#endif
- #endif
-
- #else /* #if OPENSSL_VERSION_NUMBER < 0x10100000L */
- /* We first determine the maximum protocol version we should provide */
-+#if SSL_HAVE_PROTOCOL_TLSV1_3
-+ if (SSL_HAVE_PROTOCOL_TLSV1_3 && (protocol & SSL_PROTOCOL_TLSV1_3)) {
-+ prot = TLS1_3_VERSION;
-+ } else
-+#endif
- if (protocol & SSL_PROTOCOL_TLSV1_2) {
- prot = TLS1_2_VERSION;
- } else if (protocol & SSL_PROTOCOL_TLSV1_1) {
-@@ -664,6 +684,11 @@
-
- /* Next we scan for the minimal protocol version we should provide,
- * but we do not allow holes between max and min */
-+#if SSL_HAVE_PROTOCOL_TLSV1_3
-+ if (prot == TLS1_3_VERSION && protocol & SSL_PROTOCOL_TLSV1_2) {
-+ prot = TLS1_2_VERSION;
-+ }
-+#endif
- if (prot == TLS1_2_VERSION && protocol & SSL_PROTOCOL_TLSV1_1) {
- prot = TLS1_1_VERSION;
- }
-@@ -736,6 +761,13 @@
- SSL_CTX_set_mode(ctx, SSL_MODE_RELEASE_BUFFERS);
- #endif
-
-+#if OPENSSL_VERSION_NUMBER >= 0x1010100fL
-+ /* For OpenSSL >=1.1.1, disable auto-retry mode so it's possible
-+ * to consume handshake records without blocking for app-data.
-+ * https://github.com/openssl/openssl/issues/7178 */
-+ SSL_CTX_clear_mode(ctx, SSL_MODE_AUTO_RETRY);
-+#endif
-+
- return APR_SUCCESS;
- }
-
-@@ -888,7 +920,15 @@
- ssl_log_ssl_error(SSLLOG_MARK, APLOG_EMERG, s);
- return ssl_die(s);
- }
--
-+#if SSL_HAVE_PROTOCOL_TLSV1_3
-+ if (mctx->auth.tls13_ciphers
-+ && !SSL_CTX_set_ciphersuites(ctx, mctx->auth.tls13_ciphers)) {
-+ ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO()
-+ "Unable to configure permitted TLSv1.3 ciphers");
-+ ssl_log_ssl_error(SSLLOG_MARK, APLOG_EMERG, s);
-+ return ssl_die(s);
-+ }
-+#endif
- return APR_SUCCESS;
- }
-
-@@ -1493,6 +1533,13 @@
- X509_STORE_CTX *sctx;
- X509_STORE *store = SSL_CTX_get_cert_store(mctx->ssl_ctx);
-
-+#if OPENSSL_VERSION_NUMBER >= 0x1010100fL
-+ /* For OpenSSL >=1.1.1, turn on client cert support which is
-+ * otherwise turned off by default (by design).
-+ * https://github.com/openssl/openssl/issues/6933 */
-+ SSL_CTX_set_post_handshake_auth(mctx->ssl_ctx, 1);
-+#endif
-+
- SSL_CTX_set_client_cert_cb(mctx->ssl_ctx,
- ssl_callback_proxy_cert);
-
---- httpd-2.4.34/modules/ssl/ssl_engine_kernel.c.r1827912+
-+++ httpd-2.4.34/modules/ssl/ssl_engine_kernel.c
-@@ -188,6 +188,12 @@
- || strcmp(a1->cipher_suite, a2->cipher_suite))) {
- return 0;
- }
-+ /* both have the same ca cipher suite string */
-+ if ((a1->tls13_ciphers != a2->tls13_ciphers)
-+ && (!a1->tls13_ciphers || !a2->tls13_ciphers
-+ || strcmp(a1->tls13_ciphers, a2->tls13_ciphers))) {
-+ return 0;
-+ }
- return 1;
- }
-
-@@ -424,87 +430,70 @@
- }
- }
-
--/*
-- * Access Handler
-- */
--int ssl_hook_Access(request_rec *r)
-+static int ssl_check_post_client_verify(request_rec *r, SSLSrvConfigRec *sc,
-+ SSLDirConfigRec *dc, SSLConnRec *sslconn,
-+ SSL *ssl)
- {
-- SSLDirConfigRec *dc = myDirConfig(r);
-- SSLSrvConfigRec *sc = mySrvConfig(r->server);
-- SSLConnRec *sslconn = myConnConfig(r->connection);
-- SSL *ssl = sslconn ? sslconn->ssl : NULL;
-- server_rec *handshakeserver = sslconn ? sslconn->server : NULL;
-- SSLSrvConfigRec *hssc = handshakeserver? mySrvConfig(handshakeserver) : NULL;
-- SSL_CTX *ctx = NULL;
-- apr_array_header_t *requires;
-- ssl_require_t *ssl_requires;
-- int ok, i;
-- BOOL renegotiate = FALSE, renegotiate_quick = FALSE;
- X509 *cert;
-- X509 *peercert;
-- X509_STORE *cert_store = NULL;
-- X509_STORE_CTX *cert_store_ctx;
-- STACK_OF(SSL_CIPHER) *cipher_list_old = NULL, *cipher_list = NULL;
-- const SSL_CIPHER *cipher = NULL;
-- int depth, verify_old, verify, n, is_slave = 0;
-- const char *ncipher_suite;
--
-- /* On a slave connection, we do not expect to have an SSLConnRec, but
-- * our master connection might have one. */
-- if (!(sslconn && ssl) && r->connection->master) {
-- sslconn = myConnConfig(r->connection->master);
-- ssl = sslconn ? sslconn->ssl : NULL;
-- handshakeserver = sslconn ? sslconn->server : NULL;
-- hssc = handshakeserver? mySrvConfig(handshakeserver) : NULL;
-- is_slave = 1;
-- }
-
-- if (ssl) {
-- /*
-- * We should have handshaken here (on handshakeserver),
-- * otherwise we are being redirected (ErrorDocument) from
-- * a renegotiation failure below. The access is still
-- * forbidden in the latter case, let ap_die() handle
-- * this recursive (same) error.
-- */
-- if (!SSL_is_init_finished(ssl)) {
-- return HTTP_FORBIDDEN;
-+ /*
-+ * Remember the peer certificate's DN
-+ */
-+ if ((cert = SSL_get_peer_certificate(ssl))) {
-+ if (sslconn->client_cert) {
-+ X509_free(sslconn->client_cert);
- }
-- ctx = SSL_get_SSL_CTX(ssl);
-+ sslconn->client_cert = cert;
-+ sslconn->client_dn = NULL;
- }
--
-+
- /*
-- * Support for SSLRequireSSL directive
-+ * Finally check for acceptable renegotiation results
- */
-- if (dc->bSSLRequired && !ssl) {
-- if ((sc->enabled == SSL_ENABLED_OPTIONAL) && !is_slave) {
-- /* This vhost was configured for optional SSL, just tell the
-- * client that we need to upgrade.
-- */
-- apr_table_setn(r->err_headers_out, "Upgrade", "TLS/1.0, HTTP/1.1");
-- apr_table_setn(r->err_headers_out, "Connection", "Upgrade");
-+ if ((dc->nVerifyClient != SSL_CVERIFY_NONE) ||
-+ (sc->server->auth.verify_mode != SSL_CVERIFY_NONE)) {
-+ BOOL do_verify = ((dc->nVerifyClient == SSL_CVERIFY_REQUIRE) ||
-+ (sc->server->auth.verify_mode == SSL_CVERIFY_REQUIRE));
-+
-+ if (do_verify && (SSL_get_verify_result(ssl) != X509_V_OK)) {
-+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02262)
-+ "Re-negotiation handshake failed: "
-+ "Client verification failed");
-
-- return HTTP_UPGRADE_REQUIRED;
-+ return HTTP_FORBIDDEN;
- }
-
-- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02219)
-- "access to %s failed, reason: %s",
-- r->filename, "SSL connection required");
--
-- /* remember forbidden access for strict require option */
-- apr_table_setn(r->notes, "ssl-access-forbidden", "1");
-+ if (do_verify) {
-+ if (cert == NULL) {
-+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02263)
-+ "Re-negotiation handshake failed: "
-+ "Client certificate missing");
-
-- return HTTP_FORBIDDEN;
-+ return HTTP_FORBIDDEN;
-+ }
-+ }
- }
-+ return OK;
-+}
-
-- /*
-- * Check to see whether SSL is in use; if it's not, then no
-- * further access control checks are relevant. (the test for
-- * sc->enabled is probably strictly unnecessary)
-- */
-- if (sc->enabled == SSL_ENABLED_FALSE || !ssl) {
-- return DECLINED;
-- }
-+/*
-+ * Access Handler, classic flavour, for SSL/TLS up to v1.2
-+ * where everything can be renegotiated and no one is happy.
-+ */
-+static int ssl_hook_Access_classic(request_rec *r, SSLSrvConfigRec *sc, SSLDirConfigRec *dc,
-+ SSLConnRec *sslconn, SSL *ssl)
-+{
-+ server_rec *handshakeserver = sslconn ? sslconn->server : NULL;
-+ SSLSrvConfigRec *hssc = handshakeserver? mySrvConfig(handshakeserver) : NULL;
-+ SSL_CTX *ctx = NULL;
-+ BOOL renegotiate = FALSE, renegotiate_quick = FALSE;
-+ X509 *peercert;
-+ X509_STORE *cert_store = NULL;
-+ X509_STORE_CTX *cert_store_ctx;
-+ STACK_OF(SSL_CIPHER) *cipher_list_old = NULL, *cipher_list = NULL;
-+ const SSL_CIPHER *cipher = NULL;
-+ int depth, verify_old, verify, n, rc;
-+ const char *ncipher_suite;
-
- #ifdef HAVE_SRP
- /*
-@@ -581,7 +570,7 @@
- }
-
- /* configure new state */
-- if (is_slave) {
-+ if (r->connection->master) {
- /* TODO: this categorically fails changed cipher suite settings
- * on slave connections. We could do better by
- * - create a new SSL* from our SSL_CTX and set cipher suite there,
-@@ -659,7 +648,7 @@
- }
-
- if (renegotiate) {
-- if (is_slave) {
-+ if (r->connection->master) {
- /* The request causes renegotiation on a slave connection.
- * This is not allowed since we might have concurrent requests
- * on this connection.
-@@ -732,7 +721,7 @@
- (verify & SSL_VERIFY_FAIL_IF_NO_PEER_CERT)))
- {
- renegotiate = TRUE;
-- if (is_slave) {
-+ if (r->connection->master) {
- /* The request causes renegotiation on a slave connection.
- * This is not allowed since we might have concurrent requests
- * on this connection.
-@@ -885,6 +874,7 @@
-
- if (renegotiate_quick) {
- STACK_OF(X509) *cert_stack;
-+ X509 *cert;
-
- /* perform just a manual re-verification of the peer */
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02258)
-@@ -1037,43 +1027,10 @@
- }
-
- /*
-- * Remember the peer certificate's DN
-- */
-- if ((cert = SSL_get_peer_certificate(ssl))) {
-- if (sslconn->client_cert) {
-- X509_free(sslconn->client_cert);
-- }
-- sslconn->client_cert = cert;
-- sslconn->client_dn = NULL;
-- }
--
-- /*
- * Finally check for acceptable renegotiation results
- */
-- if ((dc->nVerifyClient != SSL_CVERIFY_NONE) ||
-- (sc->server->auth.verify_mode != SSL_CVERIFY_NONE)) {
-- BOOL do_verify = ((dc->nVerifyClient == SSL_CVERIFY_REQUIRE) ||
-- (sc->server->auth.verify_mode == SSL_CVERIFY_REQUIRE));
--
-- if (do_verify && (SSL_get_verify_result(ssl) != X509_V_OK)) {
-- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02262)
-- "Re-negotiation handshake failed: "
-- "Client verification failed");
--
-- return HTTP_FORBIDDEN;
-- }
--
-- if (do_verify) {
-- if ((peercert = SSL_get_peer_certificate(ssl)) == NULL) {
-- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02263)
-- "Re-negotiation handshake failed: "
-- "Client certificate missing");
--
-- return HTTP_FORBIDDEN;
-- }
--
-- X509_free(peercert);
-- }
-+ if (OK != (rc = ssl_check_post_client_verify(r, sc, dc, sslconn, ssl))) {
-+ return rc;
- }
-
- /*
-@@ -1096,6 +1053,215 @@
- }
- }
-
-+ return DECLINED;
-+}
-+
-+#if SSL_HAVE_PROTOCOL_TLSV1_3
-+/*
-+ * Access Handler, modern flavour, for SSL/TLS v1.3 and onward.
-+ * Only client certificates can be requested, everything else stays.
-+ */
-+static int ssl_hook_Access_modern(request_rec *r, SSLSrvConfigRec *sc, SSLDirConfigRec *dc,
-+ SSLConnRec *sslconn, SSL *ssl)
-+{
-+ if ((dc->nVerifyClient != SSL_CVERIFY_UNSET) ||
-+ (sc->server->auth.verify_mode != SSL_CVERIFY_UNSET)) {
-+ int vmode_inplace, vmode_needed;
-+ int change_vmode = FALSE;
-+ int old_state, n, rc;
-+
-+ vmode_inplace = SSL_get_verify_mode(ssl);
-+ vmode_needed = SSL_VERIFY_NONE;
-+
-+ if ((dc->nVerifyClient == SSL_CVERIFY_REQUIRE) ||
-+ (sc->server->auth.verify_mode == SSL_CVERIFY_REQUIRE)) {
-+ vmode_needed |= SSL_VERIFY_PEER_STRICT;
-+ }
-+
-+ if ((dc->nVerifyClient == SSL_CVERIFY_OPTIONAL) ||
-+ (dc->nVerifyClient == SSL_CVERIFY_OPTIONAL_NO_CA) ||
-+ (sc->server->auth.verify_mode == SSL_CVERIFY_OPTIONAL) ||
-+ (sc->server->auth.verify_mode == SSL_CVERIFY_OPTIONAL_NO_CA))
-+ {
-+ vmode_needed |= SSL_VERIFY_PEER;
-+ }
-+
-+ if (vmode_needed == SSL_VERIFY_NONE) {
-+ return DECLINED;
-+ }
-+
-+ vmode_needed |= SSL_VERIFY_CLIENT_ONCE;
-+ if (vmode_inplace != vmode_needed) {
-+ /* Need to change, if new setting is more restrictive than existing one */
-+
-+ if ((vmode_inplace == SSL_VERIFY_NONE)
-+ || (!(vmode_inplace & SSL_VERIFY_PEER)
-+ && (vmode_needed & SSL_VERIFY_PEER))
-+ || (!(vmode_inplace & SSL_VERIFY_FAIL_IF_NO_PEER_CERT)
-+ && (vmode_needed & SSL_VERIFY_FAIL_IF_NO_PEER_CERT))) {
-+ /* need to change the effective verify mode */
-+ change_vmode = TRUE;
-+ }
-+ else {
-+ /* FIXME: does this work with TLSv1.3? Is this more than re-inspecting
-+ * the certificate we should already have? */
-+ /*
-+ * override of SSLVerifyDepth
-+ *
-+ * The depth checks are handled by us manually inside the
-+ * verify callback function and not by OpenSSL internally
-+ * (and our function is aware of both the per-server and
-+ * per-directory contexts). So we cannot ask OpenSSL about
-+ * the currently verify depth. Instead we remember it in our
-+ * SSLConnRec attached to the SSL* of OpenSSL. We've to force
-+ * the renegotiation if the reconfigured/new verify depth is
-+ * less than the currently active/remembered verify depth
-+ * (because this means more restriction on the certificate
-+ * chain).
-+ */
-+ n = (sslconn->verify_depth != UNSET)?
-+ sslconn->verify_depth : sc->server->auth.verify_depth;
-+ /* determine the new depth */
-+ sslconn->verify_depth = (dc->nVerifyDepth != UNSET)
-+ ? dc->nVerifyDepth
-+ : sc->server->auth.verify_depth;
-+ if (sslconn->verify_depth < n) {
-+ change_vmode = TRUE;
-+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO()
-+ "Reduced client verification depth will "
-+ "force renegotiation");
-+ }
-+ }
-+ }
-+
-+ if (change_vmode) {
-+ char peekbuf[1];
-+
-+ if (r->connection->master) {
-+ /* FIXME: modifying the SSL on a slave connection is no good.
-+ * We would need to push this back to the master connection
-+ * somehow.
-+ */
-+ apr_table_setn(r->notes, "ssl-renegotiate-forbidden", "verify-client");
-+ return HTTP_FORBIDDEN;
-+ }
-+
-+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO() "verify client post handshake");
-+
-+ SSL_set_verify(ssl, vmode_needed, ssl_callback_SSLVerify);
-+
-+ if (SSL_verify_client_post_handshake(ssl) != 1) {
-+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(10158)
-+ "cannot perform post-handshake authentication");
-+ ssl_log_ssl_error(SSLLOG_MARK, APLOG_ERR, r->server);
-+ apr_table_setn(r->notes, "error-notes",
-+ "Reason: Cannot perform Post-Handshake Authentication. ");
-+ return HTTP_FORBIDDEN;
-+ }
-+
-+ old_state = sslconn->reneg_state;
-+ sslconn->reneg_state = RENEG_ALLOW;
-+ modssl_set_app_data2(ssl, r);
-+
-+ SSL_do_handshake(ssl);
-+ /* Need to trigger renegotiation handshake by reading.
-+ * Peeking 0 bytes actually works.
-+ * See: http://marc.info/?t=145493359200002&r=1&w=2
-+ */
-+ SSL_peek(ssl, peekbuf, 0);
-+
-+ sslconn->reneg_state = old_state;
-+ modssl_set_app_data2(ssl, NULL);
-+
-+ /*
-+ * Finally check for acceptable renegotiation results
-+ */
-+ if (OK != (rc = ssl_check_post_client_verify(r, sc, dc, sslconn, ssl))) {
-+ return rc;
-+ }
-+ }
-+ }
-+
-+ return DECLINED;
-+}
-+#endif
-+
-+int ssl_hook_Access(request_rec *r)
-+{
-+ SSLDirConfigRec *dc = myDirConfig(r);
-+ SSLSrvConfigRec *sc = mySrvConfig(r->server);
-+ SSLConnRec *sslconn = myConnConfig(r->connection);
-+ SSL *ssl = sslconn ? sslconn->ssl : NULL;
-+ apr_array_header_t *requires;
-+ ssl_require_t *ssl_requires;
-+ int ok, i, ret;
-+
-+ /* On a slave connection, we do not expect to have an SSLConnRec, but
-+ * our master connection might have one. */
-+ if (!(sslconn && ssl) && r->connection->master) {
-+ sslconn = myConnConfig(r->connection->master);
-+ ssl = sslconn ? sslconn->ssl : NULL;
-+ }
-+
-+ /*
-+ * We should have handshaken here, otherwise we are being
-+ * redirected (ErrorDocument) from a renegotiation failure below.
-+ * The access is still forbidden in the latter case, let ap_die() handle
-+ * this recursive (same) error.
-+ */
-+ if (ssl && !SSL_is_init_finished(ssl)) {
-+ return HTTP_FORBIDDEN;
-+ }
-+
-+ /*
-+ * Support for SSLRequireSSL directive
-+ */
-+ if (dc->bSSLRequired && !ssl) {
-+ if ((sc->enabled == SSL_ENABLED_OPTIONAL) && !r->connection->master) {
-+ /* This vhost was configured for optional SSL, just tell the
-+ * client that we need to upgrade.
-+ */
-+ apr_table_setn(r->err_headers_out, "Upgrade", "TLS/1.0, HTTP/1.1");
-+ apr_table_setn(r->err_headers_out, "Connection", "Upgrade");
-+
-+ return HTTP_UPGRADE_REQUIRED;
-+ }
-+
-+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02219)
-+ "access to %s failed, reason: %s",
-+ r->filename, "SSL connection required");
-+
-+ /* remember forbidden access for strict require option */
-+ apr_table_setn(r->notes, "ssl-access-forbidden", "1");
-+
-+ return HTTP_FORBIDDEN;
-+ }
-+
-+ /*
-+ * Check to see whether SSL is in use; if it's not, then no
-+ * further access control checks are relevant. (the test for
-+ * sc->enabled is probably strictly unnecessary)
-+ */
-+ if (sc->enabled == SSL_ENABLED_FALSE || !ssl) {
-+ return DECLINED;
-+ }
-+
-+#if SSL_HAVE_PROTOCOL_TLSV1_3
-+ /* TLSv1.3+ is less complicated here. Branch off into a new codeline
-+ * and avoid messing with the past. */
-+ if (SSL_version(ssl) >= TLS1_3_VERSION) {
-+ ret = ssl_hook_Access_modern(r, sc, dc, sslconn, ssl);
-+ }
-+ else
-+#endif
-+ {
-+ ret = ssl_hook_Access_classic(r, sc, dc, sslconn, ssl);
-+ }
-+
-+ if (ret != DECLINED) {
-+ return ret;
-+ }
-+
- /* If we're trying to have the user name set from a client
- * certificate then we need to set it here. This should be safe as
- * the user name probably isn't important from an auth checking point
-@@ -2080,31 +2246,43 @@
- {
- conn_rec *c;
- server_rec *s;
-- SSLConnRec *scr;
-
- /* Retrieve the conn_rec and the associated SSLConnRec. */
- if ((c = (conn_rec *)SSL_get_app_data((SSL *)ssl)) == NULL) {
- return;
- }
-
-- if ((scr = myConnConfig(c)) == NULL) {
-- return;
-- }
-+ /* With TLS 1.3 this callback may be called multiple times on the first
-+ * negotiation, so the below logic to detect renegotiations can't work.
-+ * Fortunately renegotiations are forbidden starting with TLS 1.3, and
-+ * this is enforced by OpenSSL so there's nothing to be done here.
-+ */
-+#if SSL_HAVE_PROTOCOL_TLSV1_3
-+ if (SSL_version(ssl) < TLS1_3_VERSION)
-+#endif
-+ {
-+ SSLConnRec *sslconn;
-+
-+ if ((sslconn = myConnConfig(c)) == NULL) {
-+ return;
-+ }
-
-- /* If the reneg state is to reject renegotiations, check the SSL
-- * state machine and move to ABORT if a Client Hello is being
-- * read. */
-- if (!scr->is_proxy &&
-- (where & SSL_CB_HANDSHAKE_START) &&
-- scr->reneg_state == RENEG_REJECT) {
-- scr->reneg_state = RENEG_ABORT;
-+ /* If the reneg state is to reject renegotiations, check the SSL
-+ * state machine and move to ABORT if a Client Hello is being
-+ * read. */
-+ if (!sslconn->is_proxy &&
-+ (where & SSL_CB_HANDSHAKE_START) &&
-+ sslconn->reneg_state == RENEG_REJECT) {
-+ sslconn->reneg_state = RENEG_ABORT;
- ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, c, APLOGNO(02042)
- "rejecting client initiated renegotiation");
-- }
-- /* If the first handshake is complete, change state to reject any
-- * subsequent client-initiated renegotiation. */
-- else if ((where & SSL_CB_HANDSHAKE_DONE) && scr->reneg_state == RENEG_INIT) {
-- scr->reneg_state = RENEG_REJECT;
-+ }
-+ /* If the first handshake is complete, change state to reject any
-+ * subsequent client-initiated renegotiation. */
-+ else if ((where & SSL_CB_HANDSHAKE_DONE)
-+ && sslconn->reneg_state == RENEG_INIT) {
-+ sslconn->reneg_state = RENEG_REJECT;
-+ }
- }
-
- s = mySrvFromConn(c);
---- httpd-2.4.34/modules/ssl/ssl_private.h.r1827912+
-+++ httpd-2.4.34/modules/ssl/ssl_private.h
-@@ -132,13 +132,14 @@
- SSL_CTX_ctrl(ctx, SSL_CTRL_SET_MIN_PROTO_VERSION, version, NULL)
- #define SSL_CTX_set_max_proto_version(ctx, version) \
- SSL_CTX_ctrl(ctx, SSL_CTRL_SET_MAX_PROTO_VERSION, version, NULL)
--#endif
--/* LibreSSL declares OPENSSL_VERSION_NUMBER == 2.0 but does not include most
-- * changes from OpenSSL >= 1.1 (new functions, macros, deprecations, ...), so
-- * we have to work around this...
-+#elif LIBRESSL_VERSION_NUMBER < 0x2070000f
-+/* LibreSSL before 2.7 declares OPENSSL_VERSION_NUMBER == 2.0 but does not
-+ * include most changes from OpenSSL >= 1.1 (new functions, macros,
-+ * deprecations, ...), so we have to work around this...
- */
- #define MODSSL_USE_OPENSSL_PRE_1_1_API (1)
--#else
-+#endif /* LIBRESSL_VERSION_NUMBER < 0x2060000f */
-+#else /* defined(LIBRESSL_VERSION_NUMBER) */
- #define MODSSL_USE_OPENSSL_PRE_1_1_API (OPENSSL_VERSION_NUMBER < 0x10100000L)
- #endif
-
-@@ -238,7 +239,8 @@
- void free_bio_methods(void);
- #endif
-
--#if OPENSSL_VERSION_NUMBER < 0x10002000L || defined(LIBRESSL_VERSION_NUMBER)
-+#if OPENSSL_VERSION_NUMBER < 0x10002000L || \
-+ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000f)
- #define X509_STORE_CTX_get0_store(x) (x->ctx)
- #endif
-
-@@ -372,8 +374,17 @@
- #ifdef HAVE_TLSV1_X
- #define SSL_PROTOCOL_TLSV1_1 (1<<3)
- #define SSL_PROTOCOL_TLSV1_2 (1<<4)
-+#define SSL_PROTOCOL_TLSV1_3 (1<<5)
-+
-+#ifdef SSL_OP_NO_TLSv1_3
-+#define SSL_HAVE_PROTOCOL_TLSV1_3 (1)
-+#define SSL_PROTOCOL_ALL (SSL_PROTOCOL_BASIC| \
-+ SSL_PROTOCOL_TLSV1_1|SSL_PROTOCOL_TLSV1_2|SSL_PROTOCOL_TLSV1_3)
-+#else
-+#define SSL_HAVE_PROTOCOL_TLSV1_3 (0)
- #define SSL_PROTOCOL_ALL (SSL_PROTOCOL_BASIC| \
- SSL_PROTOCOL_TLSV1_1|SSL_PROTOCOL_TLSV1_2)
-+#endif
- #else
- #define SSL_PROTOCOL_ALL (SSL_PROTOCOL_BASIC)
- #endif
-@@ -646,6 +657,11 @@
- /** for client or downstream server authentication */
- int verify_depth;
- ssl_verify_t verify_mode;
-+
-+ /** TLSv1.3 has its separate cipher list, separate from the
-+ settings for older TLS protocol versions. Since which one takes
-+ effect is a matter of negotiation, we need separate settings */
-+ const char *tls13_ciphers;
- } modssl_auth_ctx_t;
-
- #ifdef HAVE_TLS_SESSION_TICKETS
-@@ -801,7 +817,7 @@
- const char *ssl_cmd_SSLCryptoDevice(cmd_parms *, void *, const char *);
- const char *ssl_cmd_SSLRandomSeed(cmd_parms *, void *, const char *, const char *, const char *);
- const char *ssl_cmd_SSLEngine(cmd_parms *, void *, const char *);
--const char *ssl_cmd_SSLCipherSuite(cmd_parms *, void *, const char *);
-+const char *ssl_cmd_SSLCipherSuite(cmd_parms *, void *, const char *, const char *);
- const char *ssl_cmd_SSLCertificateFile(cmd_parms *, void *, const char *);
- const char *ssl_cmd_SSLCertificateKeyFile(cmd_parms *, void *, const char *);
- const char *ssl_cmd_SSLCertificateChainFile(cmd_parms *, void *, const char *);
-@@ -830,7 +846,7 @@
-
- const char *ssl_cmd_SSLProxyEngine(cmd_parms *cmd, void *dcfg, int flag);
- const char *ssl_cmd_SSLProxyProtocol(cmd_parms *, void *, const char *);
--const char *ssl_cmd_SSLProxyCipherSuite(cmd_parms *, void *, const char *);
-+const char *ssl_cmd_SSLProxyCipherSuite(cmd_parms *, void *, const char *, const char *);
- const char *ssl_cmd_SSLProxyVerify(cmd_parms *, void *, const char *);
- const char *ssl_cmd_SSLProxyVerifyDepth(cmd_parms *, void *, const char *);
- const char *ssl_cmd_SSLProxyCACertificatePath(cmd_parms *, void *, const char *);
diff --git a/httpd.spec b/httpd.spec
index 85d661c..156716f 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -12,8 +12,8 @@
Summary: Apache HTTP Server
Name: httpd
-Version: 2.4.34
-Release: 11%{?dist}
+Version: 2.4.37
+Release: 1%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -59,7 +59,6 @@ Source44: httpd@.service
Patch1: httpd-2.4.1-apctl.patch
Patch2: httpd-2.4.9-apxs.patch
Patch3: httpd-2.4.1-deplibs.patch
-Patch4: httpd-2.4.34-layfix.patch
Patch6: httpd-2.4.34-apctlsystemd.patch
# Needed for socket activation and mod_systemd patch
Patch19: httpd-2.4.25-detect-systemd.patch
@@ -75,14 +74,12 @@ Patch30: httpd-2.4.4-cachehardmax.patch
Patch31: httpd-2.4.33-sslmultiproxy.patch
Patch34: httpd-2.4.17-socket-activation.patch
Patch36: httpd-2.4.33-r1830819+.patch
-Patch37: httpd-2.4.34-r1827912+.patch
Patch38: httpd-2.4.34-sslciphdefault.patch
Patch39: httpd-2.4.34-sslprotdefault.patch
# Bug fixes
# https://bugzilla.redhat.com/show_bug.cgi?id=1397243
Patch58: httpd-2.4.34-r1738878.patch
-Patch59: httpd-2.4.34-r1555631.patch
Patch60: httpd-2.4.34-enable-sslv3.patch
# Security fixes
@@ -223,7 +220,6 @@ interface for storing and accessing per-user session data.
%patch1 -p1 -b .apctl
%patch2 -p1 -b .apxs
%patch3 -p1 -b .deplibs
-%patch4 -p1 -b .layfix
%patch6 -p1 -b .apctlsystemd
%patch19 -p1 -b .detectsystemd
@@ -239,12 +235,10 @@ interface for storing and accessing per-user session data.
#patch31 -p1 -b .sslmultiproxy
%patch34 -p1 -b .socketactivation
%patch36 -p1 -b .r1830819+
-%patch37 -p1 -b .r1827912+
%patch38 -p1 -b .sslciphdefault
%patch39 -p1 -b .sslprotdefault
%patch58 -p1 -b .r1738878
-%patch59 -p1 -b .r1555631
%patch60 -p1 -b .enable-sslv3
# Patch in the vendor string
@@ -735,6 +729,9 @@ exit $rv
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Wed Oct 31 2018 Joe Orton - 2.4.37-1
+- update to 2.4.37
+
* Wed Oct 31 2018 Joe Orton - 2.4.34-11
- add htcacheclean.service(8) man page
diff --git a/sources b/sources
index 1840642..ca284fa 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (httpd-2.4.34.tar.bz2) = 2bc09213f08a4722e305929fbac5f5060c7a8444704494894bb9b61f17e4d20bb6e3d663bb93fc5b2030b04a43fb12373d260cc291422b210b299725aaf3b5c8
+SHA512 (httpd-2.4.37.tar.bz2) = e802915801bbe885a65dada04b0116d145b293fabfff734dddb61a79ca1c6d65326f51155d1b864b093c3ec00d0bdfdf1401ab55677bae1ea3da1d199d7bcad4
From 920857b24c5741e97e50809b3d176eb5c543f25d Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Wed, 31 Oct 2018 12:19:33 +0000
Subject: [PATCH 140/359] add DefaultStateDir/ap_state_dir_relative()
mod_dav_fs: use state dir for default DAVLockDB mod_md: use state dir for
default MDStoreDir
---
httpd-2.4.33-mddefault.patch | 21 ---
httpd-2.4.37-r1842929+.patch | 317 +++++++++++++++++++++++++++++++++++
httpd.spec | 11 +-
3 files changed, 325 insertions(+), 24 deletions(-)
delete mode 100644 httpd-2.4.33-mddefault.patch
create mode 100644 httpd-2.4.37-r1842929+.patch
diff --git a/httpd-2.4.33-mddefault.patch b/httpd-2.4.33-mddefault.patch
deleted file mode 100644
index 9e82fb8..0000000
--- a/httpd-2.4.33-mddefault.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-
-Override default.
-
---- httpd-2.4.33/modules/md/mod_md_config.c.mddefault
-+++ httpd-2.4.33/modules/md/mod_md_config.c
-@@ -54,10 +54,14 @@
-
- #define DEF_VAL (-1)
-
-+#ifndef MD_DEFAULT_STORE_DIR
-+#define MD_DEFAULT_STORE_DIR "state/md"
-+#endif
-+
- /* Default settings for the global conf */
- static md_mod_conf_t defmc = {
- NULL,
-- "md",
-+ MD_DEFAULT_STORE_DIR,
- NULL,
- NULL,
- 80,
diff --git a/httpd-2.4.37-r1842929+.patch b/httpd-2.4.37-r1842929+.patch
new file mode 100644
index 0000000..c6aa1f7
--- /dev/null
+++ b/httpd-2.4.37-r1842929+.patch
@@ -0,0 +1,317 @@
+# ./pullrev.sh 1842929 1842931
+http://svn.apache.org/viewvc?view=revision&revision=1842929
+http://svn.apache.org/viewvc?view=revision&revision=1842931
+
+--- httpd-2.4.37/acinclude.m4.r1842929+
++++ httpd-2.4.37/acinclude.m4
+@@ -45,6 +45,7 @@
+ APACHE_SUBST(installbuilddir)
+ APACHE_SUBST(runtimedir)
+ APACHE_SUBST(proxycachedir)
++ APACHE_SUBST(statedir)
+ APACHE_SUBST(other_targets)
+ APACHE_SUBST(progname)
+ APACHE_SUBST(prefix)
+@@ -663,6 +664,7 @@
+ APACHE_SUBST_EXPANDED_ARG(runtimedir)
+ APACHE_SUBST_EXPANDED_ARG(logfiledir)
+ APACHE_SUBST_EXPANDED_ARG(proxycachedir)
++ APACHE_SUBST_EXPANDED_ARG(statedir)
+ ])
+
+ dnl
+--- httpd-2.4.37/config.layout.r1842929+
++++ httpd-2.4.37/config.layout
+@@ -29,6 +29,7 @@
+ includedir: ${prefix}/include
+ localstatedir: ${prefix}
+ runtimedir: ${localstatedir}/logs
++ statedir: ${localstatedir}/state
+ logfiledir: ${localstatedir}/logs
+ proxycachedir: ${localstatedir}/proxy
+
+@@ -54,6 +55,7 @@
+ includedir: ${prefix}/include+
+ localstatedir: ${prefix}/var+
+ runtimedir: ${localstatedir}/run
++ statedir: ${localstatedir}/state
+ logfiledir: ${localstatedir}/log
+ proxycachedir: ${localstatedir}/proxy
+
+@@ -78,6 +80,7 @@
+ includedir: /System/Library/Frameworks/Apache.framework/Versions/2.0/Headers
+ localstatedir: /var
+ runtimedir: ${prefix}/Logs
++ statedir: ${prefix}/State
+ logfiledir: ${prefix}/Logs
+ proxycachedir: ${prefix}/ProxyCache
+
+@@ -102,6 +105,7 @@
+ includedir: ${prefix}/include+
+ localstatedir: /var
+ runtimedir: ${localstatedir}/run
++ statedir: ${localstatedir}/state
+ logfiledir: ${localstatedir}/log+
+ proxycachedir: ${runtimedir}/proxy
+
+@@ -126,6 +130,7 @@
+ includedir: ${prefix}/include/apache
+ localstatedir: /var
+ runtimedir: ${localstatedir}/run
++ statedir: ${localstatedir}/lib/httpd
+ logfiledir: ${localstatedir}/log/httpd
+ proxycachedir: ${localstatedir}/cache/httpd
+
+@@ -151,6 +156,7 @@
+ includedir: ${prefix}/include/httpd
+ runtimedir: /run/httpd
+ logfiledir: ${localstatedir}/log/httpd
++ statedir: ${localstatedir}/lib/httpd
+ proxycachedir: ${localstatedir}/cache/httpd/proxy
+
+
+@@ -175,6 +181,7 @@
+ localstatedir: /var${prefix}
+ runtimedir: ${localstatedir}/run
+ logfiledir: ${localstatedir}/logs
++ statedir: ${localstatedir}/state
+ proxycachedir: ${localstatedir}/proxy
+
+
+@@ -197,6 +204,7 @@
+ cgidir: ${datadir}/cgi-bin
+ includedir: ${prefix}/include/apache
+ localstatedir: /var/lib/httpd
++ statedir: ${localstatedir}
+ runtimedir: /var/run
+ logfiledir: /var/log/httpd
+ proxycachedir: /var/cache/httpd
+@@ -223,6 +231,7 @@
+ localstatedir: /var
+ runtimedir: ${localstatedir}/run
+ logfiledir: ${localstatedir}/log/httpd
++ statedir: ${prefix}/state
+ proxycachedir: ${localstatedir}/proxy
+
+
+@@ -246,6 +255,7 @@
+ includedir: ${exec_prefix}/include
+ localstatedir: ${prefix}
+ runtimedir: /var/run
++ statedir: ${datadir}/state
+ logfiledir: ${datadir}/logs
+ proxycachedir: ${datadir}/proxy
+
+@@ -271,6 +281,7 @@
+ localstatedir: ${prefix}
+ runtimedir: ${prefix}/logs
+ logfiledir: ${prefix}/logs
++ statedir: ${prefix}/state
+ proxycachedir: ${prefix}/proxy
+
+
+@@ -315,6 +326,7 @@
+ cgidir: ${prefix}/usr/lib/cgi-bin
+ includedir: ${exec_prefix}/include/apache2
+ localstatedir: ${prefix}/var/lock/apache2
++ statedir: ${prefix}/var/lib/apache2
+ runtimedir: ${prefix}/var/run/apache2
+ logfiledir: ${prefix}/var/log/apache2
+ proxycachedir: ${prefix}/var/cache/apache2/proxy
+@@ -343,6 +355,7 @@
+ manualdir: ${datadir}/manual
+ cgidir: ${datadir}/cgi-bin
+ runtimedir: ${localstatedir}/run
++ runtimedir: ${localstatedir}/lib/httpd
+ logfiledir: ${localstatedir}/log/httpd
+ proxycachedir: ${localstatedir}/cache/httpd/cache-root
+
+@@ -366,6 +379,7 @@
+ manualdir: ${prefix}/manual
+ includedir: ${prefix}/include
+ localstatedir: /var/httpd
++ statedir: ${localstatedir}/state
+ runtimedir: ${localstatedir}/run
+ logfiledir: ${localstatedir}/logs
+ proxycachedir: ${localstatedir}/proxy
+@@ -391,6 +405,7 @@
+ includedir: ${prefix}/include/httpd
+ localstatedir: /var
+ runtimedir: ${localstatedir}/run/httpd
++ statedir: ${localstatedir}/lib/httpd
+ logfiledir: ${localstatedir}/log/httpd
+ proxycachedir: ${localstatedir}/cache/httpd
+
+--- httpd-2.4.37/configure.in.r1842929+
++++ httpd-2.4.37/configure.in
+@@ -41,7 +41,7 @@
+ AC_PREFIX_DEFAULT(/usr/local/apache2)
+
+ dnl Get the layout here, so we can pass the required variables to apr
+-APR_ENABLE_LAYOUT(Apache, [errordir iconsdir htdocsdir cgidir])
++APR_ENABLE_LAYOUT(Apache, [errordir iconsdir htdocsdir cgidir statedir])
+
+ dnl reparse the configure arguments.
+ APR_PARSE_ARGUMENTS
+--- httpd-2.4.37/include/ap_config_layout.h.in.r1842929+
++++ httpd-2.4.37/include/ap_config_layout.h.in
+@@ -60,5 +60,7 @@
+ #define DEFAULT_REL_LOGFILEDIR "@rel_logfiledir@"
+ #define DEFAULT_EXP_PROXYCACHEDIR "@exp_proxycachedir@"
+ #define DEFAULT_REL_PROXYCACHEDIR "@rel_proxycachedir@"
++#define DEFAULT_EXP_STATEDIR "@exp_statedir@"
++#define DEFAULT_REL_STATEDIR "@rel_statedir@"
+
+ #endif /* AP_CONFIG_LAYOUT_H */
+--- httpd-2.4.37/include/http_config.h.r1842929+
++++ httpd-2.4.37/include/http_config.h
+@@ -757,6 +757,14 @@
+ */
+ AP_DECLARE(char *) ap_runtime_dir_relative(apr_pool_t *p, const char *fname);
+
++/**
++ * Compute the name of a persistent state file (e.g. a database or
++ * long-lived cache) relative to the appropriate state directory.
++ * Absolute paths are returned as-is. The state directory is
++ * configured via the DefaultStateDir directive or at build time.
++ */
++AP_DECLARE(char *) ap_state_dir_relative(apr_pool_t *p, const char *fname);
++
+ /* Finally, the hook for dynamically loading modules in... */
+
+ /**
+--- httpd-2.4.37/Makefile.in.r1842929+
++++ httpd-2.4.37/Makefile.in
+@@ -213,6 +213,7 @@
+ install-other:
+ @test -d $(DESTDIR)$(logfiledir) || $(MKINSTALLDIRS) $(DESTDIR)$(logfiledir)
+ @test -d $(DESTDIR)$(runtimedir) || $(MKINSTALLDIRS) $(DESTDIR)$(runtimedir)
++ @test -d $(DESTDIR)$(statedir) || $(MKINSTALLDIRS) $(DESTDIR)$(statedir)
+ @for ext in dll x; do \
+ file=apachecore.$$ext; \
+ if test -f $$file; then \
+--- httpd-2.4.37/modules/dav/fs/mod_dav_fs.c.r1842929+
++++ httpd-2.4.37/modules/dav/fs/mod_dav_fs.c
+@@ -29,6 +29,10 @@
+
+ extern module AP_MODULE_DECLARE_DATA dav_fs_module;
+
++#ifndef DEFAULT_DAV_LOCKDB
++#define DEFAULT_DAV_LOCKDB "davlockdb"
++#endif
++
+ const char *dav_get_lockdb_path(const request_rec *r)
+ {
+ dav_fs_server_conf *conf;
+@@ -39,7 +43,11 @@
+
+ static void *dav_fs_create_server_config(apr_pool_t *p, server_rec *s)
+ {
+- return apr_pcalloc(p, sizeof(dav_fs_server_conf));
++ dav_fs_server_conf *conf = apr_pcalloc(p, sizeof(dav_fs_server_conf));
++
++ conf->lockdb_path = ap_state_dir_relative(p, DEFAULT_DAV_LOCKDB);
++
++ return conf;
+ }
+
+ static void *dav_fs_merge_server_config(apr_pool_t *p,
+--- httpd-2.4.37/modules/md/mod_md_config.c.r1842929+
++++ httpd-2.4.37/modules/md/mod_md_config.c
+@@ -54,10 +54,14 @@
+
+ #define DEF_VAL (-1)
+
++#ifndef MD_DEFAULT_BASE_DIR
++#define MD_DEFAULT_BASE_DIR "state/md"
++#endif
++
+ /* Default settings for the global conf */
+ static md_mod_conf_t defmc = {
+ NULL,
+- "md",
++ NULL,
+ NULL,
+ NULL,
+ 80,
+@@ -112,6 +116,7 @@
+ memcpy(mod_md_config, &defmc, sizeof(*mod_md_config));
+ mod_md_config->mds = apr_array_make(pool, 5, sizeof(const md_t *));
+ mod_md_config->unused_names = apr_array_make(pool, 5, sizeof(const md_t *));
++ mod_md_config->base_dir = ap_state_dir_relative(pool, MD_DEFAULT_BASE_DIR);
+
+ apr_pool_cleanup_register(pool, NULL, cleanup_mod_config, apr_pool_cleanup_null);
+ }
+--- httpd-2.4.37/server/core.c.r1842929+
++++ httpd-2.4.37/server/core.c
+@@ -129,6 +129,8 @@
+ AP_DECLARE_DATA int ap_run_mode = AP_SQ_RM_UNKNOWN;
+ AP_DECLARE_DATA int ap_config_generation = 0;
+
++static const char *core_state_dir;
++
+ static void *create_core_dir_config(apr_pool_t *a, char *dir)
+ {
+ core_dir_config *conf;
+@@ -3104,6 +3106,24 @@
+ return NULL;
+ }
+
++static const char *set_state_dir(cmd_parms *cmd, void *dummy, const char *arg)
++{
++ const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
++
++ if (err != NULL) {
++ return err;
++ }
++
++ if ((apr_filepath_merge((char**)&core_state_dir, NULL,
++ ap_server_root_relative(cmd->temp_pool, arg),
++ APR_FILEPATH_TRUENAME, cmd->pool) != APR_SUCCESS)
++ || !ap_is_directory(cmd->temp_pool, core_state_dir)) {
++ return "DefaultStateDir must be a valid directory, absolute or relative to ServerRoot";
++ }
++
++ return NULL;
++}
++
+ static const char *set_timeout(cmd_parms *cmd, void *dummy, const char *arg)
+ {
+ const char *err = ap_check_cmd_context(cmd, NOT_IN_DIR_CONTEXT);
+@@ -4398,6 +4418,8 @@
+ "Common directory of server-related files (logs, confs, etc.)"),
+ AP_INIT_TAKE1("DefaultRuntimeDir", set_runtime_dir, NULL, RSRC_CONF | EXEC_ON_READ,
+ "Common directory for run-time files (shared memory, locks, etc.)"),
++AP_INIT_TAKE1("DefaultStateDir", set_state_dir, NULL, RSRC_CONF | EXEC_ON_READ,
++ "Common directory for persistent state (databases, long-lived caches, etc.)"),
+ AP_INIT_TAKE1("ErrorLog", set_server_string_slot,
+ (void *)APR_OFFSETOF(server_rec, error_fname), RSRC_CONF,
+ "The filename of the error log"),
+@@ -5150,6 +5172,27 @@
+ }
+ }
+
++AP_DECLARE(char *) ap_state_dir_relative(apr_pool_t *p, const char *file)
++{
++ char *newpath = NULL;
++ apr_status_t rv;
++ const char *state_dir;
++
++ state_dir = core_state_dir
++ ? core_state_dir
++ : ap_server_root_relative(p, DEFAULT_REL_STATEDIR);
++
++ rv = apr_filepath_merge(&newpath, state_dir, file, APR_FILEPATH_TRUENAME, p);
++ if (newpath && (rv == APR_SUCCESS || APR_STATUS_IS_EPATHWILD(rv)
++ || APR_STATUS_IS_ENOENT(rv)
++ || APR_STATUS_IS_ENOTDIR(rv))) {
++ return newpath;
++ }
++ else {
++ return NULL;
++ }
++}
++
+ static apr_random_t *rng = NULL;
+ #if APR_HAS_THREADS
+ static apr_thread_mutex_t *rng_mutex = NULL;
diff --git a/httpd.spec b/httpd.spec
index 156716f..e40e04d 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -13,7 +13,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.37
-Release: 1%{?dist}
+Release: 2%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -63,7 +63,7 @@ Patch6: httpd-2.4.34-apctlsystemd.patch
# Needed for socket activation and mod_systemd patch
Patch19: httpd-2.4.25-detect-systemd.patch
# Features/functional changes
-Patch21: httpd-2.4.33-mddefault.patch
+Patch21: httpd-2.4.37-r1842929+.patch
Patch23: httpd-2.4.33-export.patch
Patch24: httpd-2.4.1-corelimit.patch
Patch25: httpd-2.4.25-selinux.patch
@@ -224,7 +224,7 @@ interface for storing and accessing per-user session data.
%patch19 -p1 -b .detectsystemd
-%patch21 -p1 -b .mddefault
+%patch21 -p1 -b .r1842929+
%patch23 -p1 -b .export
%patch24 -p1 -b .corelimit
%patch25 -p1 -b .selinux
@@ -729,6 +729,11 @@ exit $rv
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Wed Oct 31 2018 Joe Orton - 2.4.37-2
+- add DefaultStateDir/ap_state_dir_relative()
+- mod_dav_fs: use state dir for default DAVLockDB
+- mod_md: use state dir for default MDStoreDir
+
* Wed Oct 31 2018 Joe Orton - 2.4.37-1
- update to 2.4.37
From 25b89a94797bf63979497969ba7cc961359bf5c5 Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Fri, 2 Nov 2018 11:07:11 +0000
Subject: [PATCH 141/359] Fix grammar.
---
htcacheclean.service.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/htcacheclean.service.xml b/htcacheclean.service.xml
index d771ae7..01b68e4 100644
--- a/htcacheclean.service.xml
+++ b/htcacheclean.service.xml
@@ -50,7 +50,7 @@
This manual page describes the systemd
unit file for the htcacheclean daemon. This
unit file provides a service which runs
- htcacheclean is run in daemon mode,
+ htcacheclean in daemon mode,
periodically cleaning the disk cache root to ensure disk space
usage is within configured limits.
From 2fa14eded508bce407d4c70ce1a1b983f5cfc55d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lubo=C5=A1=20Uhliarik?=
Date: Wed, 7 Nov 2018 12:38:50 +0100
Subject: [PATCH 142/359] Resolves: #1647241 - fix apachectl script
---
httpd-2.4.34-apctlsystemd.patch | 2 +-
httpd.spec | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/httpd-2.4.34-apctlsystemd.patch b/httpd-2.4.34-apctlsystemd.patch
index 996978c..20d7101 100644
--- a/httpd-2.4.34-apctlsystemd.patch
+++ b/httpd-2.4.34-apctlsystemd.patch
@@ -26,7 +26,7 @@ Upstream-Status: vendor specific patch
+if [ "x$2" != "x" ] ; then
+ echo Passing arguments to httpd using apachectl is no longer supported.
+ echo You can only start/stop/restart httpd using this script.
-+ echo To pass extra arguments to httpd, see the httpd.service(8)
++ echo "To pass extra arguments to httpd, see the httpd.service(8)"
+ echo man page.
+fi
+
diff --git a/httpd.spec b/httpd.spec
index e40e04d..f242ddb 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -13,7 +13,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.37
-Release: 2%{?dist}
+Release: 3%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -729,6 +729,9 @@ exit $rv
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Wed Nov 07 2018 Luboš Uhliarik - 2.4.37-3
+- Resolves: #1647241 - fix apachectl script
+
* Wed Oct 31 2018 Joe Orton - 2.4.37-2
- add DefaultStateDir/ap_state_dir_relative()
- mod_dav_fs: use state dir for default DAVLockDB
From 36d7a682414a54ad9b7c6a1a0b1dba29a52304df Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Thu, 8 Nov 2018 17:13:42 +0000
Subject: [PATCH 143/359] add httpd.conf(5) (#1611361) Resolves: rhbz#1611361
---
.gitignore | 1 +
README.confd | 4 +-
README.confmod | 3 +-
httpd.conf | 3 +
httpd.conf.xml | 260 ++++++++++++++++++++++++++++++++++++++++++++++
httpd.service.xml | 16 +--
httpd.spec | 22 +++-
7 files changed, 290 insertions(+), 19 deletions(-)
create mode 100644 httpd.conf.xml
diff --git a/.gitignore b/.gitignore
index 00acede..bdeafe7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -32,3 +32,4 @@ x86_64
/httpd*.8
/results_httpd
/htcacheclean.service.8
+/httpd.conf.5
diff --git a/README.confd b/README.confd
index f5e9661..6071deb 100644
--- a/README.confd
+++ b/README.confd
@@ -5,5 +5,5 @@ processed as httpd configuration files. The directory is used in
addition to the directory /etc/httpd/conf.modules.d/, which contains
configuration files necessary to load modules.
-Files are processed in alphabetical order.
-
+Files are processed in sorted order. See httpd.conf(5) for more
+information.
diff --git a/README.confmod b/README.confmod
index d33d1d4..f4b055d 100644
--- a/README.confmod
+++ b/README.confmod
@@ -6,4 +6,5 @@ configuration fragments necessary only to load modules.
Administrators should use the directory "/etc/httpd/conf.d" to modify
the configuration of httpd, or any modules.
-Files are processed in alphanumeric order.
+Files are processed in sorted order and should have a two digit
+numeric prefix. See httpd.conf(5) for more information.
diff --git a/httpd.conf b/httpd.conf
index a7af0dc..6ab68cb 100644
--- a/httpd.conf
+++ b/httpd.conf
@@ -6,6 +6,9 @@
#
# for a discussion of each configuration directive.
#
+# See the httpd.conf(5) man page for more information on this configuration,
+# and httpd.service(8) on using and configuring the httpd service.
+#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
# consult the online docs. You have been warned.
diff --git a/httpd.conf.xml b/httpd.conf.xml
new file mode 100644
index 0000000..fdf02b7
--- /dev/null
+++ b/httpd.conf.xml
@@ -0,0 +1,260 @@
+
+
+
+
+
+
+ httpd.conf
+ httpd
+ AuthorOrtonJoejorton@redhat.com
+
+
+
+ httpd.conf
+ 5
+
+
+
+ httpd.conf
+ Configuration files for httpd
+
+
+
+
+ /etc/httpd/conf/httpd.conf,
+ /etc/httpd/conf.modules.d,
+ /etc/httpd/conf.d
+
+
+
+
+ Description
+
+ The httpd daemon uses a main
+ configuration file at
+ /etc/httpd/conf/httpd.conf. The syntax of
+ this file is described at , and
+ the full set of available directives at .
+
+
+
+ Configuration structure
+
+ The main configuration file
+ (httpd.conf) sets up various defaults and
+ includes configuration files from two directories -
+ /etc/httpd/conf.modules.d and
+ /etc/httpd/conf.d. Packages containing
+ loadable modules (like ) place files
+ in the conf.modules.d directory with the
+ appropriate directive so that module
+ is loaded by default.
+
+ Some notable configured defaults are:.
+
+
+
+
+ The default document root from which content
+ is served.
+
+
+
+ The daemon lists on TCP port 80.
+
+
+
+ Error messages are logged to
+ @LOGDIR@/error_log.
+
+
+
+ CGI scripts are served via the URL-path .
+
+
+
+
+ To remove any of the default configuration provided in
+ separate files covered below, replace that file with an empty
+ file rather than removing it from the filesystem, otherwise it
+ may be restored to the original when the package which provides
+ it is upgraded.
+
+
+
+
+ MPM configuration
+
+ The configuration file at
+ /etc/httpd/conf.modules.d/00-mpm.conf is
+ used to select the multi-processing module (MPM), which governs
+ how httpd divides work between processes
+ and/or threads at run-time. Exactly one
+ directive must be uncommented in
+ this file; by default the MPM is enabled.
+ For more information on MPMs, see .
+
+ If using the prefork MPM, the
+ "httpd_graceful_shutdown" SELinux boolean should also be
+ enabled, since with this MPM, httpd needs to establish TCP
+ connections to local ports to successfully complete a graceful
+ restart or shutdown. This boolean can be enabled by running the
+ command: semanage boolean -m --on
+ httpd_graceful_shutdown
+
+
+
+ Module configuration files
+
+ Module configuration files are provided in the
+ /etc/httpd/conf.modules.d/ directory, with
+ names which are by convention prefixed with two digit numeric
+ prefix to ensure they are processed in the desired order. Core
+ modules provide with the httpd package are
+ loaded by files with a prefix to ensure
+ these are loaded first. Only filenames with a
+ suffix in this directory will be
+ processed.
+
+ Other provided configuration files are listed below.
+
+
+
+ /etc/httpd/conf.modules.d/00-base.conf
+ The set of core modules included with
+ httpd which are all loaded by
+ default.
+
+
+
+ /etc/httpd/conf.modules.d/00-optional.conf
+ The set of non-core modules included with
+ httpd which are not
+ loaded by default.
+
+
+
+
+ /etc/httpd/conf.modules.d/00-systemd.conf
+ This file loads
+ which is necessary for the correct operation of the
+ httpd.service service, and should not be
+ removed or disabled.
+
+
+
+
+
+
+ Other configuration files
+
+ Default module configuration files and site-specific
+ configuration files are loaded from the
+ /etc/httpd/conf.d/ directory. Only files
+ with a suffix will be loaded. The
+ following files are provided:
+
+
+
+ /etc/httpd/conf.d/userdir.conf
+ This file gives an example configuration for
+ to map URLs such as
+ to
+ /home/jim/public_html/. Userdir mapping
+ is disabled by default.
+
+
+
+ /etc/httpd/conf.d/autoindex.conf
+ This file provides the default configuration
+ for which generates HTML
+ directory listings when enabled. It also makes file icon
+ image files available at the
+ URL-path.
+
+
+
+ /etc/httpd/conf.d/welcome.conf
+ This file enables a "welcome page" at
+ if no content is present
+ in the default documentation root
+ /var/www/html.
+
+
+
+ /etc/httpd/conf.d/ssl.conf (present only if is installed)
+ This file configures a TLS
+ listening on port
+ . If the default configuration is used,
+ the referenced test certificate and private key are
+ generated the first time httpd.service is
+ started; see
+ httpd-init.service8
+ for more information.
+
+
+
+
+
+
+ Instantiated services
+
+ As an alternative to (or in addition to) the
+ httpd.service unit, the instatiated template
+ service httpd@.service unit file can be used,
+ which starts httpd using a different
+ configuration file to the default. For example,
+ systemctl start httpd@foobar.service will
+ start httpd using the configuration file
+ /etc/httpd/conf/foobar.conf. See httpd@.service8 for more information.
+
+
+
+
+ Files
+
+
+ /etc/httpd/conf/httpd.conf,
+ /etc/httpd/conf.d,
+ /etc/httpd/conf.modules.d
+
+
+
+
+ See also
+
+
+ httpd8,
+ httpd.service8,
+ ,
+
+
+
+
+
+
+
diff --git a/httpd.service.xml b/httpd.service.xml
index 4a6038d..b2c72dd 100644
--- a/httpd.service.xml
+++ b/httpd.service.xml
@@ -188,17 +188,10 @@ Wants=network-online.target
httpd offers a choice of multi-processing modules (MPMs),
which can be configured in
- /etc/httpd/conf.modules.d/00-mpm.conf. The
- default is to use the @MPM@ MPM.
-
- If using the prefork MPM, the
- "httpd_graceful_shutdown" SELinux boolean should also be
- enabled, since with this MPM, httpd needs to establish TCP
- connections to local ports to successfully complete a graceful
- restart or shutdown. This boolean can be enabled by running the
- command: semanage boolean -m --on
- httpd_graceful_shutdown
-
+ /etc/httpd/conf.modules.d/00-mpm.conf.
+ See
+ httpd.conf5
+ for more information on changing the MPM.
@@ -322,6 +315,7 @@ ReloadPropagatedFrom=httpd.service
httpd8,
+ httpd.conf5,
systemd1,
systemctl1,
systemd.service5,
diff --git a/httpd.spec b/httpd.spec
index f242ddb..5f68c0b 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -13,7 +13,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.37
-Release: 3%{?dist}
+Release: 4%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -266,11 +266,16 @@ if test "x${vmmn}" != "x%{mmn}"; then
exit 1
fi
-sed 's/@MPM@/%{mpm}/' < $RPM_SOURCE_DIR/httpd.service.xml \
- > httpd.service.xml
+sed '
+s,@MPM@,%{mpm},g
+s,@DOCROOT@,%{docroot},g
+s,@LOGDIR@,%{_localstatedir}/log/httpd,g
+' < $RPM_SOURCE_DIR/httpd.conf.xml \
+ > httpd.conf.xml
-xmlto man ./httpd.service.xml
+xmlto man ./httpd.conf.xml
xmlto man $RPM_SOURCE_DIR/htcacheclean.service.xml
+xmlto man $RPM_SOURCE_DIR/httpd.service.xml
: Building with MMN %{mmn}, MMN-ISA %{mmnisa}
: Default MPM is %{mpm}, vendor string is '%{vstring}'
@@ -491,10 +496,13 @@ mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
install -m 644 -p $RPM_SOURCE_DIR/httpd.logrotate \
$RPM_BUILD_ROOT/etc/logrotate.d/httpd
-# Install systemd service man pages
+# Install man pages
+install -d $RPM_BUILD_ROOT%{_mandir}/man8 $RPM_BUILD_ROOT%{_mandir}/man5
install -m 644 -p httpd.service.8 httpd-init.service.8 httpd.socket.8 \
httpd@.service.8 htcacheclean.service.8 \
$RPM_BUILD_ROOT%{_mandir}/man8
+install -m 644 -p httpd.conf.5 \
+ $RPM_BUILD_ROOT%{_mandir}/man5
# fix man page paths
sed -e "s|/usr/local/apache2/conf/httpd.conf|/etc/httpd/conf/httpd.conf|" \
@@ -660,6 +668,7 @@ exit $rv
%attr(0700,apache,apache) %dir %{_localstatedir}/cache/httpd/proxy
%{_mandir}/man8/*
+%{_mandir}/man5/*
%exclude %{_mandir}/man8/httpd-init.*
%{_unitdir}/httpd.service
@@ -729,6 +738,9 @@ exit $rv
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Thu Nov 8 2018 Joe Orton - 2.4.37-4
+- add httpd.conf(5) (#1611361)
+
* Wed Nov 07 2018 Luboš Uhliarik - 2.4.37-3
- Resolves: #1647241 - fix apachectl script
From f7bb212f408bbcd0ffd3c6b0fb1ae7975c41d772 Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Fri, 9 Nov 2018 09:01:23 +0000
Subject: [PATCH 144/359] add httpd.conf(5) (#1611361) Resolves: rhbz#1611361
---
00-mpm.conf | 2 +-
httpd.spec | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/00-mpm.conf b/00-mpm.conf
index b15f913..a4a70b8 100644
--- a/00-mpm.conf
+++ b/00-mpm.conf
@@ -1,5 +1,5 @@
# Select the MPM module which should be used by uncommenting exactly
-# one of the following LoadModule lines. See the httpd.service(8) man
+# one of the following LoadModule lines. See the httpd.conf(5) man
# page for more information on changing the MPM.
# prefork MPM: Implements a non-threaded, pre-forking web server
diff --git a/httpd.spec b/httpd.spec
index 5f68c0b..715a9e8 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -50,6 +50,7 @@ Source30: README.confd
Source31: README.confmod
Source32: httpd.service.xml
Source33: htcacheclean.service.xml
+Source34: httpd.conf.xml
Source40: htcacheclean.service
Source41: htcacheclean.sysconf
Source42: httpd-init.service
From affd30da6fb6cf7a15bdcadca606a84a42eeecc1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lubo=C5=A1=20Uhliarik?=
Date: Fri, 23 Nov 2018 11:11:59 +0100
Subject: [PATCH 145/359] Resolves: #1652678 - TLS connection allowed while all
protocols are forbidden
---
httpd-2.4.34-sslprotdefault.patch | 53 -----------------
httpd-2.4.37-sslprotdefault.patch | 98 +++++++++++++++++++++++++++++++
httpd.spec | 7 ++-
3 files changed, 103 insertions(+), 55 deletions(-)
delete mode 100644 httpd-2.4.34-sslprotdefault.patch
create mode 100644 httpd-2.4.37-sslprotdefault.patch
diff --git a/httpd-2.4.34-sslprotdefault.patch b/httpd-2.4.34-sslprotdefault.patch
deleted file mode 100644
index 65f8d40..0000000
--- a/httpd-2.4.34-sslprotdefault.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-
-https://bugzilla.redhat.com/show_bug.cgi?id=1618371
-
---- httpd-2.4.34/modules/ssl/ssl_engine_config.c.sslprotdefault
-+++ httpd-2.4.34/modules/ssl/ssl_engine_config.c
-@@ -119,7 +119,7 @@
- mctx->ticket_key = NULL;
- #endif
-
-- mctx->protocol = SSL_PROTOCOL_DEFAULT;
-+ mctx->protocol = SSL_PROTOCOL_NONE;
- mctx->protocol_set = 0;
-
- mctx->pphrase_dialog_type = SSL_PPTYPE_UNSET;
---- httpd-2.4.34/modules/ssl/ssl_engine_init.c.sslprotdefault
-+++ httpd-2.4.34/modules/ssl/ssl_engine_init.c
-@@ -555,9 +555,8 @@
- * Create the new per-server SSL context
- */
- if (protocol == SSL_PROTOCOL_NONE) {
-- ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(02231)
-- "No SSL protocols available [hint: SSLProtocol]");
-- return ssl_die(s);
-+ ap_log_error(APLOG_MARK, APLOG_TRACE3, 0, s,
-+ "Using OpenSSL/system default SSL/TLS protocols");
- }
-
- cp = apr_pstrcat(p,
-@@ -673,14 +672,8 @@
- } else if (protocol & SSL_PROTOCOL_SSLV3) {
- prot = SSL3_VERSION;
- #endif
-- } else {
-- SSL_CTX_free(ctx);
-- mctx->ssl_ctx = NULL;
-- ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(03378)
-- "No SSL protocols available [hint: SSLProtocol]");
-- return ssl_die(s);
- }
-- SSL_CTX_set_max_proto_version(ctx, prot);
-+ if (protocol != SSL_PROTOCOL_NONE) SSL_CTX_set_max_proto_version(ctx, prot);
-
- /* Next we scan for the minimal protocol version we should provide,
- * but we do not allow holes between max and min */
-@@ -700,7 +693,7 @@
- prot = SSL3_VERSION;
- }
- #endif
-- SSL_CTX_set_min_proto_version(ctx, prot);
-+ if (protocol != SSL_PROTOCOL_NONE) SSL_CTX_set_min_proto_version(ctx, prot);
- #endif /* if OPENSSL_VERSION_NUMBER < 0x10100000L */
-
- #ifdef SSL_OP_CIPHER_SERVER_PREFERENCE
diff --git a/httpd-2.4.37-sslprotdefault.patch b/httpd-2.4.37-sslprotdefault.patch
new file mode 100644
index 0000000..546fa1f
--- /dev/null
+++ b/httpd-2.4.37-sslprotdefault.patch
@@ -0,0 +1,98 @@
+diff --git a/modules/ssl/ssl_engine_config.c b/modules/ssl/ssl_engine_config.c
+index 55c237e..5467d23 100644
+--- a/modules/ssl/ssl_engine_config.c
++++ b/modules/ssl/ssl_engine_config.c
+@@ -119,7 +119,7 @@ static void modssl_ctx_init(modssl_ctx_t *mctx, apr_pool_t *p)
+ mctx->ticket_key = NULL;
+ #endif
+
+- mctx->protocol = SSL_PROTOCOL_DEFAULT;
++ mctx->protocol = SSL_PROTOCOL_NONE;
+ mctx->protocol_set = 0;
+
+ mctx->pphrase_dialog_type = SSL_PPTYPE_UNSET;
+@@ -262,6 +262,7 @@ static void modssl_ctx_cfg_merge(apr_pool_t *p,
+ {
+ if (add->protocol_set) {
+ mrg->protocol = add->protocol;
++ mrg->protocol_set = 1;
+ }
+ else {
+ mrg->protocol = base->protocol;
+diff --git a/modules/ssl/ssl_engine_init.c b/modules/ssl/ssl_engine_init.c
+index e3f62fe..31fc0e6 100644
+--- a/modules/ssl/ssl_engine_init.c
++++ b/modules/ssl/ssl_engine_init.c
+@@ -568,6 +568,7 @@ static apr_status_t ssl_init_ctx_protocol(server_rec *s,
+ MODSSL_SSL_METHOD_CONST SSL_METHOD *method = NULL;
+ char *cp;
+ int protocol = mctx->protocol;
++ int protocol_set = mctx->protocol_set;
+ SSLSrvConfigRec *sc = mySrvConfig(s);
+ #if OPENSSL_VERSION_NUMBER >= 0x10100000L
+ int prot;
+@@ -577,12 +578,18 @@ static apr_status_t ssl_init_ctx_protocol(server_rec *s,
+ * Create the new per-server SSL context
+ */
+ if (protocol == SSL_PROTOCOL_NONE) {
+- ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(02231)
+- "No SSL protocols available [hint: SSLProtocol]");
+- return ssl_die(s);
+- }
++ if (protocol_set) {
++ ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(02231)
++ "No SSL protocols available [hint: SSLProtocol]");
++ return ssl_die(s);
++ }
+
+- cp = apr_pstrcat(p,
++ ap_log_error(APLOG_MARK, APLOG_TRACE3, 0, s,
++ "Using OpenSSL/system default SSL/TLS protocols");
++ cp = "default";
++ }
++ else {
++ cp = apr_pstrcat(p,
+ #ifndef OPENSSL_NO_SSL3
+ (protocol & SSL_PROTOCOL_SSLV3 ? "SSLv3, " : ""),
+ #endif
+@@ -595,7 +602,8 @@ static apr_status_t ssl_init_ctx_protocol(server_rec *s,
+ #endif
+ #endif
+ NULL);
+- cp[strlen(cp)-2] = NUL;
++ cp[strlen(cp)-2] = NUL;
++ }
+
+ ap_log_error(APLOG_MARK, APLOG_TRACE3, 0, s,
+ "Creating new SSL context (protocols: %s)", cp);
+@@ -696,13 +704,15 @@ static apr_status_t ssl_init_ctx_protocol(server_rec *s,
+ prot = SSL3_VERSION;
+ #endif
+ } else {
+- SSL_CTX_free(ctx);
+- mctx->ssl_ctx = NULL;
+- ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(03378)
+- "No SSL protocols available [hint: SSLProtocol]");
+- return ssl_die(s);
++ if (protocol_set) {
++ SSL_CTX_free(ctx);
++ mctx->ssl_ctx = NULL;
++ ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(03378)
++ "No SSL protocols available [hint: SSLProtocol]");
++ return ssl_die(s);
++ }
+ }
+- SSL_CTX_set_max_proto_version(ctx, prot);
++ if (protocol != SSL_PROTOCOL_NONE) SSL_CTX_set_max_proto_version(ctx, prot);
+
+ /* Next we scan for the minimal protocol version we should provide,
+ * but we do not allow holes between max and min */
+@@ -726,7 +736,7 @@ static apr_status_t ssl_init_ctx_protocol(server_rec *s,
+ prot = SSL3_VERSION;
+ }
+ #endif
+- SSL_CTX_set_min_proto_version(ctx, prot);
++ if (protocol != SSL_PROTOCOL_NONE) SSL_CTX_set_min_proto_version(ctx, prot);
+ #endif /* if OPENSSL_VERSION_NUMBER < 0x10100000L */
+
+ #ifdef SSL_OP_CIPHER_SERVER_PREFERENCE
diff --git a/httpd.spec b/httpd.spec
index 715a9e8..8014895 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -13,7 +13,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.37
-Release: 4%{?dist}
+Release: 5%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -76,7 +76,7 @@ Patch31: httpd-2.4.33-sslmultiproxy.patch
Patch34: httpd-2.4.17-socket-activation.patch
Patch36: httpd-2.4.33-r1830819+.patch
Patch38: httpd-2.4.34-sslciphdefault.patch
-Patch39: httpd-2.4.34-sslprotdefault.patch
+Patch39: httpd-2.4.37-sslprotdefault.patch
# Bug fixes
# https://bugzilla.redhat.com/show_bug.cgi?id=1397243
@@ -739,6 +739,9 @@ exit $rv
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Thu Nov 22 2018 Luboš Uhliarik - 2.4.37-5
+- Resolves: #1652678 - TLS connection allowed while all protocols are forbidden
+
* Thu Nov 8 2018 Joe Orton - 2.4.37-4
- add httpd.conf(5) (#1611361)
From 85e5fe0b3f371d4964757099fe0f6d62f8ddf390 Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Fri, 9 Nov 2018 11:46:40 +0000
Subject: [PATCH 146/359] Fix spelling.
---
httpd.conf.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/httpd.conf.xml b/httpd.conf.xml
index fdf02b7..0a7bdc1 100644
--- a/httpd.conf.xml
+++ b/httpd.conf.xml
@@ -223,7 +223,7 @@
Instantiated servicesAs an alternative to (or in addition to) the
- httpd.service unit, the instatiated template
+ httpd.service unit, the instantiated template
service httpd@.service unit file can be used,
which starts httpd using a different
configuration file to the default. For example,
From 8fe3905176a114f7a663edbfc991dc513e82a876 Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Thu, 29 Nov 2018 16:48:09 +0000
Subject: [PATCH 147/359] Wording tweaks.
---
httpd.conf.xml | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/httpd.conf.xml b/httpd.conf.xml
index 0a7bdc1..705e527 100644
--- a/httpd.conf.xml
+++ b/httpd.conf.xml
@@ -50,12 +50,11 @@
Description
- The httpd daemon uses a main
- configuration file at
+ The main configuration file for the httpd daemon is
/etc/httpd/conf/httpd.conf. The syntax of
this file is described at , and
- the full set of available directives at .
@@ -130,8 +129,8 @@
Module configuration filesModule configuration files are provided in the
- /etc/httpd/conf.modules.d/ directory, with
- names which are by convention prefixed with two digit numeric
+ /etc/httpd/conf.modules.d/ directory. Filenames
+ in this directory are by convention prefixed with two digit numeric
prefix to ensure they are processed in the desired order. Core
modules provide with the httpd package are
loaded by files with a prefix to ensure
From e7d5e11589c1bc5d6b9d439d20c1bfe477256428 Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Wed, 19 Dec 2018 16:01:30 +0000
Subject: [PATCH 148/359] Fix typos.
---
httpd.conf.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/httpd.conf.xml b/httpd.conf.xml
index 705e527..3a02111 100644
--- a/httpd.conf.xml
+++ b/httpd.conf.xml
@@ -71,7 +71,7 @@
appropriate directive so that module
is loaded by default.
- Some notable configured defaults are:.
+ Some notable configured defaults are:
@@ -81,7 +81,7 @@
- The daemon lists on TCP port 80.
+ The daemon listens on TCP port 80.
From ccaa54fd8d3aad780b8ee1588e2b77220a47a3d9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?=
Date: Mon, 14 Jan 2019 19:04:04 +0100
Subject: [PATCH 149/359] Rebuilt for libcrypt.so.2 (#1666033)
---
httpd.spec | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/httpd.spec b/httpd.spec
index 8014895..8e3bf09 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -13,7 +13,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.37
-Release: 5%{?dist}
+Release: 6%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -739,6 +739,9 @@ exit $rv
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Mon Jan 14 2019 Björn Esser - 2.4.37-6
+- Rebuilt for libcrypt.so.2 (#1666033)
+
* Thu Nov 22 2018 Luboš Uhliarik - 2.4.37-5
- Resolves: #1652678 - TLS connection allowed while all protocols are forbidden
From 1810bd511f23f55b129cb3b2ecda3b293bb08f63 Mon Sep 17 00:00:00 2001
From: Lubos Uhliarik
Date: Wed, 23 Jan 2019 11:21:32 +0000
Subject: [PATCH 150/359] new version 2.4.38 (#1668125) adjusted patches
---
...819+.patch => httpd-2.4.38-r1830819+.patch | 98 +++++++++----------
httpd.spec | 11 ++-
sources | 2 +-
3 files changed, 52 insertions(+), 59 deletions(-)
rename httpd-2.4.33-r1830819+.patch => httpd-2.4.38-r1830819+.patch (89%)
diff --git a/httpd-2.4.33-r1830819+.patch b/httpd-2.4.38-r1830819+.patch
similarity index 89%
rename from httpd-2.4.33-r1830819+.patch
rename to httpd-2.4.38-r1830819+.patch
index 0b2d90d..01027ce 100644
--- a/httpd-2.4.33-r1830819+.patch
+++ b/httpd-2.4.38-r1830819+.patch
@@ -9,9 +9,11 @@ http://svn.apache.org/viewvc?view=revision&revision=1831173
http://svn.apache.org/viewvc?view=revision&revision=1835240
http://svn.apache.org/viewvc?view=revision&revision=1835242
---- httpd-2.4.33/modules/ssl/ssl_engine_config.c.r1830819+
-+++ httpd-2.4.33/modules/ssl/ssl_engine_config.c
-@@ -891,7 +891,9 @@
+diff --git a/modules/ssl/ssl_engine_config.c b/modules/ssl/ssl_engine_config.c
+index d276fea..5467d23 100644
+--- a/modules/ssl/ssl_engine_config.c
++++ b/modules/ssl/ssl_engine_config.c
+@@ -919,7 +919,9 @@ const char *ssl_cmd_SSLCertificateFile(cmd_parms *cmd,
SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
const char *err;
@@ -22,7 +24,7 @@ http://svn.apache.org/viewvc?view=revision&revision=1835242
return err;
}
-@@ -907,7 +909,9 @@
+@@ -935,7 +937,9 @@ const char *ssl_cmd_SSLCertificateKeyFile(cmd_parms *cmd,
SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
const char *err;
@@ -33,9 +35,11 @@ http://svn.apache.org/viewvc?view=revision&revision=1835242
return err;
}
---- httpd-2.4.33/modules/ssl/ssl_engine_init.c.r1830819+
-+++ httpd-2.4.33/modules/ssl/ssl_engine_init.c
-@@ -1181,12 +1182,18 @@
+diff --git a/modules/ssl/ssl_engine_init.c b/modules/ssl/ssl_engine_init.c
+index 8ba3486..e1b0844 100644
+--- a/modules/ssl/ssl_engine_init.c
++++ b/modules/ssl/ssl_engine_init.c
+@@ -1264,12 +1264,18 @@ static apr_status_t ssl_init_server_certs(server_rec *s,
(certfile = APR_ARRAY_IDX(mctx->pks->cert_files, i,
const char *));
i++) {
@@ -55,7 +59,7 @@ http://svn.apache.org/viewvc?view=revision&revision=1835242
if ((SSL_CTX_use_certificate_file(mctx->ssl_ctx, certfile,
SSL_FILETYPE_PEM) < 1)) {
ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(02561)
-@@ -1215,12 +1222,46 @@
+@@ -1298,12 +1304,46 @@ static apr_status_t ssl_init_server_certs(server_rec *s,
ERR_clear_error();
@@ -107,7 +111,7 @@ http://svn.apache.org/viewvc?view=revision&revision=1835242
const unsigned char *ptr;
ERR_clear_error();
-@@ -1307,8 +1348,9 @@
+@@ -1390,8 +1430,9 @@ static apr_status_t ssl_init_server_certs(server_rec *s,
/*
* Try to read DH parameters from the (first) SSLCertificateFile
*/
@@ -119,7 +123,7 @@ http://svn.apache.org/viewvc?view=revision&revision=1835242
SSL_CTX_set_tmp_dh(mctx->ssl_ctx, dhparams);
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(02540)
"Custom DH parameters (%d bits) for %s loaded from %s",
-@@ -1320,10 +1362,10 @@
+@@ -1403,10 +1444,10 @@ static apr_status_t ssl_init_server_certs(server_rec *s,
/*
* Similarly, try to read the ECDH curve name from SSLCertificateFile...
*/
@@ -134,42 +138,20 @@ http://svn.apache.org/viewvc?view=revision&revision=1835242
SSL_CTX_set_tmp_ecdh(mctx->ssl_ctx, eckey);
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(02541)
"ECDH curve %s for %s specified in %s",
---- httpd-2.4.33/modules/ssl/ssl_engine_pphrase.c.r1830819+
-+++ httpd-2.4.33/modules/ssl/ssl_engine_pphrase.c
-@@ -143,9 +143,6 @@
+diff --git a/modules/ssl/ssl_engine_pphrase.c b/modules/ssl/ssl_engine_pphrase.c
+index 8c29443..d5d33f7 100644
+--- a/modules/ssl/ssl_engine_pphrase.c
++++ b/modules/ssl/ssl_engine_pphrase.c
+@@ -143,8 +143,6 @@ apr_status_t ssl_load_encrypted_pkey(server_rec *s, apr_pool_t *p, int idx,
const char *key_id = asn1_table_vhost_key(mc, p, sc->vhost_id, idx);
EVP_PKEY *pPrivateKey = NULL;
ssl_asn1_t *asn1;
- unsigned char *ucp;
- long int length;
-- BOOL bReadable;
int nPassPhrase = (*pphrases)->nelts;
int nPassPhraseRetry = 0;
apr_time_t pkey_mtime = 0;
-@@ -222,16 +219,12 @@
- * is not empty. */
- ERR_clear_error();
-
-- bReadable = ((pPrivateKey = modssl_read_privatekey(ppcb_arg.pkey_file,
-- NULL, ssl_pphrase_Handle_CB, &ppcb_arg)) != NULL ?
-- TRUE : FALSE);
--
-- /*
-- * when the private key file now was readable,
-- * it's fine and we go out of the loop
-- */
-- if (bReadable)
-- break;
-+ pPrivateKey = modssl_read_privatekey(ppcb_arg.pkey_file,
-+ ssl_pphrase_Handle_CB, &ppcb_arg);
-+ /* If the private key was successfully read, nothing more to
-+ do here. */
-+ if (pPrivateKey != NULL)
-+ break;
-
- /*
- * when we have more remembered pass phrases
-@@ -356,19 +349,12 @@
+@@ -351,19 +349,12 @@ apr_status_t ssl_load_encrypted_pkey(server_rec *s, apr_pool_t *p, int idx,
nPassPhrase++;
}
@@ -192,7 +174,7 @@ http://svn.apache.org/viewvc?view=revision&revision=1835242
asn1->source_mtime = pkey_mtime;
}
-@@ -619,3 +605,288 @@
+@@ -614,3 +605,288 @@ int ssl_pphrase_Handle_CB(char *buf, int bufsize, int verify, void *srv)
*/
return (len);
}
@@ -481,9 +463,11 @@ http://svn.apache.org/viewvc?view=revision&revision=1835242
+ return APR_SUCCESS;
+}
+#endif
---- httpd-2.4.33/modules/ssl/ssl_private.h.r1830819+
-+++ httpd-2.4.33/modules/ssl/ssl_private.h
-@@ -976,21 +976,28 @@
+diff --git a/modules/ssl/ssl_private.h b/modules/ssl/ssl_private.h
+index f46814d..1fdde13 100644
+--- a/modules/ssl/ssl_private.h
++++ b/modules/ssl/ssl_private.h
+@@ -1002,21 +1002,28 @@ BOOL ssl_util_vhost_matches(const char *servername, server_rec *s);
apr_status_t ssl_load_encrypted_pkey(server_rec *, apr_pool_t *, int,
const char *, apr_array_header_t **);
@@ -521,7 +505,7 @@ http://svn.apache.org/viewvc?view=revision&revision=1835242
/** Mutex Support */
int ssl_mutex_init(server_rec *, apr_pool_t *);
-@@ -1078,6 +1085,10 @@
+@@ -1109,6 +1116,10 @@ int modssl_request_is_tls(const request_rec *r, SSLConnRec **sslconn);
int ssl_is_challenge(conn_rec *c, const char *servername,
X509 **pcert, EVP_PKEY **pkey);
@@ -532,9 +516,11 @@ http://svn.apache.org/viewvc?view=revision&revision=1835242
#endif /* SSL_PRIVATE_H */
/** @} */
---- httpd-2.4.33/modules/ssl/ssl_util.c.r1830819+
-+++ httpd-2.4.33/modules/ssl/ssl_util.c
-@@ -181,45 +181,37 @@
+diff --git a/modules/ssl/ssl_util.c b/modules/ssl/ssl_util.c
+index 0d23465..223b385 100644
+--- a/modules/ssl/ssl_util.c
++++ b/modules/ssl/ssl_util.c
+@@ -192,45 +192,37 @@ BOOL ssl_util_path_check(ssl_pathcheck_t pcm, const char *path, apr_pool_t *p)
return TRUE;
}
@@ -596,7 +582,7 @@ http://svn.apache.org/viewvc?view=revision&revision=1835242
}
ssl_asn1_t *ssl_asn1_table_get(apr_hash_t *table,
-@@ -469,3 +461,13 @@
+@@ -480,3 +472,13 @@ void ssl_util_thread_id_setup(apr_pool_t *p)
}
#endif /* #if APR_HAS_THREADS && MODSSL_USE_OPENSSL_PRE_1_1_API */
@@ -610,9 +596,11 @@ http://svn.apache.org/viewvc?view=revision&revision=1835242
+ return 0;
+#endif
+}
---- httpd-2.4.33/modules/ssl/ssl_util_ssl.c.r1830819+
-+++ httpd-2.4.33/modules/ssl/ssl_util_ssl.c
-@@ -74,7 +74,7 @@
+diff --git a/modules/ssl/ssl_util_ssl.c b/modules/ssl/ssl_util_ssl.c
+index b7f0eca..4fa089b 100644
+--- a/modules/ssl/ssl_util_ssl.c
++++ b/modules/ssl/ssl_util_ssl.c
+@@ -74,7 +74,7 @@ void modssl_set_app_data2(SSL *ssl, void *arg)
** _________________________________________________________________
*/
@@ -621,7 +609,7 @@ http://svn.apache.org/viewvc?view=revision&revision=1835242
{
EVP_PKEY *rc;
BIO *bioS;
-@@ -83,7 +83,7 @@
+@@ -83,7 +83,7 @@ EVP_PKEY *modssl_read_privatekey(const char* filename, EVP_PKEY **key, pem_passw
/* 1. try PEM (= DER+Base64+headers) */
if ((bioS=BIO_new_file(filename, "r")) == NULL)
return NULL;
@@ -630,7 +618,7 @@ http://svn.apache.org/viewvc?view=revision&revision=1835242
BIO_free(bioS);
if (rc == NULL) {
-@@ -107,41 +107,9 @@
+@@ -107,41 +107,9 @@ EVP_PKEY *modssl_read_privatekey(const char* filename, EVP_PKEY **key, pem_passw
BIO_free(bioS);
}
}
@@ -672,8 +660,10 @@ http://svn.apache.org/viewvc?view=revision&revision=1835242
/* _________________________________________________________________
**
** Smart shutdown
---- httpd-2.4.33/modules/ssl/ssl_util_ssl.h.r1830819+
-+++ httpd-2.4.33/modules/ssl/ssl_util_ssl.h
+diff --git a/modules/ssl/ssl_util_ssl.h b/modules/ssl/ssl_util_ssl.h
+index c67dacf..d6307d9 100644
+--- a/modules/ssl/ssl_util_ssl.h
++++ b/modules/ssl/ssl_util_ssl.h
@@ -64,8 +64,11 @@
void modssl_init_app_data2_idx(void);
void *modssl_get_app_data2(SSL *);
diff --git a/httpd.spec b/httpd.spec
index 8e3bf09..6539e23 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -12,8 +12,8 @@
Summary: Apache HTTP Server
Name: httpd
-Version: 2.4.37
-Release: 6%{?dist}
+Version: 2.4.38
+Release: 1%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -74,7 +74,7 @@ Patch29: httpd-2.4.33-systemd.patch
Patch30: httpd-2.4.4-cachehardmax.patch
Patch31: httpd-2.4.33-sslmultiproxy.patch
Patch34: httpd-2.4.17-socket-activation.patch
-Patch36: httpd-2.4.33-r1830819+.patch
+Patch36: httpd-2.4.38-r1830819+.patch
Patch38: httpd-2.4.34-sslciphdefault.patch
Patch39: httpd-2.4.37-sslprotdefault.patch
@@ -235,7 +235,7 @@ interface for storing and accessing per-user session data.
%patch30 -p1 -b .cachehardmax
#patch31 -p1 -b .sslmultiproxy
%patch34 -p1 -b .socketactivation
-%patch36 -p1 -b .r1830819+
+#%patch36 -p1 -b .r1830819+
%patch38 -p1 -b .sslciphdefault
%patch39 -p1 -b .sslprotdefault
@@ -739,6 +739,9 @@ exit $rv
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Wed Jan 23 2019 Lubos Uhliarik - 2.4.38-1
+- new version 2.4.38 (#1668125)
+
* Mon Jan 14 2019 Björn Esser - 2.4.37-6
- Rebuilt for libcrypt.so.2 (#1666033)
diff --git a/sources b/sources
index ca284fa..69cd474 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (httpd-2.4.37.tar.bz2) = e802915801bbe885a65dada04b0116d145b293fabfff734dddb61a79ca1c6d65326f51155d1b864b093c3ec00d0bdfdf1401ab55677bae1ea3da1d199d7bcad4
+SHA512 (httpd-2.4.38.tar.bz2) = 8bdc36fa2bd13fd83feee17fdce4a5316ed8f96c1ac32b636ba106572ba257815438c72068d2d0e900783a3fa25c90a5da34c3f83fc2c04a1dbdbf234f7ad448
From a18552330d63b8d908a523a98bd6588ee86e1d47 Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Wed, 23 Jan 2019 13:04:05 +0100
Subject: [PATCH 151/359] Update PKCS#11 patch.
---
httpd-2.4.38-r1830819+.patch | 81 +++++++++++++++++-------------------
httpd.spec | 2 +-
2 files changed, 40 insertions(+), 43 deletions(-)
diff --git a/httpd-2.4.38-r1830819+.patch b/httpd-2.4.38-r1830819+.patch
index 01027ce..7df5ff6 100644
--- a/httpd-2.4.38-r1830819+.patch
+++ b/httpd-2.4.38-r1830819+.patch
@@ -11,9 +11,9 @@ http://svn.apache.org/viewvc?view=revision&revision=1835242
diff --git a/modules/ssl/ssl_engine_config.c b/modules/ssl/ssl_engine_config.c
index d276fea..5467d23 100644
---- a/modules/ssl/ssl_engine_config.c
-+++ b/modules/ssl/ssl_engine_config.c
-@@ -919,7 +919,9 @@ const char *ssl_cmd_SSLCertificateFile(cmd_parms *cmd,
+--- httpd-2.4.38/modules/ssl/ssl_engine_config.c.r1830819+
++++ httpd-2.4.38/modules/ssl/ssl_engine_config.c
+@@ -916,7 +916,9 @@
SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
const char *err;
@@ -24,7 +24,7 @@ index d276fea..5467d23 100644
return err;
}
-@@ -935,7 +937,9 @@ const char *ssl_cmd_SSLCertificateKeyFile(cmd_parms *cmd,
+@@ -932,7 +934,9 @@
SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
const char *err;
@@ -35,11 +35,9 @@ index d276fea..5467d23 100644
return err;
}
-diff --git a/modules/ssl/ssl_engine_init.c b/modules/ssl/ssl_engine_init.c
-index 8ba3486..e1b0844 100644
---- a/modules/ssl/ssl_engine_init.c
-+++ b/modules/ssl/ssl_engine_init.c
-@@ -1264,12 +1264,18 @@ static apr_status_t ssl_init_server_certs(server_rec *s,
+--- httpd-2.4.38/modules/ssl/ssl_engine_init.c.r1830819+
++++ httpd-2.4.38/modules/ssl/ssl_engine_init.c
+@@ -1228,12 +1228,18 @@
(certfile = APR_ARRAY_IDX(mctx->pks->cert_files, i,
const char *));
i++) {
@@ -59,7 +57,7 @@ index 8ba3486..e1b0844 100644
if ((SSL_CTX_use_certificate_file(mctx->ssl_ctx, certfile,
SSL_FILETYPE_PEM) < 1)) {
ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(02561)
-@@ -1298,12 +1304,46 @@ static apr_status_t ssl_init_server_certs(server_rec *s,
+@@ -1262,12 +1268,46 @@
ERR_clear_error();
@@ -111,7 +109,7 @@ index 8ba3486..e1b0844 100644
const unsigned char *ptr;
ERR_clear_error();
-@@ -1390,8 +1430,9 @@ static apr_status_t ssl_init_server_certs(server_rec *s,
+@@ -1354,8 +1394,9 @@
/*
* Try to read DH parameters from the (first) SSLCertificateFile
*/
@@ -123,7 +121,7 @@ index 8ba3486..e1b0844 100644
SSL_CTX_set_tmp_dh(mctx->ssl_ctx, dhparams);
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(02540)
"Custom DH parameters (%d bits) for %s loaded from %s",
-@@ -1403,10 +1444,10 @@ static apr_status_t ssl_init_server_certs(server_rec *s,
+@@ -1367,10 +1408,10 @@
/*
* Similarly, try to read the ECDH curve name from SSLCertificateFile...
*/
@@ -138,11 +136,9 @@ index 8ba3486..e1b0844 100644
SSL_CTX_set_tmp_ecdh(mctx->ssl_ctx, eckey);
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(02541)
"ECDH curve %s for %s specified in %s",
-diff --git a/modules/ssl/ssl_engine_pphrase.c b/modules/ssl/ssl_engine_pphrase.c
-index 8c29443..d5d33f7 100644
---- a/modules/ssl/ssl_engine_pphrase.c
-+++ b/modules/ssl/ssl_engine_pphrase.c
-@@ -143,8 +143,6 @@ apr_status_t ssl_load_encrypted_pkey(server_rec *s, apr_pool_t *p, int idx,
+--- httpd-2.4.38/modules/ssl/ssl_engine_pphrase.c.r1830819+
++++ httpd-2.4.38/modules/ssl/ssl_engine_pphrase.c
+@@ -143,8 +143,6 @@
const char *key_id = asn1_table_vhost_key(mc, p, sc->vhost_id, idx);
EVP_PKEY *pPrivateKey = NULL;
ssl_asn1_t *asn1;
@@ -151,7 +147,16 @@ index 8c29443..d5d33f7 100644
int nPassPhrase = (*pphrases)->nelts;
int nPassPhraseRetry = 0;
apr_time_t pkey_mtime = 0;
-@@ -351,19 +349,12 @@ apr_status_t ssl_load_encrypted_pkey(server_rec *s, apr_pool_t *p, int idx,
+@@ -221,7 +219,7 @@
+ * is not empty. */
+ ERR_clear_error();
+
+- pPrivateKey = modssl_read_privatekey(ppcb_arg.pkey_file, NULL,
++ pPrivateKey = modssl_read_privatekey(ppcb_arg.pkey_file,
+ ssl_pphrase_Handle_CB, &ppcb_arg);
+ /* If the private key was successfully read, nothing more to
+ do here. */
+@@ -351,19 +349,12 @@
nPassPhrase++;
}
@@ -174,7 +179,7 @@ index 8c29443..d5d33f7 100644
asn1->source_mtime = pkey_mtime;
}
-@@ -614,3 +605,288 @@ int ssl_pphrase_Handle_CB(char *buf, int bufsize, int verify, void *srv)
+@@ -614,3 +605,288 @@
*/
return (len);
}
@@ -463,11 +468,9 @@ index 8c29443..d5d33f7 100644
+ return APR_SUCCESS;
+}
+#endif
-diff --git a/modules/ssl/ssl_private.h b/modules/ssl/ssl_private.h
-index f46814d..1fdde13 100644
---- a/modules/ssl/ssl_private.h
-+++ b/modules/ssl/ssl_private.h
-@@ -1002,21 +1002,28 @@ BOOL ssl_util_vhost_matches(const char *servername, server_rec *s);
+--- httpd-2.4.38/modules/ssl/ssl_private.h.r1830819+
++++ httpd-2.4.38/modules/ssl/ssl_private.h
+@@ -1002,21 +1002,28 @@
apr_status_t ssl_load_encrypted_pkey(server_rec *, apr_pool_t *, int,
const char *, apr_array_header_t **);
@@ -505,7 +508,7 @@ index f46814d..1fdde13 100644
/** Mutex Support */
int ssl_mutex_init(server_rec *, apr_pool_t *);
-@@ -1109,6 +1116,10 @@ int modssl_request_is_tls(const request_rec *r, SSLConnRec **sslconn);
+@@ -1109,6 +1116,10 @@
int ssl_is_challenge(conn_rec *c, const char *servername,
X509 **pcert, EVP_PKEY **pkey);
@@ -516,11 +519,9 @@ index f46814d..1fdde13 100644
#endif /* SSL_PRIVATE_H */
/** @} */
-diff --git a/modules/ssl/ssl_util.c b/modules/ssl/ssl_util.c
-index 0d23465..223b385 100644
---- a/modules/ssl/ssl_util.c
-+++ b/modules/ssl/ssl_util.c
-@@ -192,45 +192,37 @@ BOOL ssl_util_path_check(ssl_pathcheck_t pcm, const char *path, apr_pool_t *p)
+--- httpd-2.4.38/modules/ssl/ssl_util.c.r1830819+
++++ httpd-2.4.38/modules/ssl/ssl_util.c
+@@ -192,45 +192,37 @@
return TRUE;
}
@@ -582,7 +583,7 @@ index 0d23465..223b385 100644
}
ssl_asn1_t *ssl_asn1_table_get(apr_hash_t *table,
-@@ -480,3 +472,13 @@ void ssl_util_thread_id_setup(apr_pool_t *p)
+@@ -480,3 +472,13 @@
}
#endif /* #if APR_HAS_THREADS && MODSSL_USE_OPENSSL_PRE_1_1_API */
@@ -596,11 +597,9 @@ index 0d23465..223b385 100644
+ return 0;
+#endif
+}
-diff --git a/modules/ssl/ssl_util_ssl.c b/modules/ssl/ssl_util_ssl.c
-index b7f0eca..4fa089b 100644
---- a/modules/ssl/ssl_util_ssl.c
-+++ b/modules/ssl/ssl_util_ssl.c
-@@ -74,7 +74,7 @@ void modssl_set_app_data2(SSL *ssl, void *arg)
+--- httpd-2.4.38/modules/ssl/ssl_util_ssl.c.r1830819+
++++ httpd-2.4.38/modules/ssl/ssl_util_ssl.c
+@@ -74,7 +74,7 @@
** _________________________________________________________________
*/
@@ -609,7 +608,7 @@ index b7f0eca..4fa089b 100644
{
EVP_PKEY *rc;
BIO *bioS;
-@@ -83,7 +83,7 @@ EVP_PKEY *modssl_read_privatekey(const char* filename, EVP_PKEY **key, pem_passw
+@@ -83,7 +83,7 @@
/* 1. try PEM (= DER+Base64+headers) */
if ((bioS=BIO_new_file(filename, "r")) == NULL)
return NULL;
@@ -618,7 +617,7 @@ index b7f0eca..4fa089b 100644
BIO_free(bioS);
if (rc == NULL) {
-@@ -107,41 +107,9 @@ EVP_PKEY *modssl_read_privatekey(const char* filename, EVP_PKEY **key, pem_passw
+@@ -107,41 +107,9 @@
BIO_free(bioS);
}
}
@@ -660,10 +659,8 @@ index b7f0eca..4fa089b 100644
/* _________________________________________________________________
**
** Smart shutdown
-diff --git a/modules/ssl/ssl_util_ssl.h b/modules/ssl/ssl_util_ssl.h
-index c67dacf..d6307d9 100644
---- a/modules/ssl/ssl_util_ssl.h
-+++ b/modules/ssl/ssl_util_ssl.h
+--- httpd-2.4.38/modules/ssl/ssl_util_ssl.h.r1830819+
++++ httpd-2.4.38/modules/ssl/ssl_util_ssl.h
@@ -64,8 +64,11 @@
void modssl_init_app_data2_idx(void);
void *modssl_get_app_data2(SSL *);
diff --git a/httpd.spec b/httpd.spec
index 6539e23..01c4dda 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -235,7 +235,7 @@ interface for storing and accessing per-user session data.
%patch30 -p1 -b .cachehardmax
#patch31 -p1 -b .sslmultiproxy
%patch34 -p1 -b .socketactivation
-#%patch36 -p1 -b .r1830819+
+%patch36 -p1 -b .r1830819+
%patch38 -p1 -b .sslciphdefault
%patch39 -p1 -b .sslprotdefault
From 584830e35ee967968509b4d01e9e0a5bcc46ad5f Mon Sep 17 00:00:00 2001
From: Lubos Uhliarik
Date: Wed, 23 Jan 2019 12:34:26 +0000
Subject: [PATCH 152/359] Updated release num
---
httpd.spec | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/httpd.spec b/httpd.spec
index 01c4dda..6ff6988 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -13,7 +13,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.38
-Release: 1%{?dist}
+Release: 2%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -739,7 +739,7 @@ exit $rv
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
-* Wed Jan 23 2019 Lubos Uhliarik - 2.4.38-1
+* Wed Jan 23 2019 Lubos Uhliarik - 2.4.38-2
- new version 2.4.38 (#1668125)
* Mon Jan 14 2019 Björn Esser - 2.4.37-6
From a0bbdf8c6cb24387f0d5869a95215bcceb4c4a15 Mon Sep 17 00:00:00 2001
From: Igor Gnatenko
Date: Mon, 28 Jan 2019 20:17:48 +0100
Subject: [PATCH 153/359] Remove obsolete Group tag
References: https://fedoraproject.org/wiki/Changes/Remove_Group_Tag
---
httpd.spec | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/httpd.spec b/httpd.spec
index 6ff6988..378d347 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -86,7 +86,6 @@ Patch60: httpd-2.4.34-enable-sslv3.patch
# Security fixes
License: ASL 2.0
-Group: System Environment/Daemons
BuildRequires: gcc, autoconf, pkgconfig, findutils, xmlto
BuildRequires: perl-interpreter, perl-generators, systemd-devel
BuildRequires: zlib-devel, libselinux-devel, lua-devel, brotli-devel
@@ -112,7 +111,6 @@ The Apache HTTP Server is a powerful, efficient, and extensible
web server.
%package devel
-Group: Development/Libraries
Summary: Development interfaces for the Apache HTTP Server
Requires: apr-devel, apr-util-devel, pkgconfig
Requires: httpd = %{version}-%{release}
@@ -127,7 +125,6 @@ able to compile or develop additional modules for Apache, you need
to install this package.
%package manual
-Group: Documentation
Summary: Documentation for the Apache HTTP Server
Requires: httpd = %{version}-%{release}
BuildArch: noarch
@@ -138,7 +135,6 @@ reference guide for the Apache HTTP Server. The information can
also be found at https://httpd.apache.org/docs/2.4/.
%package filesystem
-Group: System Environment/Daemons
Summary: The basic directory layout for the Apache HTTP Server
BuildArch: noarch
Requires(pre): /usr/sbin/useradd
@@ -149,7 +145,6 @@ for the Apache HTTP Server including the correct permissions
for the directories.
%package tools
-Group: System Environment/Daemons
Summary: Tools for use with the Apache HTTP Server
%description tools
@@ -157,7 +152,6 @@ The httpd-tools package contains tools which can be used with
the Apache HTTP Server.
%package -n mod_ssl
-Group: System Environment/Daemons
Summary: SSL/TLS module for the Apache HTTP Server
Epoch: 1
BuildRequires: openssl-devel
@@ -173,7 +167,6 @@ server via the Secure Sockets Layer (SSL) and Transport Layer
Security (TLS) protocols.
%package -n mod_md
-Group: System Environment/Daemons
Summary: Certificate provisioning using ACME for the Apache HTTP Server
Requires: httpd = 0:%{version}-%{release}, httpd-mmn = %{mmnisa}
BuildRequires: jansson-devel, libcurl-devel
@@ -186,7 +179,6 @@ managed domains and their virtual hosts automatically. This includes
renewal of certificates before they expire.
%package -n mod_proxy_html
-Group: System Environment/Daemons
Summary: HTML and XML content filters for the Apache HTTP Server
Requires: httpd = 0:%{version}-%{release}, httpd-mmn = %{mmnisa}
BuildRequires: libxml2-devel
@@ -198,7 +190,6 @@ The mod_proxy_html and mod_xml2enc modules provide filters which can
transform and modify HTML and XML content.
%package -n mod_ldap
-Group: System Environment/Daemons
Summary: LDAP authentication modules for the Apache HTTP Server
Requires: httpd = 0:%{version}-%{release}, httpd-mmn = %{mmnisa}
Requires: apr-util-ldap
@@ -208,7 +199,6 @@ The mod_ldap and mod_authnz_ldap modules add support for LDAP
authentication to the Apache HTTP Server.
%package -n mod_session
-Group: System Environment/Daemons
Summary: Session interface for the Apache HTTP Server
Requires: httpd = 0:%{version}-%{release}, httpd-mmn = %{mmnisa}
From 887d8d1a450e2669aaf5d33b3533874a4e9b73c5 Mon Sep 17 00:00:00 2001
From: Fedora Release Engineering
Date: Fri, 1 Feb 2019 02:28:37 +0000
Subject: [PATCH 154/359] - Rebuilt for
https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering
---
httpd.spec | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/httpd.spec b/httpd.spec
index 378d347..dc5e500 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -13,7 +13,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.38
-Release: 2%{?dist}
+Release: 3%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -729,6 +729,9 @@ exit $rv
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Fri Feb 01 2019 Fedora Release Engineering - 2.4.38-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
+
* Wed Jan 23 2019 Lubos Uhliarik - 2.4.38-2
- new version 2.4.38 (#1668125)
From 80cf4174c6f72e572545afe357b86f19f60712aa Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Tue, 5 Feb 2019 12:11:27 +0000
Subject: [PATCH 155/359] use serverroot-relative statedir, rundir by default
---
config.layout | 24 ++++++++++++++++++
httpd-2.4.37-r1842929+.patch | 49 +++++++++++++++++++++---------------
httpd.spec | 14 ++++++++---
pullrev.sh | 2 +-
4 files changed, 65 insertions(+), 24 deletions(-)
create mode 100644 config.layout
diff --git a/config.layout b/config.layout
new file mode 100644
index 0000000..3a9f6c8
--- /dev/null
+++ b/config.layout
@@ -0,0 +1,24 @@
+# Layout used in Fedora httpd packaging.
+
+ prefix: /etc/httpd
+ localstatedir: /var
+ exec_prefix: /usr
+ bindir: ${exec_prefix}/bin
+ sbindir: ${exec_prefix}/sbin
+ libdir: ${exec_prefix}/lib
+ libexecdir: ${exec_prefix}/libexec
+ mandir: ${exec_prefix}/man
+ sysconfdir: /etc/httpd/conf
+ datadir: ${exec_prefix}/share/httpd
+ installbuilddir: ${libdir}/httpd/build
+ errordir: ${datadir}/error
+ iconsdir: ${datadir}/icons
+ htdocsdir: ${localstatedir}/www/html
+ manualdir: ${datadir}/manual
+ cgidir: ${localstatedir}/www/cgi-bin
+ includedir: ${exec_prefix}/include/httpd
+ runtimedir: ${prefix}/run
+ logfiledir: ${localstatedir}/log/httpd
+ statedir: ${prefix}/state
+ proxycachedir: ${localstatedir}/cache/httpd/proxy
+
diff --git a/httpd-2.4.37-r1842929+.patch b/httpd-2.4.37-r1842929+.patch
index c6aa1f7..e841e34 100644
--- a/httpd-2.4.37-r1842929+.patch
+++ b/httpd-2.4.37-r1842929+.patch
@@ -1,9 +1,10 @@
# ./pullrev.sh 1842929 1842931
http://svn.apache.org/viewvc?view=revision&revision=1842929
http://svn.apache.org/viewvc?view=revision&revision=1842931
+http://svn.apache.org/viewvc?view=revision&revision=1852982
---- httpd-2.4.37/acinclude.m4.r1842929+
-+++ httpd-2.4.37/acinclude.m4
+--- httpd-2.4.38/acinclude.m4.r1842929+
++++ httpd-2.4.38/acinclude.m4
@@ -45,6 +45,7 @@
APACHE_SUBST(installbuilddir)
APACHE_SUBST(runtimedir)
@@ -20,8 +21,8 @@ http://svn.apache.org/viewvc?view=revision&revision=1842931
])
dnl
---- httpd-2.4.37/config.layout.r1842929+
-+++ httpd-2.4.37/config.layout
+--- httpd-2.4.38/config.layout.r1842929+
++++ httpd-2.4.38/config.layout
@@ -29,6 +29,7 @@
includedir: ${prefix}/include
localstatedir: ${prefix}
@@ -142,8 +143,8 @@ http://svn.apache.org/viewvc?view=revision&revision=1842931
logfiledir: ${localstatedir}/log/httpd
proxycachedir: ${localstatedir}/cache/httpd
---- httpd-2.4.37/configure.in.r1842929+
-+++ httpd-2.4.37/configure.in
+--- httpd-2.4.38/configure.in.r1842929+
++++ httpd-2.4.38/configure.in
@@ -41,7 +41,7 @@
AC_PREFIX_DEFAULT(/usr/local/apache2)
@@ -153,8 +154,8 @@ http://svn.apache.org/viewvc?view=revision&revision=1842931
dnl reparse the configure arguments.
APR_PARSE_ARGUMENTS
---- httpd-2.4.37/include/ap_config_layout.h.in.r1842929+
-+++ httpd-2.4.37/include/ap_config_layout.h.in
+--- httpd-2.4.38/include/ap_config_layout.h.in.r1842929+
++++ httpd-2.4.38/include/ap_config_layout.h.in
@@ -60,5 +60,7 @@
#define DEFAULT_REL_LOGFILEDIR "@rel_logfiledir@"
#define DEFAULT_EXP_PROXYCACHEDIR "@exp_proxycachedir@"
@@ -163,8 +164,8 @@ http://svn.apache.org/viewvc?view=revision&revision=1842931
+#define DEFAULT_REL_STATEDIR "@rel_statedir@"
#endif /* AP_CONFIG_LAYOUT_H */
---- httpd-2.4.37/include/http_config.h.r1842929+
-+++ httpd-2.4.37/include/http_config.h
+--- httpd-2.4.38/include/http_config.h.r1842929+
++++ httpd-2.4.38/include/http_config.h
@@ -757,6 +757,14 @@
*/
AP_DECLARE(char *) ap_runtime_dir_relative(apr_pool_t *p, const char *fname);
@@ -180,8 +181,8 @@ http://svn.apache.org/viewvc?view=revision&revision=1842931
/* Finally, the hook for dynamically loading modules in... */
/**
---- httpd-2.4.37/Makefile.in.r1842929+
-+++ httpd-2.4.37/Makefile.in
+--- httpd-2.4.38/Makefile.in.r1842929+
++++ httpd-2.4.38/Makefile.in
@@ -213,6 +213,7 @@
install-other:
@test -d $(DESTDIR)$(logfiledir) || $(MKINSTALLDIRS) $(DESTDIR)$(logfiledir)
@@ -190,8 +191,8 @@ http://svn.apache.org/viewvc?view=revision&revision=1842931
@for ext in dll x; do \
file=apachecore.$$ext; \
if test -f $$file; then \
---- httpd-2.4.37/modules/dav/fs/mod_dav_fs.c.r1842929+
-+++ httpd-2.4.37/modules/dav/fs/mod_dav_fs.c
+--- httpd-2.4.38/modules/dav/fs/mod_dav_fs.c.r1842929+
++++ httpd-2.4.38/modules/dav/fs/mod_dav_fs.c
@@ -29,6 +29,10 @@
extern module AP_MODULE_DECLARE_DATA dav_fs_module;
@@ -216,14 +217,14 @@ http://svn.apache.org/viewvc?view=revision&revision=1842931
}
static void *dav_fs_merge_server_config(apr_pool_t *p,
---- httpd-2.4.37/modules/md/mod_md_config.c.r1842929+
-+++ httpd-2.4.37/modules/md/mod_md_config.c
+--- httpd-2.4.38/modules/md/mod_md_config.c.r1842929+
++++ httpd-2.4.38/modules/md/mod_md_config.c
@@ -54,10 +54,14 @@
#define DEF_VAL (-1)
+#ifndef MD_DEFAULT_BASE_DIR
-+#define MD_DEFAULT_BASE_DIR "state/md"
++#define MD_DEFAULT_BASE_DIR "md"
+#endif
+
/* Default settings for the global conf */
@@ -242,8 +243,8 @@ http://svn.apache.org/viewvc?view=revision&revision=1842931
apr_pool_cleanup_register(pool, NULL, cleanup_mod_config, apr_pool_cleanup_null);
}
---- httpd-2.4.37/server/core.c.r1842929+
-+++ httpd-2.4.37/server/core.c
+--- httpd-2.4.38/server/core.c.r1842929+
++++ httpd-2.4.38/server/core.c
@@ -129,6 +129,8 @@
AP_DECLARE_DATA int ap_run_mode = AP_SQ_RM_UNKNOWN;
AP_DECLARE_DATA int ap_config_generation = 0;
@@ -287,7 +288,15 @@ http://svn.apache.org/viewvc?view=revision&revision=1842931
AP_INIT_TAKE1("ErrorLog", set_server_string_slot,
(void *)APR_OFFSETOF(server_rec, error_fname), RSRC_CONF,
"The filename of the error log"),
-@@ -5150,6 +5172,27 @@
+@@ -4927,6 +4949,7 @@
+ ap_regcomp_set_default_cflags(AP_REG_DOLLAR_ENDONLY);
+
+ mpm_common_pre_config(pconf);
++ core_state_dir = NULL;
+
+ return OK;
+ }
+@@ -5150,6 +5173,27 @@
}
}
diff --git a/httpd.spec b/httpd.spec
index dc5e500..4285193 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -13,7 +13,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.38
-Release: 3%{?dist}
+Release: 4%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -56,6 +56,7 @@ Source41: htcacheclean.sysconf
Source42: httpd-init.service
Source43: httpd-ssl-gencerts
Source44: httpd@.service
+Source45: config.layout
# build/scripts patches
Patch1: httpd-2.4.1-apctl.patch
Patch2: httpd-2.4.9-apxs.patch
@@ -257,6 +258,9 @@ if test "x${vmmn}" != "x%{mmn}"; then
exit 1
fi
+# Provide default layout
+cp $RPM_SOURCE_DIR/config.layout .
+
sed '
s,@MPM@,%{mpm},g
s,@DOCROOT@,%{docroot},g
@@ -399,7 +403,7 @@ install -m 644 -p $RPM_SOURCE_DIR/httpd.tmpfiles \
# Other directories
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/dav \
- $RPM_BUILD_ROOT%{_localstatedir}/lib/httpd \
+ $RPM_BUILD_ROOT%{_localstatedir}/lib/httpd/state \
$RPM_BUILD_ROOT/run/httpd/htcacheclean
# Substitute in defaults which are usually done (badly) by "make install"
@@ -461,8 +465,9 @@ ln -s ../../pixmaps/poweredby.png \
$RPM_BUILD_ROOT%{contentdir}/icons/poweredby.png
# symlinks for /etc/httpd
+rmdir $RPM_BUILD_ROOT/etc/httpd/{state,run}
ln -s ../..%{_localstatedir}/log/httpd $RPM_BUILD_ROOT/etc/httpd/logs
-ln -s ../..%{_localstatedir}/lib/httpd $RPM_BUILD_ROOT/etc/httpd/state
+ln -s ../..%{_localstatedir}/lib/httpd/state $RPM_BUILD_ROOT/etc/httpd/state
ln -s /run/httpd $RPM_BUILD_ROOT/etc/httpd/run
ln -s ../..%{_libdir}/httpd/modules $RPM_BUILD_ROOT/etc/httpd/modules
@@ -729,6 +734,9 @@ exit $rv
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Tue Feb 5 2019 Joe Orton - 2.4.38-4
+- use serverroot-relative statedir, rundir by default
+
* Fri Feb 01 2019 Fedora Release Engineering - 2.4.38-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
diff --git a/pullrev.sh b/pullrev.sh
index dbb97a5..5494c7e 100755
--- a/pullrev.sh
+++ b/pullrev.sh
@@ -7,7 +7,7 @@ fi
repo="https://svn.apache.org/repos/asf/httpd/httpd/trunk"
#repo="https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x"
-ver=2.4.34
+ver=2.4.37
prefix="httpd-${ver}"
suffix="r$1${2:++}"
fn="${prefix}-${suffix}.patch"
From 9e462af294c3fbd19348dba908d304daf1b3b078 Mon Sep 17 00:00:00 2001
From: Lubos Uhliarik
Date: Tue, 5 Feb 2019 12:39:17 +0000
Subject: [PATCH 156/359] segmentation fault fix (FIPS)
---
httpd-2.4.37-fips-segfault.patch | 42 ++++++++++++++++++++++++++++++++
httpd.spec | 7 +++++-
2 files changed, 48 insertions(+), 1 deletion(-)
create mode 100644 httpd-2.4.37-fips-segfault.patch
diff --git a/httpd-2.4.37-fips-segfault.patch b/httpd-2.4.37-fips-segfault.patch
new file mode 100644
index 0000000..6039980
--- /dev/null
+++ b/httpd-2.4.37-fips-segfault.patch
@@ -0,0 +1,42 @@
+diff --git a/modules/ssl/mod_ssl.c b/modules/ssl/mod_ssl.c
+index 37947e7..b50c259 100644
+--- a/modules/ssl/mod_ssl.c
++++ b/modules/ssl/mod_ssl.c
+@@ -331,9 +331,6 @@ static apr_status_t ssl_cleanup_pre_config(void *data)
+ /*
+ * Try to kill the internals of the SSL library.
+ */
+-#ifdef HAVE_FIPS
+- FIPS_mode_set(0);
+-#endif
+ /* Corresponds to OBJ_create()s */
+ OBJ_cleanup();
+ /* Corresponds to OPENSSL_load_builtin_modules() */
+diff --git a/modules/ssl/ssl_engine_init.c b/modules/ssl/ssl_engine_init.c
+index 5063a72..21e41e2 100644
+--- a/modules/ssl/ssl_engine_init.c
++++ b/modules/ssl/ssl_engine_init.c
+@@ -183,6 +183,14 @@ int ssl_is_challenge(conn_rec *c, const char *servername,
+ return 0;
+ }
+
++#ifdef HAVE_FIPS
++static apr_status_t ssl_fips_cleanup(void *data)
++{
++ FIPS_mode_set(0);
++ return APR_SUCCESS;
++}
++#endif
++
+ /*
+ * Per-module initialization
+ */
+@@ -316,6 +324,8 @@ apr_status_t ssl_init_Module(apr_pool_t *p, apr_pool_t *plog,
+ if (FIPS_mode_set(1)) {
+ ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, s, APLOGNO(01884)
+ "Operating in SSL FIPS mode");
++ apr_pool_cleanup_register(p, NULL, ssl_fips_cleanup,
++ apr_pool_cleanup_null);
+ }
+ else {
+ ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(01885) "FIPS mode failed");
diff --git a/httpd.spec b/httpd.spec
index 4285193..b7520a2 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -13,7 +13,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.38
-Release: 4%{?dist}
+Release: 5%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -78,6 +78,7 @@ Patch34: httpd-2.4.17-socket-activation.patch
Patch36: httpd-2.4.38-r1830819+.patch
Patch38: httpd-2.4.34-sslciphdefault.patch
Patch39: httpd-2.4.37-sslprotdefault.patch
+Patch40: httpd-2.4.37-fips-segfault.patch
# Bug fixes
# https://bugzilla.redhat.com/show_bug.cgi?id=1397243
@@ -229,6 +230,7 @@ interface for storing and accessing per-user session data.
%patch36 -p1 -b .r1830819+
%patch38 -p1 -b .sslciphdefault
%patch39 -p1 -b .sslprotdefault
+%patch40 -p1 -b .fipsseg
%patch58 -p1 -b .r1738878
%patch60 -p1 -b .enable-sslv3
@@ -734,6 +736,9 @@ exit $rv
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Tue Feb 05 2019 Lubos Uhliarik - 2.4.38-5
+- segmentation fault fix (FIPS)
+
* Tue Feb 5 2019 Joe Orton - 2.4.38-4
- use serverroot-relative statedir, rundir by default
From b86b48c4a2a3293c0e9a8cb74e01f1827c3be904 Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Thu, 14 Mar 2019 10:30:15 +0000
Subject: [PATCH 157/359] apachectl: cleanup and replace script wholesale
(#1641237) * drop "apachectl fullstatus" support * run systemctl with
--no-pager option * implement graceful&graceful-stop by signal directly run
"httpd -t" from legacy action script Resolves: rhbz#1641237
---
action-configtest.sh | 2 +-
action-graceful.sh | 2 +-
apachectl.sh | 62 ++++++++++++++++++++++
httpd-2.4.1-apctl.patch | 94 ---------------------------------
httpd-2.4.34-apctlsystemd.patch | 63 ----------------------
httpd.spec | 18 ++++---
6 files changed, 75 insertions(+), 166 deletions(-)
create mode 100755 apachectl.sh
delete mode 100644 httpd-2.4.1-apctl.patch
delete mode 100644 httpd-2.4.34-apctlsystemd.patch
diff --git a/action-configtest.sh b/action-configtest.sh
index 6685b0a..711d9cd 100644
--- a/action-configtest.sh
+++ b/action-configtest.sh
@@ -1,2 +1,2 @@
#!/bin/sh
-exec /sbin/apachectl configtest "$@"
+exec /usr/sbin/httpd -t
diff --git a/action-graceful.sh b/action-graceful.sh
index dc68b2e..4976087 100644
--- a/action-graceful.sh
+++ b/action-graceful.sh
@@ -1,2 +1,2 @@
#!/bin/sh
-exec /sbin/apachectl graceful "$@"
+exec /sbin/apachectl graceful
diff --git a/apachectl.sh b/apachectl.sh
new file mode 100755
index 0000000..ee2dba8
--- /dev/null
+++ b/apachectl.sh
@@ -0,0 +1,62 @@
+#!/usr/bin/sh
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+if [ "x$1" = "x-k" ]; then
+ shift
+fi
+
+ACMD="$1"
+ARGV="$@"
+SVC='httpd.service'
+
+if [ "x$2" != "x" ] ; then
+ echo Passing arguments to httpd using apachectl is no longer supported.
+ echo You can only start/stop/restart httpd using this script.
+ echo To pass extra arguments to httpd, see the $SVC'(8)'
+ echo man page.
+ exit 1
+fi
+
+case $ACMD in
+start|stop|restart|status)
+ /usr/bin/systemctl --no-pager $ACMD $SVC
+ ERROR=$?
+ ;;
+graceful)
+ if /usr/bin/systemctl -q is-active $SVC; then
+ /usr/bin/systemctl kill --signal=SIGUSR1 $SVC
+ else
+ /usr/bin/systemctl start $SVC
+ fi
+ ERROR=$?
+ ;;
+graceful-stop)
+ /usr/bin/systemctl kill --signal=SIGWINCH $SVC
+ ERROR=$?
+ ;;
+configtest)
+ /usr/sbin/service ${SVC/.service//} $ACMD
+ ERROR=$?
+ ;;
+*)
+ echo apachectl: The \"$ACMD\" option is not supported. 1>&2
+ ERROR=2
+ ;;
+esac
+
+exit $ERROR
+
diff --git a/httpd-2.4.1-apctl.patch b/httpd-2.4.1-apctl.patch
deleted file mode 100644
index b31c3c5..0000000
--- a/httpd-2.4.1-apctl.patch
+++ /dev/null
@@ -1,94 +0,0 @@
-
-- fail gracefully if links is not installed on target system
-- source sysconfig/httpd for custom env. vars etc.
-- make httpd -t work even in SELinux
-- pass $OPTIONS to all $HTTPD invocation
-
-Upstream-HEAD: vendor
-Upstream-2.0: vendor
-Upstream-Status: Vendor-specific changes for better initscript integration
-
---- httpd-2.4.1/support/apachectl.in.apctl
-+++ httpd-2.4.1/support/apachectl.in
-@@ -44,19 +44,25 @@ ARGV="$@"
- # the path to your httpd binary, including options if necessary
- HTTPD='@exp_sbindir@/@progname@'
- #
--# pick up any necessary environment variables
--if test -f @exp_sbindir@/envvars; then
-- . @exp_sbindir@/envvars
--fi
- #
- # a command that outputs a formatted text version of the HTML at the
- # url given on the command line. Designed for lynx, however other
- # programs may work.
--LYNX="@LYNX_PATH@ -dump"
-+if [ -x "@LYNX_PATH@" ]; then
-+ LYNX="@LYNX_PATH@ -dump"
-+else
-+ LYNX=none
-+fi
- #
- # the URL to your server's mod_status status page. If you do not
- # have one, then status and fullstatus will not work.
- STATUSURL="http://localhost:@PORT@/server-status"
-+
-+# Source /etc/sysconfig/httpd for $HTTPD setting, etc.
-+if [ -r /etc/sysconfig/httpd ]; then
-+ . /etc/sysconfig/httpd
-+fi
-+
- #
- # Set this variable to a command that increases the maximum
- # number of file descriptors allowed per child process. This is
-@@ -76,9 +82,27 @@ if [ "x$ARGV" = "x" ] ; then
- ARGV="-h"
- fi
-
-+function checklynx() {
-+if [ "$LYNX" = "none" ]; then
-+ echo "The 'links' package is required for this functionality."
-+ exit 8
-+fi
-+}
-+
-+function testconfig() {
-+# httpd is denied terminal access in SELinux, so run in the
-+# current context to get stdout from $HTTPD -t.
-+if test -x /usr/sbin/selinuxenabled && /usr/sbin/selinuxenabled; then
-+ runcon -- `id -Z` $HTTPD $OPTIONS -t
-+else
-+ $HTTPD $OPTIONS -t
-+fi
-+ERROR=$?
-+}
-+
- case $ACMD in
- start|stop|restart|graceful|graceful-stop)
-- $HTTPD -k $ARGV
-+ $HTTPD $OPTIONS -k $ARGV
- ERROR=$?
- ;;
- startssl|sslstart|start-SSL)
-@@ -88,17 +112,18 @@ startssl|sslstart|start-SSL)
- ERROR=2
- ;;
- configtest)
-- $HTTPD -t
-- ERROR=$?
-+ testconfig
- ;;
- status)
-+ checklynx
- $LYNX $STATUSURL | awk ' /process$/ { print; exit } { print } '
- ;;
- fullstatus)
-+ checklynx
- $LYNX $STATUSURL
- ;;
- *)
-- $HTTPD "$@"
-+ $HTTPD $OPTIONS "$@"
- ERROR=$?
- esac
-
diff --git a/httpd-2.4.34-apctlsystemd.patch b/httpd-2.4.34-apctlsystemd.patch
deleted file mode 100644
index 20d7101..0000000
--- a/httpd-2.4.34-apctlsystemd.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-
-Make apachectl run via systemctl.
-
-Note: "apachectl graceful" is documented to start httpd if not running.
-
-Upstream-Status: vendor specific patch
-
---- httpd-2.4.34/support/apachectl.in.apctlsystemd
-+++ httpd-2.4.34/support/apachectl.in
-@@ -58,11 +58,6 @@
- # have one, then status and fullstatus will not work.
- STATUSURL="http://localhost:@PORT@/server-status"
-
--# Source /etc/sysconfig/httpd for $HTTPD setting, etc.
--if [ -r /etc/sysconfig/httpd ]; then
-- . /etc/sysconfig/httpd
--fi
--
- #
- # Set this variable to a command that increases the maximum
- # number of file descriptors allowed per child process. This is
-@@ -100,9 +95,28 @@
- ERROR=$?
- }
-
-+if [ "x$2" != "x" ] ; then
-+ echo Passing arguments to httpd using apachectl is no longer supported.
-+ echo You can only start/stop/restart httpd using this script.
-+ echo "To pass extra arguments to httpd, see the httpd.service(8)"
-+ echo man page.
-+fi
-+
- case $ACMD in
--start|stop|restart|graceful|graceful-stop)
-- $HTTPD $OPTIONS -k $ARGV
-+start|stop|restart|status)
-+ /usr/bin/systemctl $ACMD httpd.service
-+ ERROR=$?
-+ ;;
-+graceful)
-+ if /usr/bin/systemctl -q is-active httpd.service; then
-+ /usr/bin/systemctl reload httpd.service
-+ else
-+ /usr/bin/systemctl start httpd.service
-+ fi
-+ ERROR=$?
-+ ;;
-+graceful-stop)
-+ /usr/bin/systemctl stop httpd.service
- ERROR=$?
- ;;
- startssl|sslstart|start-SSL)
-@@ -114,10 +128,6 @@
- configtest)
- testconfig
- ;;
--status)
-- checklynx
-- $LYNX $STATUSURL | awk ' /process$/ { print; exit } { print } '
-- ;;
- fullstatus)
- checklynx
- $LYNX $STATUSURL
diff --git a/httpd.spec b/httpd.spec
index b7520a2..d8f2d02 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -13,7 +13,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.38
-Release: 5%{?dist}
+Release: 6%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -45,7 +45,6 @@ Source26: 10-listen443.conf
Source27: httpd.socket
Source28: 00-optional.conf
Source29: 01-md.conf
-# Documentation
Source30: README.confd
Source31: README.confmod
Source32: httpd.service.xml
@@ -57,11 +56,10 @@ Source42: httpd-init.service
Source43: httpd-ssl-gencerts
Source44: httpd@.service
Source45: config.layout
+Source46: apachectl.sh
# build/scripts patches
-Patch1: httpd-2.4.1-apctl.patch
Patch2: httpd-2.4.9-apxs.patch
Patch3: httpd-2.4.1-deplibs.patch
-Patch6: httpd-2.4.34-apctlsystemd.patch
# Needed for socket activation and mod_systemd patch
Patch19: httpd-2.4.25-detect-systemd.patch
# Features/functional changes
@@ -210,10 +208,8 @@ interface for storing and accessing per-user session data.
%prep
%setup -q
-%patch1 -p1 -b .apctl
%patch2 -p1 -b .apxs
%patch3 -p1 -b .deplibs
-%patch6 -p1 -b .apctlsystemd
%patch19 -p1 -b .detectsystemd
@@ -482,7 +478,8 @@ install -m755 $RPM_SOURCE_DIR/httpd-ssl-pass-dialog \
install -m755 $RPM_SOURCE_DIR/httpd-ssl-gencerts \
$RPM_BUILD_ROOT%{_libexecdir}/httpd-ssl-gencerts
-# Install action scripts
+# Install scripts
+install -p -m 755 $RPM_SOURCE_DIR/apachectl.sh $RPM_BUILD_ROOT%{_sbindir}/apachectl
mkdir -p $RPM_BUILD_ROOT%{_libexecdir}/initscripts/legacy-actions/httpd
for f in graceful configtest; do
install -p -m 755 $RPM_SOURCE_DIR/action-${f}.sh \
@@ -736,6 +733,13 @@ exit $rv
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Thu Feb 28 2019 Joe Orton - 2.4.38-6
+- apachectl: cleanup and replace script wholesale (#1641237)
+ * drop "apachectl fullstatus" support
+ * run systemctl with --no-pager option
+ * implement graceful&graceful-stop by signal directly
+- run "httpd -t" from legacy action script
+
* Tue Feb 05 2019 Lubos Uhliarik - 2.4.38-5
- segmentation fault fix (FIPS)
From c30e10218028cb4759eb0fa5a61d06e3148c073d Mon Sep 17 00:00:00 2001
From: Lubos Uhliarik
Date: Tue, 2 Apr 2019 10:53:17 +0000
Subject: [PATCH 158/359] update to 2.4.39
---
httpd-2.4.37-fips-segfault.patch | 42 --------------------------------
httpd.spec | 9 ++++---
sources | 2 +-
3 files changed, 6 insertions(+), 47 deletions(-)
delete mode 100644 httpd-2.4.37-fips-segfault.patch
diff --git a/httpd-2.4.37-fips-segfault.patch b/httpd-2.4.37-fips-segfault.patch
deleted file mode 100644
index 6039980..0000000
--- a/httpd-2.4.37-fips-segfault.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-diff --git a/modules/ssl/mod_ssl.c b/modules/ssl/mod_ssl.c
-index 37947e7..b50c259 100644
---- a/modules/ssl/mod_ssl.c
-+++ b/modules/ssl/mod_ssl.c
-@@ -331,9 +331,6 @@ static apr_status_t ssl_cleanup_pre_config(void *data)
- /*
- * Try to kill the internals of the SSL library.
- */
--#ifdef HAVE_FIPS
-- FIPS_mode_set(0);
--#endif
- /* Corresponds to OBJ_create()s */
- OBJ_cleanup();
- /* Corresponds to OPENSSL_load_builtin_modules() */
-diff --git a/modules/ssl/ssl_engine_init.c b/modules/ssl/ssl_engine_init.c
-index 5063a72..21e41e2 100644
---- a/modules/ssl/ssl_engine_init.c
-+++ b/modules/ssl/ssl_engine_init.c
-@@ -183,6 +183,14 @@ int ssl_is_challenge(conn_rec *c, const char *servername,
- return 0;
- }
-
-+#ifdef HAVE_FIPS
-+static apr_status_t ssl_fips_cleanup(void *data)
-+{
-+ FIPS_mode_set(0);
-+ return APR_SUCCESS;
-+}
-+#endif
-+
- /*
- * Per-module initialization
- */
-@@ -316,6 +324,8 @@ apr_status_t ssl_init_Module(apr_pool_t *p, apr_pool_t *plog,
- if (FIPS_mode_set(1)) {
- ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, s, APLOGNO(01884)
- "Operating in SSL FIPS mode");
-+ apr_pool_cleanup_register(p, NULL, ssl_fips_cleanup,
-+ apr_pool_cleanup_null);
- }
- else {
- ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(01885) "FIPS mode failed");
diff --git a/httpd.spec b/httpd.spec
index d8f2d02..c1b14c1 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -12,8 +12,8 @@
Summary: Apache HTTP Server
Name: httpd
-Version: 2.4.38
-Release: 6%{?dist}
+Version: 2.4.39
+Release: 1%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -76,7 +76,6 @@ Patch34: httpd-2.4.17-socket-activation.patch
Patch36: httpd-2.4.38-r1830819+.patch
Patch38: httpd-2.4.34-sslciphdefault.patch
Patch39: httpd-2.4.37-sslprotdefault.patch
-Patch40: httpd-2.4.37-fips-segfault.patch
# Bug fixes
# https://bugzilla.redhat.com/show_bug.cgi?id=1397243
@@ -226,7 +225,6 @@ interface for storing and accessing per-user session data.
%patch36 -p1 -b .r1830819+
%patch38 -p1 -b .sslciphdefault
%patch39 -p1 -b .sslprotdefault
-%patch40 -p1 -b .fipsseg
%patch58 -p1 -b .r1738878
%patch60 -p1 -b .enable-sslv3
@@ -733,6 +731,9 @@ exit $rv
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Tue Apr 02 2019 Lubos Uhliarik - 2.4.39-1
+- update to 2.4.39
+
* Thu Feb 28 2019 Joe Orton - 2.4.38-6
- apachectl: cleanup and replace script wholesale (#1641237)
* drop "apachectl fullstatus" support
diff --git a/sources b/sources
index 69cd474..248974a 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (httpd-2.4.38.tar.bz2) = 8bdc36fa2bd13fd83feee17fdce4a5316ed8f96c1ac32b636ba106572ba257815438c72068d2d0e900783a3fa25c90a5da34c3f83fc2c04a1dbdbf234f7ad448
+SHA512 (httpd-2.4.39.tar.bz2) = 9742202040b3dc6344b301540f54b2d3f8e36898410d24206a7f8dcecb1bea7d7230fabc7256752724558af249facf64bffe2cf678b8f7cccb64076737abfda7
From 94b643f7e2997f39e42a1a927284fc2c6c585bca Mon Sep 17 00:00:00 2001
From: Lubos Uhliarik
Date: Tue, 2 Apr 2019 12:34:14 +0000
Subject: [PATCH 159/359] Forgot to commit 00-base.conf with redis LoadModule
---
00-base.conf | 1 +
1 file changed, 1 insertion(+)
diff --git a/00-base.conf b/00-base.conf
index 28dacb3..e46d911 100644
--- a/00-base.conf
+++ b/00-base.conf
@@ -46,6 +46,7 @@ LoadModule macro_module modules/mod_macro.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule mime_module modules/mod_mime.so
LoadModule negotiation_module modules/mod_negotiation.so
+LoadModule redis_module modules/mod_socache_redis.so
LoadModule remoteip_module modules/mod_remoteip.so
LoadModule reqtimeout_module modules/mod_reqtimeout.so
LoadModule request_module modules/mod_request.so
From c6cd42af04575bfc94a6c59fe7f1aac854ffbadb Mon Sep 17 00:00:00 2001
From: Lubos Uhliarik
Date: Tue, 2 Apr 2019 15:27:39 +0000
Subject: [PATCH 160/359] Fix wrong module name used in LoadModule directive
---
00-base.conf | 2 +-
httpd.spec | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/00-base.conf b/00-base.conf
index e46d911..7cabce0 100644
--- a/00-base.conf
+++ b/00-base.conf
@@ -46,7 +46,6 @@ LoadModule macro_module modules/mod_macro.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule mime_module modules/mod_mime.so
LoadModule negotiation_module modules/mod_negotiation.so
-LoadModule redis_module modules/mod_socache_redis.so
LoadModule remoteip_module modules/mod_remoteip.so
LoadModule reqtimeout_module modules/mod_reqtimeout.so
LoadModule request_module modules/mod_request.so
@@ -56,6 +55,7 @@ LoadModule slotmem_plain_module modules/mod_slotmem_plain.so
LoadModule slotmem_shm_module modules/mod_slotmem_shm.so
LoadModule socache_dbm_module modules/mod_socache_dbm.so
LoadModule socache_memcache_module modules/mod_socache_memcache.so
+LoadModule socache_redis_module modules/mod_socache_redis.so
LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
LoadModule status_module modules/mod_status.so
LoadModule substitute_module modules/mod_substitute.so
diff --git a/httpd.spec b/httpd.spec
index c1b14c1..5363e54 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -13,7 +13,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.39
-Release: 1%{?dist}
+Release: 2%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -731,7 +731,7 @@ exit $rv
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
-* Tue Apr 02 2019 Lubos Uhliarik - 2.4.39-1
+* Tue Apr 02 2019 Lubos Uhliarik - 2.4.39-2
- update to 2.4.39
* Thu Feb 28 2019 Joe Orton - 2.4.38-6
From 56f7420323e1ca6f246482b4abd35f9dca73b874 Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Tue, 16 Apr 2019 08:45:34 +0100
Subject: [PATCH 161/359] Grammar fixes/tweaks.
---
httpd.conf.xml | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/httpd.conf.xml b/httpd.conf.xml
index 3a02111..13e5d69 100644
--- a/httpd.conf.xml
+++ b/httpd.conf.xml
@@ -129,12 +129,12 @@
Module configuration filesModule configuration files are provided in the
- /etc/httpd/conf.modules.d/ directory. Filenames
- in this directory are by convention prefixed with two digit numeric
- prefix to ensure they are processed in the desired order. Core
- modules provide with the httpd package are
- loaded by files with a prefix to ensure
- these are loaded first. Only filenames with a
+ /etc/httpd/conf.modules.d/ directory.
+ Filenames in this directory are by convention prefixed with two
+ digit numeric prefix to ensure they are processed in the desired
+ order. Core modules provided with the httpd
+ package are loaded by files with a prefix
+ to ensure these load first. Only filenames with a
suffix in this directory will be
processed.
@@ -160,8 +160,8 @@
/etc/httpd/conf.modules.d/00-systemd.confThis file loads
which is necessary for the correct operation of the
- httpd.service service, and should not be
- removed or disabled.
+ httpd.service systemd unit, and should
+ not be removed or disabled.
From 3aa63a93a96242548cc9c99798beed41044c945f Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Tue, 16 Apr 2019 08:48:10 +0100
Subject: [PATCH 162/359] - fix statedir symlink to point to /var/lib/httpd
(#1697662)
---
httpd.spec | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/httpd.spec b/httpd.spec
index 5363e54..d53c385 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -13,7 +13,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.39
-Release: 2%{?dist}
+Release: 3%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -463,7 +463,7 @@ ln -s ../../pixmaps/poweredby.png \
# symlinks for /etc/httpd
rmdir $RPM_BUILD_ROOT/etc/httpd/{state,run}
ln -s ../..%{_localstatedir}/log/httpd $RPM_BUILD_ROOT/etc/httpd/logs
-ln -s ../..%{_localstatedir}/lib/httpd/state $RPM_BUILD_ROOT/etc/httpd/state
+ln -s ../..%{_localstatedir}/lib/httpd $RPM_BUILD_ROOT/etc/httpd/state
ln -s /run/httpd $RPM_BUILD_ROOT/etc/httpd/run
ln -s ../..%{_libdir}/httpd/modules $RPM_BUILD_ROOT/etc/httpd/modules
@@ -731,6 +731,9 @@ exit $rv
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Tue Apr 9 2019 Joe Orton - 2.4.39-3
+- fix statedir symlink to point to /var/lib/httpd (#1697662)
+
* Tue Apr 02 2019 Lubos Uhliarik - 2.4.39-2
- update to 2.4.39
From fc242751072a1f65e8c8d0f8e81210a2e32ea282 Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Tue, 16 Apr 2019 08:49:29 +0100
Subject: [PATCH 163/359] - mod_reqtimeout: fix default values regression (PR
63325)
---
httpd-2.4.37-r1857129.patch | 65 +++++++++++++++++++++++++++++++++++++
httpd.spec | 4 +++
2 files changed, 69 insertions(+)
create mode 100644 httpd-2.4.37-r1857129.patch
diff --git a/httpd-2.4.37-r1857129.patch b/httpd-2.4.37-r1857129.patch
new file mode 100644
index 0000000..4dbf05a
--- /dev/null
+++ b/httpd-2.4.37-r1857129.patch
@@ -0,0 +1,65 @@
+# ./pullrev.sh 1857129
+http://svn.apache.org/viewvc?view=revision&revision=1857129
+
+--- httpd-2.4.37/modules/filters/mod_reqtimeout.c
++++ httpd-2.4.37/modules/filters/mod_reqtimeout.c
+@@ -31,7 +31,7 @@
+ #define UNSET -1
+ #define MRT_DEFAULT_handshake_TIMEOUT 0 /* disabled */
+ #define MRT_DEFAULT_handshake_MAX_TIMEOUT 0
+-#define MRT_DEFAULT_handshake_MIN_RATE APR_INT32_MAX
++#define MRT_DEFAULT_handshake_MIN_RATE 0
+ #define MRT_DEFAULT_header_TIMEOUT 20
+ #define MRT_DEFAULT_header_MAX_TIMEOUT 40
+ #define MRT_DEFAULT_header_MIN_RATE 500
+@@ -220,7 +220,7 @@
+ if (block == APR_NONBLOCK_READ || mode == AP_MODE_INIT
+ || mode == AP_MODE_EATCRLF) {
+ rv = ap_get_brigade(f->next, bb, mode, block, readbytes);
+- if (ccfg->cur_stage.rate_factor > 0 && rv == APR_SUCCESS) {
++ if (ccfg->cur_stage.rate_factor && rv == APR_SUCCESS) {
+ extend_timeout(ccfg, bb);
+ }
+ return rv;
+@@ -254,7 +254,7 @@
+ }
+
+ if (!APR_BRIGADE_EMPTY(bb)) {
+- if (ccfg->cur_stage.rate_factor > 0) {
++ if (ccfg->cur_stage.rate_factor) {
+ extend_timeout(ccfg, bb);
+ }
+
+@@ -315,7 +315,7 @@
+ * the real (relevant) bytes to be asked later, within the
+ * currently alloted time.
+ */
+- if (ccfg->cur_stage.rate_factor > 0 && rv == APR_SUCCESS
++ if (ccfg->cur_stage.rate_factor && rv == APR_SUCCESS
+ && mode != AP_MODE_SPECULATIVE) {
+ extend_timeout(ccfg, bb);
+ }
+@@ -638,17 +638,17 @@
+ ap_hook_post_read_request(reqtimeout_before_body, NULL, NULL,
+ APR_HOOK_MIDDLE);
+
+-#if MRT_DEFAULT_HANDSHAKE_MIN_RATE > 0
++#if MRT_DEFAULT_handshake_MIN_RATE
+ default_handshake_rate_factor = apr_time_from_sec(1) /
+- MRT_DEFAULT_HANDSHAKE_MIN_RATE;
++ MRT_DEFAULT_handshake_MIN_RATE;
+ #endif
+-#if MRT_DEFAULT_HEADER_MIN_RATE > 0
++#if MRT_DEFAULT_header_MIN_RATE
+ default_header_rate_factor = apr_time_from_sec(1) /
+- MRT_DEFAULT_HEADER_MIN_RATE;
++ MRT_DEFAULT_header_MIN_RATE;
+ #endif
+-#if MRT_DEFAULT_BODY_MIN_RATE > 0
++#if MRT_DEFAULT_body_MIN_RATE
+ default_body_rate_factor = apr_time_from_sec(1) /
+- MRT_DEFAULT_BODY_MIN_RATE;
++ MRT_DEFAULT_body_MIN_RATE;
+ #endif
+ }
+
diff --git a/httpd.spec b/httpd.spec
index d53c385..52287af 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -81,6 +81,8 @@ Patch39: httpd-2.4.37-sslprotdefault.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1397243
Patch58: httpd-2.4.34-r1738878.patch
Patch60: httpd-2.4.34-enable-sslv3.patch
+# https://bz.apache.org/bugzilla/show_bug.cgi?id=63325
+Patch61: httpd-2.4.37-r1857129.patch
# Security fixes
@@ -228,6 +230,7 @@ interface for storing and accessing per-user session data.
%patch58 -p1 -b .r1738878
%patch60 -p1 -b .enable-sslv3
+%patch61 -p1 -b .r1857129
# Patch in the vendor string
sed -i '/^#define PLATFORM/s/Unix/%{vstring}/' os/unix/os.h
@@ -733,6 +736,7 @@ exit $rv
%changelog
* Tue Apr 9 2019 Joe Orton - 2.4.39-3
- fix statedir symlink to point to /var/lib/httpd (#1697662)
+- mod_reqtimeout: fix default values regression (PR 63325)
* Tue Apr 02 2019 Lubos Uhliarik - 2.4.39-2
- update to 2.4.39
From db627365881ba25e590d64695738231fffcd8bc3 Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Tue, 16 Apr 2019 09:10:28 +0100
Subject: [PATCH 164/359] - fix systemd_postun usage.
---
httpd.spec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/httpd.spec b/httpd.spec
index 52287af..cdd7ff1 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -546,7 +546,7 @@ exit 0
%systemd_preun httpd.service htcacheclean.service httpd.socket
%postun
-%systemd_postun
+%systemd_postun httpd.service htcacheclean.service httpd.socket
# Trigger for conversion from SysV, per guidelines at:
# https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Systemd
From bc95575bf53f74d3196619fc05f39332e7d731c7 Mon Sep 17 00:00:00 2001
From: Lubos Uhliarik
Date: Thu, 2 May 2019 14:46:02 +0000
Subject: [PATCH 165/359] httpd dependency on initscripts is unspecified
(#1705188)
- substitute "service" cmd by "httpd" with -t arg
Resolves: #1705188
---
apachectl.sh | 3 ++-
httpd.spec | 8 +++++++-
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/apachectl.sh b/apachectl.sh
index ee2dba8..77868fe 100755
--- a/apachectl.sh
+++ b/apachectl.sh
@@ -22,6 +22,7 @@ fi
ACMD="$1"
ARGV="$@"
SVC='httpd.service'
+HTTPD='@HTTPDBIN@'
if [ "x$2" != "x" ] ; then
echo Passing arguments to httpd using apachectl is no longer supported.
@@ -49,7 +50,7 @@ graceful-stop)
ERROR=$?
;;
configtest)
- /usr/sbin/service ${SVC/.service//} $ACMD
+ $HTTPD -t
ERROR=$?
;;
*)
diff --git a/httpd.spec b/httpd.spec
index cdd7ff1..00094c6 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -13,7 +13,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.39
-Release: 3%{?dist}
+Release: 4%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -414,6 +414,9 @@ sed -i \
s,@@Port@@,80,;" \
docs/conf/extra/*.conf
+# Set correct path for httpd binary in apachectl script
+sed -i 's,@HTTPDBIN@,%{_sbindir}/httpd,g' $RPM_SOURCE_DIR/apachectl.sh
+
# Create cache directory
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/cache/httpd \
$RPM_BUILD_ROOT%{_localstatedir}/cache/httpd/proxy \
@@ -734,6 +737,9 @@ exit $rv
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Thu May 02 2019 Lubos Uhliarik - 2.4.39-4
+- httpd dependency on initscripts is unspecified (#1705188)
+
* Tue Apr 9 2019 Joe Orton - 2.4.39-3
- fix statedir symlink to point to /var/lib/httpd (#1697662)
- mod_reqtimeout: fix default values regression (PR 63325)
From 67d32a785dc7bd653e149066f242071bfcb5a315 Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Wed, 12 Jun 2019 10:48:06 +0100
Subject: [PATCH 166/359] fixes for StateDir directive (upstream r1857731,
r1857731)
---
...929+.patch => httpd-2.4.39-r1842929+.patch | 148 ++++++++++++------
httpd.spec | 7 +-
2 files changed, 105 insertions(+), 50 deletions(-)
rename httpd-2.4.37-r1842929+.patch => httpd-2.4.39-r1842929+.patch (75%)
diff --git a/httpd-2.4.37-r1842929+.patch b/httpd-2.4.39-r1842929+.patch
similarity index 75%
rename from httpd-2.4.37-r1842929+.patch
rename to httpd-2.4.39-r1842929+.patch
index e841e34..50f8aa1 100644
--- a/httpd-2.4.37-r1842929+.patch
+++ b/httpd-2.4.39-r1842929+.patch
@@ -1,10 +1,12 @@
-# ./pullrev.sh 1842929 1842931
+# ./pullrev.sh 1842929 1842931 1852982 1853631 1857731
http://svn.apache.org/viewvc?view=revision&revision=1842929
http://svn.apache.org/viewvc?view=revision&revision=1842931
http://svn.apache.org/viewvc?view=revision&revision=1852982
+http://svn.apache.org/viewvc?view=revision&revision=1857731
+http://svn.apache.org/viewvc?view=revision&revision=1853631
---- httpd-2.4.38/acinclude.m4.r1842929+
-+++ httpd-2.4.38/acinclude.m4
+--- httpd-2.4.39/acinclude.m4.r1842929+
++++ httpd-2.4.39/acinclude.m4
@@ -45,6 +45,7 @@
APACHE_SUBST(installbuilddir)
APACHE_SUBST(runtimedir)
@@ -21,8 +23,8 @@ http://svn.apache.org/viewvc?view=revision&revision=1852982
])
dnl
---- httpd-2.4.38/config.layout.r1842929+
-+++ httpd-2.4.38/config.layout
+--- httpd-2.4.39/config.layout.r1842929+
++++ httpd-2.4.39/config.layout
@@ -29,6 +29,7 @@
includedir: ${prefix}/include
localstatedir: ${prefix}
@@ -143,8 +145,8 @@ http://svn.apache.org/viewvc?view=revision&revision=1852982
logfiledir: ${localstatedir}/log/httpd
proxycachedir: ${localstatedir}/cache/httpd
---- httpd-2.4.38/configure.in.r1842929+
-+++ httpd-2.4.38/configure.in
+--- httpd-2.4.39/configure.in.r1842929+
++++ httpd-2.4.39/configure.in
@@ -41,7 +41,7 @@
AC_PREFIX_DEFAULT(/usr/local/apache2)
@@ -154,8 +156,8 @@ http://svn.apache.org/viewvc?view=revision&revision=1852982
dnl reparse the configure arguments.
APR_PARSE_ARGUMENTS
---- httpd-2.4.38/include/ap_config_layout.h.in.r1842929+
-+++ httpd-2.4.38/include/ap_config_layout.h.in
+--- httpd-2.4.39/include/ap_config_layout.h.in.r1842929+
++++ httpd-2.4.39/include/ap_config_layout.h.in
@@ -60,5 +60,7 @@
#define DEFAULT_REL_LOGFILEDIR "@rel_logfiledir@"
#define DEFAULT_EXP_PROXYCACHEDIR "@exp_proxycachedir@"
@@ -164,8 +166,8 @@ http://svn.apache.org/viewvc?view=revision&revision=1852982
+#define DEFAULT_REL_STATEDIR "@rel_statedir@"
#endif /* AP_CONFIG_LAYOUT_H */
---- httpd-2.4.38/include/http_config.h.r1842929+
-+++ httpd-2.4.38/include/http_config.h
+--- httpd-2.4.39/include/http_config.h.r1842929+
++++ httpd-2.4.39/include/http_config.h
@@ -757,6 +757,14 @@
*/
AP_DECLARE(char *) ap_runtime_dir_relative(apr_pool_t *p, const char *fname);
@@ -181,8 +183,8 @@ http://svn.apache.org/viewvc?view=revision&revision=1852982
/* Finally, the hook for dynamically loading modules in... */
/**
---- httpd-2.4.38/Makefile.in.r1842929+
-+++ httpd-2.4.38/Makefile.in
+--- httpd-2.4.39/Makefile.in.r1842929+
++++ httpd-2.4.39/Makefile.in
@@ -213,6 +213,7 @@
install-other:
@test -d $(DESTDIR)$(logfiledir) || $(MKINSTALLDIRS) $(DESTDIR)$(logfiledir)
@@ -191,8 +193,8 @@ http://svn.apache.org/viewvc?view=revision&revision=1852982
@for ext in dll x; do \
file=apachecore.$$ext; \
if test -f $$file; then \
---- httpd-2.4.38/modules/dav/fs/mod_dav_fs.c.r1842929+
-+++ httpd-2.4.38/modules/dav/fs/mod_dav_fs.c
+--- httpd-2.4.39/modules/dav/fs/mod_dav_fs.c.r1842929+
++++ httpd-2.4.39/modules/dav/fs/mod_dav_fs.c
@@ -29,6 +29,10 @@
extern module AP_MODULE_DECLARE_DATA dav_fs_module;
@@ -204,22 +206,43 @@ http://svn.apache.org/viewvc?view=revision&revision=1852982
const char *dav_get_lockdb_path(const request_rec *r)
{
dav_fs_server_conf *conf;
-@@ -39,7 +43,11 @@
-
- static void *dav_fs_create_server_config(apr_pool_t *p, server_rec *s)
- {
-- return apr_pcalloc(p, sizeof(dav_fs_server_conf));
-+ dav_fs_server_conf *conf = apr_pcalloc(p, sizeof(dav_fs_server_conf));
-+
-+ conf->lockdb_path = ap_state_dir_relative(p, DEFAULT_DAV_LOCKDB);
-+
-+ return conf;
+@@ -57,6 +61,24 @@
+ return newconf;
}
- static void *dav_fs_merge_server_config(apr_pool_t *p,
---- httpd-2.4.38/modules/md/mod_md_config.c.r1842929+
-+++ httpd-2.4.38/modules/md/mod_md_config.c
-@@ -54,10 +54,14 @@
++static apr_status_t dav_fs_post_config(apr_pool_t *p, apr_pool_t *plog,
++ apr_pool_t *ptemp, server_rec *base_server)
++{
++ server_rec *s;
++
++ for (s = base_server; s; s = s->next) {
++ dav_fs_server_conf *conf;
++
++ conf = ap_get_module_config(s->module_config, &dav_fs_module);
++
++ if (!conf->lockdb_path) {
++ conf->lockdb_path = ap_state_dir_relative(p, DEFAULT_DAV_LOCKDB);
++ }
++ }
++
++ return OK;
++}
++
+ /*
+ * Command handler for the DAVLockDB directive, which is TAKE1
+ */
+@@ -87,6 +109,8 @@
+
+ static void register_hooks(apr_pool_t *p)
+ {
++ ap_hook_post_config(dav_fs_post_config, NULL, NULL, APR_HOOK_MIDDLE);
++
+ dav_hook_gather_propsets(dav_fs_gather_propsets, NULL, NULL,
+ APR_HOOK_MIDDLE);
+ dav_hook_find_liveprop(dav_fs_find_liveprop, NULL, NULL, APR_HOOK_MIDDLE);
+--- httpd-2.4.39/modules/md/mod_md_config.c.r1842929+
++++ httpd-2.4.39/modules/md/mod_md_config.c
+@@ -54,10 +54,18 @@
#define DEF_VAL (-1)
@@ -231,20 +254,29 @@ http://svn.apache.org/viewvc?view=revision&revision=1852982
static md_mod_conf_t defmc = {
NULL,
- "md",
-+ NULL,
++#if 1
++ NULL, /* apply default state-dir-relative */
++#else
++ MD_DEFAULT_BASE_DIR,
++#endif
NULL,
NULL,
80,
-@@ -112,6 +116,7 @@
- memcpy(mod_md_config, &defmc, sizeof(*mod_md_config));
- mod_md_config->mds = apr_array_make(pool, 5, sizeof(const md_t *));
- mod_md_config->unused_names = apr_array_make(pool, 5, sizeof(const md_t *));
-+ mod_md_config->base_dir = ap_state_dir_relative(pool, MD_DEFAULT_BASE_DIR);
-
- apr_pool_cleanup_register(pool, NULL, cleanup_mod_config, apr_pool_cleanup_null);
+@@ -864,6 +872,12 @@
+ if (mc->hsts_max_age > 0) {
+ mc->hsts_header = apr_psprintf(p, "max-age=%d", mc->hsts_max_age);
}
---- httpd-2.4.38/server/core.c.r1842929+
-+++ httpd-2.4.38/server/core.c
++
++#if 1
++ if (mc->base_dir == NULL) {
++ mc->base_dir = ap_state_dir_relative(p, MD_DEFAULT_BASE_DIR);
++ }
++#endif
+
+ return APR_SUCCESS;
+ }
+--- httpd-2.4.39/server/core.c.r1842929+
++++ httpd-2.4.39/server/core.c
@@ -129,6 +129,8 @@
AP_DECLARE_DATA int ap_run_mode = AP_SQ_RM_UNKNOWN;
AP_DECLARE_DATA int ap_config_generation = 0;
@@ -254,7 +286,25 @@ http://svn.apache.org/viewvc?view=revision&revision=1852982
static void *create_core_dir_config(apr_pool_t *a, char *dir)
{
core_dir_config *conf;
-@@ -3104,6 +3106,24 @@
+@@ -1409,12 +1411,15 @@
+ return res_buf;
+ }
+
+-static int reset_config_defines(void *dummy)
++/* pconf cleanup - clear global variables set from config here. */
++static apr_status_t reset_config(void *dummy)
+ {
+ ap_server_config_defines = saved_server_config_defines;
+ saved_server_config_defines = NULL;
+ server_config_defined_vars = NULL;
+- return OK;
++ core_state_dir = NULL;
++
++ return APR_SUCCESS;
+ }
+
+ /*
+@@ -3113,6 +3118,24 @@
return NULL;
}
@@ -279,7 +329,7 @@ http://svn.apache.org/viewvc?view=revision&revision=1852982
static const char *set_timeout(cmd_parms *cmd, void *dummy, const char *arg)
{
const char *err = ap_check_cmd_context(cmd, NOT_IN_DIR_CONTEXT);
-@@ -4398,6 +4418,8 @@
+@@ -4407,6 +4430,8 @@
"Common directory of server-related files (logs, confs, etc.)"),
AP_INIT_TAKE1("DefaultRuntimeDir", set_runtime_dir, NULL, RSRC_CONF | EXEC_ON_READ,
"Common directory for run-time files (shared memory, locks, etc.)"),
@@ -288,15 +338,17 @@ http://svn.apache.org/viewvc?view=revision&revision=1852982
AP_INIT_TAKE1("ErrorLog", set_server_string_slot,
(void *)APR_OFFSETOF(server_rec, error_fname), RSRC_CONF,
"The filename of the error log"),
-@@ -4927,6 +4949,7 @@
+@@ -4934,8 +4959,7 @@
+
+ if (!saved_server_config_defines)
+ init_config_defines(pconf);
+- apr_pool_cleanup_register(pconf, NULL, reset_config_defines,
+- apr_pool_cleanup_null);
++ apr_pool_cleanup_register(pconf, NULL, reset_config, apr_pool_cleanup_null);
+
ap_regcomp_set_default_cflags(AP_REG_DOLLAR_ENDONLY);
- mpm_common_pre_config(pconf);
-+ core_state_dir = NULL;
-
- return OK;
- }
-@@ -5150,6 +5173,27 @@
+@@ -5163,6 +5187,27 @@
}
}
diff --git a/httpd.spec b/httpd.spec
index 00094c6..9351fde 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -13,7 +13,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.39
-Release: 4%{?dist}
+Release: 5%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -63,7 +63,7 @@ Patch3: httpd-2.4.1-deplibs.patch
# Needed for socket activation and mod_systemd patch
Patch19: httpd-2.4.25-detect-systemd.patch
# Features/functional changes
-Patch21: httpd-2.4.37-r1842929+.patch
+Patch21: httpd-2.4.39-r1842929+.patch
Patch23: httpd-2.4.33-export.patch
Patch24: httpd-2.4.1-corelimit.patch
Patch25: httpd-2.4.25-selinux.patch
@@ -737,6 +737,9 @@ exit $rv
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Wed Jun 12 2019 Joe Orton - 2.4.39-5
+- fixes for StateDir directive (upstream r1857731, r1857731)
+
* Thu May 02 2019 Lubos Uhliarik - 2.4.39-4
- httpd dependency on initscripts is unspecified (#1705188)
From 720c6f392bad265bb6f9b8be05d2a8de536b3289 Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Thu, 13 Jun 2019 16:37:06 +0100
Subject: [PATCH 167/359] mod_ssl: fix "httpd -L" (etc) before
httpd-init.service runs
---
httpd-2.4.39-r1861269.patch | 24 ++++++++++++++++++++++++
httpd.spec | 7 ++++++-
2 files changed, 30 insertions(+), 1 deletion(-)
create mode 100644 httpd-2.4.39-r1861269.patch
diff --git a/httpd-2.4.39-r1861269.patch b/httpd-2.4.39-r1861269.patch
new file mode 100644
index 0000000..4142e3c
--- /dev/null
+++ b/httpd-2.4.39-r1861269.patch
@@ -0,0 +1,24 @@
+# ./pullrev.sh r1861269
+http://svn.apache.org/viewvc?view=revision&revision=r1861269
+
+Allows "httpd -L" etc to work before httpd-init.service has run,
+if mod_ssl is installed.
+
+--- httpd-2.4.37/modules/ssl/ssl_engine_config.c
++++ httpd-2.4.37/modules/ssl/ssl_engine_config.c
+@@ -904,8 +904,14 @@
+ static const char *ssl_cmd_check_file(cmd_parms *parms,
+ const char **file)
+ {
+- const char *filepath = ap_server_root_relative(parms->pool, *file);
++ const char *filepath;
+
++ /* If only dumping the config, don't verify the paths */
++ if (ap_state_query(AP_SQ_RUN_MODE) == AP_SQ_RM_CONFIG_DUMP) {
++ return NULL;
++ }
++
++ filepath = ap_server_root_relative(parms->pool, *file);
+ if (!filepath) {
+ return apr_pstrcat(parms->pool, parms->cmd->name,
+ ": Invalid file path ", *file, NULL);
diff --git a/httpd.spec b/httpd.spec
index 9351fde..ab05228 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -13,7 +13,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.39
-Release: 5%{?dist}
+Release: 6%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -76,6 +76,7 @@ Patch34: httpd-2.4.17-socket-activation.patch
Patch36: httpd-2.4.38-r1830819+.patch
Patch38: httpd-2.4.34-sslciphdefault.patch
Patch39: httpd-2.4.37-sslprotdefault.patch
+Patch40: httpd-2.4.39-r1861269.patch
# Bug fixes
# https://bugzilla.redhat.com/show_bug.cgi?id=1397243
@@ -227,6 +228,7 @@ interface for storing and accessing per-user session data.
%patch36 -p1 -b .r1830819+
%patch38 -p1 -b .sslciphdefault
%patch39 -p1 -b .sslprotdefault
+%patch40 -p1 -b .r1861269
%patch58 -p1 -b .r1738878
%patch60 -p1 -b .enable-sslv3
@@ -737,6 +739,9 @@ exit $rv
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Thu Jun 13 2019 Joe Orton - 2.4.39-6
+- mod_ssl: fix "httpd -L" (etc) before httpd-init.service runs
+
* Wed Jun 12 2019 Joe Orton - 2.4.39-5
- fixes for StateDir directive (upstream r1857731, r1857731)
From e945a601cafc320679bffd9d3a2d75e4b3a5c4ff Mon Sep 17 00:00:00 2001
From: Lubos Uhliarik
Date: Thu, 13 Jun 2019 17:38:40 +0200
Subject: [PATCH 168/359] Removed bundled mod_md
---
01-md.conf | 1 -
httpd.spec | 28 ++++++----------------------
2 files changed, 6 insertions(+), 23 deletions(-)
delete mode 100644 01-md.conf
diff --git a/01-md.conf b/01-md.conf
deleted file mode 100644
index 2739202..0000000
--- a/01-md.conf
+++ /dev/null
@@ -1 +0,0 @@
-LoadModule md_module modules/mod_md.so
diff --git a/httpd.spec b/httpd.spec
index 9351fde..06e7af5 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -13,7 +13,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.39
-Release: 5%{?dist}
+Release: 6%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -44,7 +44,6 @@ Source25: 01-session.conf
Source26: 10-listen443.conf
Source27: httpd.socket
Source28: 00-optional.conf
-Source29: 01-md.conf
Source30: README.confd
Source31: README.confmod
Source32: httpd.service.xml
@@ -167,18 +166,6 @@ The mod_ssl module provides strong cryptography for the Apache Web
server via the Secure Sockets Layer (SSL) and Transport Layer
Security (TLS) protocols.
-%package -n mod_md
-Summary: Certificate provisioning using ACME for the Apache HTTP Server
-Requires: httpd = 0:%{version}-%{release}, httpd-mmn = %{mmnisa}
-BuildRequires: jansson-devel, libcurl-devel
-
-%description -n mod_md
-This module manages common properties of domains for one or more
-virtual hosts. Specifically it can use the ACME protocol (RFC Draft)
-to automate certificate provisioning. These will be configured for
-managed domains and their virtual hosts automatically. This includes
-renewal of certificates before they expire.
-
%package -n mod_proxy_html
Summary: HTML and XML content filters for the Apache HTTP Server
Requires: httpd = 0:%{version}-%{release}, httpd-mmn = %{mmnisa}
@@ -328,6 +315,7 @@ export LYNX_PATH=/usr/bin/links
--enable-authn-anon --enable-authn-alias \
--disable-imagemap --disable-file-cache \
--disable-http2 \
+ --disable-md \
$*
make %{?_smp_mflags}
@@ -353,8 +341,7 @@ install -m 644 $RPM_SOURCE_DIR/README.confmod \
$RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.modules.d/README
for f in 00-base.conf 00-mpm.conf 00-lua.conf 01-cgi.conf 00-dav.conf \
00-proxy.conf 00-ssl.conf 01-ldap.conf 00-proxyhtml.conf \
- 01-ldap.conf 00-systemd.conf 01-session.conf 00-optional.conf \
- 01-md.conf; do
+ 01-ldap.conf 00-systemd.conf 01-session.conf 00-optional.conf; do
install -m 644 -p $RPM_SOURCE_DIR/$f \
$RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.modules.d/$f
done
@@ -621,7 +608,6 @@ exit $rv
%exclude %{_sysconfdir}/httpd/conf.modules.d/00-proxyhtml.conf
%exclude %{_sysconfdir}/httpd/conf.modules.d/01-ldap.conf
%exclude %{_sysconfdir}/httpd/conf.modules.d/01-session.conf
-%exclude %{_sysconfdir}/httpd/conf.modules.d/01-md.conf
%config(noreplace) %{_sysconfdir}/sysconfig/htcacheclean
%ghost %{_sysconfdir}/sysconfig/httpd
@@ -641,7 +627,6 @@ exit $rv
%{_libdir}/httpd/modules/mod*.so
%exclude %{_libdir}/httpd/modules/mod_auth_form.so
%exclude %{_libdir}/httpd/modules/mod_ssl.so
-%exclude %{_libdir}/httpd/modules/mod_md.so
%exclude %{_libdir}/httpd/modules/mod_*ldap.so
%exclude %{_libdir}/httpd/modules/mod_proxy_html.so
%exclude %{_libdir}/httpd/modules/mod_xml2enc.so
@@ -723,10 +708,6 @@ exit $rv
%{_libdir}/httpd/modules/mod_auth_form.so
%config(noreplace) %{_sysconfdir}/httpd/conf.modules.d/01-session.conf
-%files -n mod_md
-%{_libdir}/httpd/modules/mod_md.so
-%config(noreplace) %{_sysconfdir}/httpd/conf.modules.d/01-md.conf
-
%files devel
%{_includedir}/httpd
%{_bindir}/apxs
@@ -737,6 +718,9 @@ exit $rv
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Thu Jun 13 2019 Lubos Uhliarik - 2.4.39-6
+- remove bundled mod_md module
+
* Wed Jun 12 2019 Joe Orton - 2.4.39-5
- fixes for StateDir directive (upstream r1857731, r1857731)
From 10963a8dadf029141ca95f45c0bf5c622d98ab9b Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Thu, 20 Jun 2019 11:52:17 +0100
Subject: [PATCH 169/359] remove superfluous ap_hack_ symbols from httpd binary
more verbose %check section
---
httpd-2.4.33-export.patch | 20 --------------
httpd-2.4.39-export.patch | 58 +++++++++++++++++++++++++++++++++++++++
httpd.spec | 41 +++++++++++++++++++++------
3 files changed, 90 insertions(+), 29 deletions(-)
delete mode 100644 httpd-2.4.33-export.patch
create mode 100644 httpd-2.4.39-export.patch
diff --git a/httpd-2.4.33-export.patch b/httpd-2.4.33-export.patch
deleted file mode 100644
index 9adf398..0000000
--- a/httpd-2.4.33-export.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-
-There is no need to "suck in" the apr/apr-util symbols when using
-a shared libapr{,util}, it just bloats the symbol table; so don't.
-
-Upstream-HEAD: needed
-Upstream-2.0: omit
-Upstream-Status: EXPORT_DIRS change is conditional on using shared apr
-
---- httpd-2.4.33/server/Makefile.in.export
-+++ httpd-2.4.33/server/Makefile.in
-@@ -60,9 +60,6 @@
- ls $$dir/*.h ; \
- done; \
- echo "$(top_srcdir)/server/mpm_fdqueue.h"; \
-- for dir in $(EXPORT_DIRS_APR); do \
-- ls $$dir/ap[ru].h $$dir/ap[ru]_*.h 2>/dev/null; \
-- done; \
- ) | sed -e s,//,/,g | sort -u > $@
-
- exports.c: export_files
diff --git a/httpd-2.4.39-export.patch b/httpd-2.4.39-export.patch
new file mode 100644
index 0000000..e343b22
--- /dev/null
+++ b/httpd-2.4.39-export.patch
@@ -0,0 +1,58 @@
+
+Reduce size of httpd binary by telling linker to export all symbols
+from libmain.a, rather than bloating the symbol table with ap_hack_*
+to do so indirectly.
+
+Upstream-HEAD: needed
+Upstream-2.0: omit
+
+--- httpd-2.4.39/Makefile.in.export
++++ httpd-2.4.39/Makefile.in
+@@ -4,8 +4,15 @@
+
+ PROGRAM_NAME = $(progname)
+ PROGRAM_SOURCES = modules.c
+-PROGRAM_LDADD = buildmark.o $(HTTPD_LDFLAGS) $(PROGRAM_DEPENDENCIES) $(HTTPD_LIBS) $(EXTRA_LIBS) $(AP_LIBS) $(LIBS)
++PROGRAM_LDADD = buildmark.o $(HTTPD_LDFLAGS) \
++ $(PROGRAM_LDDEPS) \
++ $(HTTPD_LIBS) $(EXTRA_LIBS) $(AP_LIBS) $(LIBS)
+ PROGRAM_PRELINK = $(COMPILE) -c $(top_srcdir)/server/buildmark.c
++PROGRAM_LDDEPS = \
++ $(BUILTIN_LIBS) \
++ $(MPM_LIB) \
++ -Wl,--whole-archive,server/.libs/libmain.a,--no-whole-archive \
++ os/$(OS_DIR)/libos.la
+ PROGRAM_DEPENDENCIES = \
+ server/libmain.la \
+ $(BUILTIN_LIBS) \
+--- httpd-2.4.39/server/main.c.export
++++ httpd-2.4.39/server/main.c
+@@ -835,17 +835,3 @@
+ return !OK;
+ }
+
+-#ifdef AP_USING_AUTOCONF
+-/* This ugly little hack pulls any function referenced in exports.c into
+- * the web server. exports.c is generated during the build, and it
+- * has all of the APR functions specified by the apr/apr.exports and
+- * apr-util/aprutil.exports files.
+- */
+-const void *ap_suck_in_APR(void);
+-const void *ap_suck_in_APR(void)
+-{
+- extern const void *ap_ugly_hack;
+-
+- return ap_ugly_hack;
+-}
+-#endif
+--- httpd-2.4.39/server/Makefile.in.export
++++ httpd-2.4.39/server/Makefile.in
+@@ -12,7 +12,7 @@
+ connection.c listen.c util_mutex.c \
+ mpm_common.c mpm_unix.c mpm_fdqueue.c \
+ util_charset.c util_cookies.c util_debug.c util_xml.c \
+- util_filter.c util_pcre.c util_regex.c exports.c \
++ util_filter.c util_pcre.c util_regex.c \
+ scoreboard.c error_bucket.c protocol.c core.c request.c provider.c \
+ eoc_bucket.c eor_bucket.c core_filters.c \
+ util_expr_parse.c util_expr_scan.c util_expr_eval.c
diff --git a/httpd.spec b/httpd.spec
index 40af3b5..860f8af 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -13,7 +13,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.39
-Release: 7%{?dist}
+Release: 8%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -63,7 +63,7 @@ Patch3: httpd-2.4.1-deplibs.patch
Patch19: httpd-2.4.25-detect-systemd.patch
# Features/functional changes
Patch21: httpd-2.4.39-r1842929+.patch
-Patch23: httpd-2.4.33-export.patch
+Patch23: httpd-2.4.39-export.patch
Patch24: httpd-2.4.1-corelimit.patch
Patch25: httpd-2.4.25-selinux.patch
Patch26: httpd-2.4.4-r1337344+.patch
@@ -556,19 +556,36 @@ test -f /etc/sysconfig/httpd-disable-posttrans || \
/bin/systemctl try-restart --no-block httpd.service htcacheclean.service >/dev/null 2>&1 || :
%check
-# Check the built modules are all PIC
-if readelf -d $RPM_BUILD_ROOT%{_libdir}/httpd/modules/*.so | grep TEXTREL; then
- : modules contain non-relocatable code
- exit 1
-fi
+make -C server exports.o
+nm --defined httpd > exports-actual.list
set +x
rv=0
+nm --defined-only server/exports.o | \
+ sed -n '/ap_hack_/{s/.* ap_hack_//;/^ap[ru]/d;p;}' | \
+ while read sym; do
+ if ! grep -q " "$sym\$ exports-actual.list; then
+ echo ERROR: Symbol $sym missing in httpd exports
+ rv=1
+ fi
+ done
+if [ $rv -eq 0 ]; then
+ echo PASS: Symbol export list verified.
+fi
+# Check the built modules are all PIC
+if readelf -d $RPM_BUILD_ROOT%{_libdir}/httpd/modules/*.so | grep TEXTREL; then
+ echo FAIL: Modules contain non-relocatable code
+ rv=1
+else
+ echo PASS: No non-relocatable code in module builds
+fi
# Ensure every mod_* that's built is loaded.
for f in $RPM_BUILD_ROOT%{_libdir}/httpd/modules/*.so; do
m=${f##*/}
if ! grep -q $m $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.modules.d/*.conf; then
- echo ERROR: Module $m not configured. Disable it, or load it.
+ echo FAIL: Module $m not configured. Disable it, or load it.
rv=1
+ else
+ echo PASS: Module $m is configured and loaded.
fi
done
# Ensure every loaded mod_* is actually built
@@ -576,8 +593,10 @@ mods=`grep -h ^LoadModule $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.modules.d/*.c
for m in $mods; do
f=$RPM_BUILD_ROOT%{_libdir}/httpd/modules/${m}
if ! test -x $f; then
- echo ERROR: Module $m is configured but not built.
+ echo FAIL: Module $m is configured but not built.
rv=1
+ else
+ echo PASS: Loaded module $m is installed.
fi
done
set -x
@@ -720,6 +739,10 @@ exit $rv
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Thu Jun 20 2019 Joe Orton - 2.4.39-8
+- remove superfluous ap_hack_ symbols from httpd binary
+- more verbose %%check section
+
* Thu Jun 13 2019 Lubos Uhliarik - 2.4.39-7
- remove bundled mod_md module
From eb4dbe737f56b6380c7a69d5a65f9ef40ab390ca Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Thu, 20 Jun 2019 15:41:26 +0100
Subject: [PATCH 170/359] Now upstream though in a more complicated way which
is opt-in.
---
httpd-2.4.39-export.patch | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/httpd-2.4.39-export.patch b/httpd-2.4.39-export.patch
index e343b22..b20a6e7 100644
--- a/httpd-2.4.39-export.patch
+++ b/httpd-2.4.39-export.patch
@@ -3,8 +3,7 @@ Reduce size of httpd binary by telling linker to export all symbols
from libmain.a, rather than bloating the symbol table with ap_hack_*
to do so indirectly.
-Upstream-HEAD: needed
-Upstream-2.0: omit
+Upstream: https://svn.apache.org/r1861685 (as new default-off configure option)
--- httpd-2.4.39/Makefile.in.export
+++ httpd-2.4.39/Makefile.in
From b18b77bc684aac41fe1a9b8c1dc8d491fe051045 Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Fri, 21 Jun 2019 09:00:52 +0100
Subject: [PATCH 171/359] create instance-specific StateDir in httpd@.service,
instance.conf
---
httpd.spec | 5 ++++-
httpd@.service | 2 ++
instance.conf | 5 +++--
3 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/httpd.spec b/httpd.spec
index 860f8af..32cb463 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -13,7 +13,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.39
-Release: 8%{?dist}
+Release: 9%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -739,6 +739,9 @@ exit $rv
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Fri Jun 21 2019 Joe Orton - 2.4.39-9
+- create instance-specific StateDir in httpd@.service, instance.conf
+
* Thu Jun 20 2019 Joe Orton - 2.4.39-8
- remove superfluous ap_hack_ symbols from httpd binary
- more verbose %%check section
diff --git a/httpd@.service b/httpd@.service
index c58ae88..7649dff 100644
--- a/httpd@.service
+++ b/httpd@.service
@@ -12,6 +12,8 @@ Environment=LANG=C
Environment=HTTPD_INSTANCE=%i
ExecStartPre=/bin/mkdir -m 710 -p /run/httpd/instance-%i
ExecStartPre=/bin/chown root.apache /run/httpd/instance-%i
+ExecStartPre=/bin/mkdir -m 700 -p /var/lib/httpd/instance-%i
+ExecStartPre=/bin/chown apache.apache /var/lib/httpd/instance-%i
ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND -f conf/%i.conf
ExecReload=/usr/sbin/httpd $OPTIONS -k graceful -f conf/%i.conf
# Send SIGWINCH for graceful stop
diff --git a/instance.conf b/instance.conf
index f2b03f7..074fb66 100644
--- a/instance.conf
+++ b/instance.conf
@@ -1,6 +1,6 @@
#
# This is an example instance-specific configuration file. See the
-# httpd.service(8) man page for detailed information on using the
+# httpd@.service(8) man page for detailed information on using the
# the httpd@.service with instances.
#
# To use this example, copy instance.conf to /etc/httpd/conf/foobar.conf
@@ -10,7 +10,7 @@
# # systemctl start httpd@foobar.service
#
# The changes compared to the default are:
-# - DefaultRuntime and Pidfile renamed to be instance-specific
+# - DefaultRuntime, DefaultStateDir and Pidfile renamed to instance-specific
# - default logfile names are prefixed with the instance name
# - /etc/httpd/conf.d is NOT included by default (conf.modules.d still is)
#
@@ -20,4 +20,5 @@
#
DefaultRuntimeDir /run/httpd/instance-${HTTPD_INSTANCE}
+DefaultStateDir /var/lib/httpd/instance-${HTTPD_INSTANCE}
PidFile /run/httpd/instance-${HTTPD_INSTANCE}.pid
From 4d2ffdca914614be62ba75e12fea4452f8d93667 Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Mon, 8 Jul 2019 09:06:38 +0100
Subject: [PATCH 172/359] Use mod_cgid for any non-prefork MPM.
---
01-cgi.conf | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/01-cgi.conf b/01-cgi.conf
index 5b8b936..4b680cf 100644
--- a/01-cgi.conf
+++ b/01-cgi.conf
@@ -2,10 +2,7 @@
# which has been configured in 00-mpm.conf. mod_cgid should be used
# with a threaded MPM; mod_cgi with the prefork MPM.
-
- LoadModule cgid_module modules/mod_cgid.so
-
-
+
LoadModule cgid_module modules/mod_cgid.so
From 2ae67b32b199fc1b8339a068b502a863e44744fd Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Mon, 8 Jul 2019 09:18:33 +0100
Subject: [PATCH 173/359] htpasswd: add SHA-256/512 support
---
httpd-2.4.37-r1861793+.patch | 270 +++++++++++++++++++++++++++++++++++
httpd.spec | 7 +-
2 files changed, 276 insertions(+), 1 deletion(-)
create mode 100644 httpd-2.4.37-r1861793+.patch
diff --git a/httpd-2.4.37-r1861793+.patch b/httpd-2.4.37-r1861793+.patch
new file mode 100644
index 0000000..c522c7c
--- /dev/null
+++ b/httpd-2.4.37-r1861793+.patch
@@ -0,0 +1,270 @@
+# ./pullrev.sh 1861793 1862611 1862612
+http://svn.apache.org/viewvc?view=revision&revision=1861793
+
+http://svn.apache.org/viewvc?view=revision&revision=1862611
+http://svn.apache.org/viewvc?view=revision&revision=1862612
+
+--- httpd-2.4.37/configure.in
++++ httpd-2.4.37/configure.in
+@@ -500,6 +500,28 @@
+ AC_SEARCH_LIBS(crypt, crypt)
+ CRYPT_LIBS="$LIBS"
+ APACHE_SUBST(CRYPT_LIBS)
++
++if test "$ac_cv_search_crypt" != "no"; then
++ # Test crypt() with the SHA-512 test vector from https://akkadia.org/drepper/SHA-crypt.txt
++ AC_CACHE_CHECK([whether crypt() supports SHA-2], [ap_cv_crypt_sha2], [
++ AC_RUN_IFELSE([AC_LANG_PROGRAM([[
++#include
++#include
++#include
++
++#define PASSWD_0 "Hello world!"
++#define SALT_0 "\$6\$saltstring"
++#define EXPECT_0 "\$6\$saltstring\$svn8UoSVapNtMuq1ukKS4tPQd8iKwSMHWjl/O817G3uBnIFNjnQJu" \
++ "esI68u4OTLiBFdcbYEdFCoEOfaS35inz1"
++]], [char *result = crypt(PASSWD_0, SALT_0);
++ if (!result) return 1;
++ if (strcmp(result, EXPECT_0)) return 2;
++])], [ap_cv_crypt_sha2=yes], [ap_cv_crypt_sha2=no])])
++ if test "$ap_cv_crypt_sha2" = yes; then
++ AC_DEFINE([HAVE_CRYPT_SHA2], 1, [Define if crypt() supports SHA-2 hashes])
++ fi
++fi
++
+ LIBS="$saved_LIBS"
+
+ dnl See Comment #Spoon
+--- httpd-2.4.37/support/htpasswd.c
++++ httpd-2.4.37/support/htpasswd.c
+@@ -109,17 +109,21 @@
+ "for it." NL
+ " -i Read password from stdin without verification (for script usage)." NL
+ " -m Force MD5 encryption of the password (default)." NL
+- " -B Force bcrypt encryption of the password (very secure)." NL
++ " -2 Force SHA-256 crypt() hash of the password (very secure)." NL
++ " -5 Force SHA-512 crypt() hash of the password (very secure)." NL
++ " -B Force bcrypt aencryption of the password (very secure)." NL
+ " -C Set the computing time used for the bcrypt algorithm" NL
+ " (higher is more secure but slower, default: %d, valid: 4 to 31)." NL
++ " -r Set the number of rounds used for the SHA-256, SHA-512 algorithms" NL
++ " (higher is more secure but slower, default: 5000)." NL
+ " -d Force CRYPT encryption of the password (8 chars max, insecure)." NL
+- " -s Force SHA encryption of the password (insecure)." NL
++ " -s Force SHA-1 encryption of the password (insecure)." NL
+ " -p Do not encrypt the password (plaintext, insecure)." NL
+ " -D Delete the specified user." NL
+ " -v Verify password for the specified user." NL
+ "On other systems than Windows and NetWare the '-p' flag will "
+ "probably not work." NL
+- "The SHA algorithm does not use a salt and is less secure than the "
++ "The SHA-1 algorithm does not use a salt and is less secure than the "
+ "MD5 algorithm." NL,
+ BCRYPT_DEFAULT_COST
+ );
+@@ -178,7 +182,7 @@
+ if (rv != APR_SUCCESS)
+ exit(ERR_SYNTAX);
+
+- while ((rv = apr_getopt(state, "cnmspdBbDiC:v", &opt, &opt_arg)) == APR_SUCCESS) {
++ while ((rv = apr_getopt(state, "cnmspdBbDi25C:r:v", &opt, &opt_arg)) == APR_SUCCESS) {
+ switch (opt) {
+ case 'c':
+ *mask |= APHTP_NEWFILE;
+--- httpd-2.4.37/support/passwd_common.c
++++ httpd-2.4.37/support/passwd_common.c
+@@ -185,10 +185,15 @@
+ #if CRYPT_ALGO_SUPPORTED
+ char *cbuf;
+ #endif
++#ifdef HAVE_CRYPT_SHA2
++ const char *setting;
++ char method;
++#endif
+
+- if (ctx->cost != 0 && ctx->alg != ALG_BCRYPT) {
++ if (ctx->cost != 0 && ctx->alg != ALG_BCRYPT
++ && ctx->alg != ALG_CRYPT_SHA256 && ctx->alg != ALG_CRYPT_SHA512 ) {
+ apr_file_printf(errfile,
+- "Warning: Ignoring -C argument for this algorithm." NL);
++ "Warning: Ignoring -C/-r argument for this algorithm." NL);
+ }
+
+ if (ctx->passwd == NULL) {
+@@ -246,6 +251,34 @@
+ break;
+ #endif /* CRYPT_ALGO_SUPPORTED */
+
++#ifdef HAVE_CRYPT_SHA2
++ case ALG_CRYPT_SHA256:
++ case ALG_CRYPT_SHA512:
++ ret = generate_salt(salt, 16, &ctx->errstr, ctx->pool);
++ if (ret != 0)
++ break;
++
++ method = ctx->alg == ALG_CRYPT_SHA256 ? '5': '6';
++
++ if (ctx->cost)
++ setting = apr_psprintf(ctx->pool, "$%c$rounds=%d$%s",
++ method, ctx->cost, salt);
++ else
++ setting = apr_psprintf(ctx->pool, "$%c$%s",
++ method, salt);
++
++ cbuf = crypt(pw, setting);
++ if (cbuf == NULL) {
++ rv = APR_FROM_OS_ERROR(errno);
++ ctx->errstr = apr_psprintf(ctx->pool, "crypt() failed: %pm", &rv);
++ ret = ERR_PWMISMATCH;
++ break;
++ }
++
++ apr_cpystrn(ctx->out, cbuf, ctx->out_len - 1);
++ break;
++#endif /* HAVE_CRYPT_SHA2 */
++
+ #if BCRYPT_ALGO_SUPPORTED
+ case ALG_BCRYPT:
+ rv = apr_generate_random_bytes((unsigned char*)salt, 16);
+@@ -294,6 +327,19 @@
+ case 's':
+ ctx->alg = ALG_APSHA;
+ break;
++#ifdef HAVE_CRYPT_SHA2
++ case '2':
++ ctx->alg = ALG_CRYPT_SHA256;
++ break;
++ case '5':
++ ctx->alg = ALG_CRYPT_SHA512;
++ break;
++#else
++ case '2':
++ case '5':
++ ctx->errstr = "SHA-2 crypt() algorithms are not supported on this platform.";
++ return ERR_ALG_NOT_SUPP;
++#endif
+ case 'p':
+ ctx->alg = ALG_PLAIN;
+ #if !PLAIN_ALGO_SUPPORTED
+@@ -324,11 +370,12 @@
+ return ERR_ALG_NOT_SUPP;
+ #endif
+ break;
+- case 'C': {
++ case 'C':
++ case 'r': {
+ char *endptr;
+ long num = strtol(opt_arg, &endptr, 10);
+ if (*endptr != '\0' || num <= 0) {
+- ctx->errstr = "argument to -C must be a positive integer";
++ ctx->errstr = "argument to -C/-r must be a positive integer";
+ return ERR_SYNTAX;
+ }
+ ctx->cost = num;
+--- httpd-2.4.37/support/passwd_common.h
++++ httpd-2.4.37/support/passwd_common.h
+@@ -28,6 +28,8 @@
+ #include "apu_version.h"
+ #endif
+
++#include "ap_config_auto.h"
++
+ #define MAX_STRING_LEN 256
+
+ #define ALG_PLAIN 0
+@@ -35,6 +37,8 @@
+ #define ALG_APMD5 2
+ #define ALG_APSHA 3
+ #define ALG_BCRYPT 4
++#define ALG_CRYPT_SHA256 5
++#define ALG_CRYPT_SHA512 6
+
+ #define BCRYPT_DEFAULT_COST 5
+
+@@ -84,7 +88,7 @@
+ apr_size_t out_len;
+ char *passwd;
+ int alg;
+- int cost;
++ int cost; /* cost for bcrypt, rounds for SHA-2 */
+ enum {
+ PW_PROMPT = 0,
+ PW_ARG,
+--- httpd-2.4.37/docs/man/htpasswd.1
++++ httpd-2.4.37/docs/man/htpasswd.1
+@@ -27,16 +27,16 @@
+ .SH "SYNOPSIS"
+
+ .PP
+-\fB\fBhtpasswd\fR [ -\fBc\fR ] [ -\fBi\fR ] [ -\fBm\fR | -\fBB\fR | -\fBd\fR | -\fBs\fR | -\fBp\fR ] [ -\fBC\fR \fIcost\fR ] [ -\fBD\fR ] [ -\fBv\fR ] \fIpasswdfile\fR \fIusername\fR\fR
++\fB\fBhtpasswd\fR [ -\fBc\fR ] [ -\fBi\fR ] [ -\fBm\fR | -\fBB\fR | -\fB2\fR | -\fB5\fR | -\fBd\fR | -\fBs\fR | -\fBp\fR ] [ -\fBr\fR \fIrounds\fR ] [ -\fBC\fR \fIcost\fR ] [ -\fBD\fR ] [ -\fBv\fR ] \fIpasswdfile\fR \fIusername\fR\fR
+
+ .PP
+-\fB\fBhtpasswd\fR -\fBb\fR [ -\fBc\fR ] [ -\fBm\fR | -\fBB\fR | -\fBd\fR | -\fBs\fR | -\fBp\fR ] [ -\fBC\fR \fIcost\fR ] [ -\fBD\fR ] [ -\fBv\fR ] \fIpasswdfile\fR \fIusername\fR \fIpassword\fR\fR
++\fB\fBhtpasswd\fR -\fBb\fR [ -\fBc\fR ] [ -\fBm\fR | -\fBB\fR | -\fB2\fR | -\fB5\fR | -\fBd\fR | -\fBs\fR | -\fBp\fR ] [ -\fBr\fR \fIrounds\fR ] [ -\fBC\fR \fIcost\fR ] [ -\fBD\fR ] [ -\fBv\fR ] \fIpasswdfile\fR \fIusername\fR \fIpassword\fR\fR
+
+ .PP
+-\fB\fBhtpasswd\fR -\fBn\fR [ -\fBi\fR ] [ -\fBm\fR | -\fBB\fR | -\fBd\fR | -\fBs\fR | -\fBp\fR ] [ -\fBC\fR \fIcost\fR ] \fIusername\fR\fR
++\fB\fBhtpasswd\fR -\fBn\fR [ -\fBi\fR ] [ -\fBm\fR | -\fBB\fR | -\fB2\fR | -\fB5\fR | -\fBd\fR | -\fBs\fR | -\fBp\fR ] [ -\fBr\fR \fIrounds\fR ] [ -\fBC\fR \fIcost\fR ] \fIusername\fR\fR
+
+ .PP
+-\fB\fBhtpasswd\fR -\fBnb\fR [ -\fBm\fR | -\fBB\fR | -\fBd\fR | -\fBs\fR | -\fBp\fR ] [ -\fBC\fR \fIcost\fR ] \fIusername\fR \fIpassword\fR\fR
++\fB\fBhtpasswd\fR -\fBnb\fR [ -\fBm\fR | -\fBB\fR | -\fB2\fR | -\fB5\fR | -\fBd\fR | -\fBs\fR | -\fBp\fR ] [ -\fBr\fR \fIrounds\fR ] [ -\fBC\fR \fIcost\fR ] \fIusername\fR \fIpassword\fR\fR
+
+
+ .SH "SUMMARY"
+@@ -48,7 +48,7 @@
+ Resources available from the Apache HTTP server can be restricted to just the users listed in the files created by \fBhtpasswd\fR\&. This program can only manage usernames and passwords stored in a flat-file\&. It can encrypt and display password information for use in other types of data stores, though\&. To use a DBM database see dbmmanage or htdbm\&.
+
+ .PP
+-\fBhtpasswd\fR encrypts passwords using either bcrypt, a version of MD5 modified for Apache, SHA1, or the system's \fBcrypt()\fR routine\&. Files managed by \fBhtpasswd\fR may contain a mixture of different encoding types of passwords; some user records may have bcrypt or MD5-encrypted passwords while others in the same file may have passwords encrypted with \fBcrypt()\fR\&.
++\fBhtpasswd\fR encrypts passwords using either bcrypt, a version of MD5 modified for Apache, SHA-1, or the system's \fBcrypt()\fR routine\&. SHA-2-based hashes (SHA-256 and SHA-512) are supported for \fBcrypt()\fR\&. Files managed by \fBhtpasswd\fR may contain a mixture of different encoding types of passwords; some user records may have bcrypt or MD5-encrypted passwords while others in the same file may have passwords encrypted with \fBcrypt()\fR\&.
+
+ .PP
+ This manual page only lists the command line arguments\&. For details of the directives necessary to configure user authentication in httpd see the Apache manual, which is part of the Apache distribution or can be found at http://httpd\&.apache\&.org/\&.
+@@ -73,6 +73,12 @@
+ \fB-m\fR
+ Use MD5 encryption for passwords\&. This is the default (since version 2\&.2\&.18)\&.
+ .TP
++\fB-2\fR
++Use SHA-256 \fBcrypt()\fR based hashes for passwords\&. This is supported on most Unix platforms\&.
++.TP
++\fB-5\fR
++Use SHA-512 \fBcrypt()\fR based hashes for passwords\&. This is supported on most Unix platforms\&.
++.TP
+ \fB-B\fR
+ Use bcrypt encryption for passwords\&. This is currently considered to be very secure\&.
+ .TP
+@@ -79,11 +85,14 @@
+ \fB-C\fR
+ This flag is only allowed in combination with \fB-B\fR (bcrypt encryption)\&. It sets the computing time used for the bcrypt algorithm (higher is more secure but slower, default: 5, valid: 4 to 31)\&.
+ .TP
++\fB-r\fR
++This flag is only allowed in combination with \fB-2\fR or \fB-5\fR\&. It sets the number of hash rounds used for the SHA-2 algorithms (higher is more secure but slower; the default is 5,000)\&.
++.TP
+ \fB-d\fR
+ Use \fBcrypt()\fR encryption for passwords\&. This is not supported by the httpd server on Windows and Netware\&. This algorithm limits the password length to 8 characters\&. This algorithm is \fBinsecure\fR by today's standards\&. It used to be the default algorithm until version 2\&.2\&.17\&.
+ .TP
+ \fB-s\fR
+-Use SHA encryption for passwords\&. Facilitates migration from/to Netscape servers using the LDAP Directory Interchange Format (ldif)\&. This algorithm is \fBinsecure\fR by today's standards\&.
++Use SHA-1 (160-bit) encryption for passwords\&. Facilitates migration from/to Netscape servers using the LDAP Directory Interchange Format (ldif)\&. This algorithm is \fBinsecure\fR by today's standards\&.
+ .TP
+ \fB-p\fR
+ Use plaintext passwords\&. Though \fBhtpasswd\fR will support creation on all platforms, the httpd daemon will only accept plain text passwords on Windows and Netware\&.
+@@ -152,11 +161,14 @@
+ When using the \fBcrypt()\fR algorithm, note that only the first 8 characters of the password are used to form the password\&. If the supplied password is longer, the extra characters will be silently discarded\&.
+
+ .PP
+-The SHA encryption format does not use salting: for a given password, there is only one encrypted representation\&. The \fBcrypt()\fR and MD5 formats permute the representation by prepending a random salt string, to make dictionary attacks against the passwords more difficult\&.
++The SHA-1 encryption format does not use salting: for a given password, there is only one encrypted representation\&. The \fBcrypt()\fR and MD5 formats permute the representation by prepending a random salt string, to make dictionary attacks against the passwords more difficult\&.
+
+ .PP
+-The SHA and \fBcrypt()\fR formats are insecure by today's standards\&.
++The SHA-1 and \fBcrypt()\fR formats are insecure by today's standards\&.
+
++.PP
++The SHA-2-based \fBcrypt()\fR formats (SHA-256 and SHA-512) are supported on most modern Unix systems, and follow the specification at https://www\&.akkadia\&.org/drepper/SHA-crypt\&.txt\&.
++
+ .SH "RESTRICTIONS"
+
+ .PP
diff --git a/httpd.spec b/httpd.spec
index 32cb463..a94fdb6 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -13,7 +13,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.39
-Release: 9%{?dist}
+Release: 10%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -76,6 +76,7 @@ Patch36: httpd-2.4.38-r1830819+.patch
Patch38: httpd-2.4.34-sslciphdefault.patch
Patch39: httpd-2.4.37-sslprotdefault.patch
Patch40: httpd-2.4.39-r1861269.patch
+Patch41: httpd-2.4.37-r1861793+.patch
# Bug fixes
# https://bugzilla.redhat.com/show_bug.cgi?id=1397243
@@ -216,6 +217,7 @@ interface for storing and accessing per-user session data.
%patch38 -p1 -b .sslciphdefault
%patch39 -p1 -b .sslprotdefault
%patch40 -p1 -b .r1861269
+%patch41 -p1 -b .r1861793+
%patch58 -p1 -b .r1738878
%patch60 -p1 -b .enable-sslv3
@@ -739,6 +741,9 @@ exit $rv
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Mon Jul 8 2019 Joe Orton - 2.4.39-10
+- htpasswd: add SHA-256/512 support
+
* Fri Jun 21 2019 Joe Orton - 2.4.39-9
- create instance-specific StateDir in httpd@.service, instance.conf
From 7ee1cb5208eaa7a0ce86eea5263d0d17e94feae1 Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Mon, 8 Jul 2019 09:23:48 +0100
Subject: [PATCH 174/359] - apachectl: restore -V/-v/-t support (#1727434)
---
apachectl.sh | 6 +++++-
httpd.spec | 7 +++++--
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/apachectl.sh b/apachectl.sh
index 77868fe..e0f6f78 100755
--- a/apachectl.sh
+++ b/apachectl.sh
@@ -49,10 +49,14 @@ graceful-stop)
/usr/bin/systemctl kill --signal=SIGWINCH $SVC
ERROR=$?
;;
-configtest)
+configtest|-t)
$HTTPD -t
ERROR=$?
;;
+-v|-V)
+ $HTTPD $ACMD
+ ERROR=$?
+ ;;
*)
echo apachectl: The \"$ACMD\" option is not supported. 1>&2
ERROR=2
diff --git a/httpd.spec b/httpd.spec
index a94fdb6..5fbcc76 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -406,7 +406,8 @@ sed -i \
docs/conf/extra/*.conf
# Set correct path for httpd binary in apachectl script
-sed -i 's,@HTTPDBIN@,%{_sbindir}/httpd,g' $RPM_SOURCE_DIR/apachectl.sh
+sed 's,@HTTPDBIN@,%{_sbindir}/httpd,g' $RPM_SOURCE_DIR/apachectl.sh \
+ > apachectl.sh
# Create cache directory
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/cache/httpd \
@@ -474,7 +475,8 @@ install -m755 $RPM_SOURCE_DIR/httpd-ssl-gencerts \
$RPM_BUILD_ROOT%{_libexecdir}/httpd-ssl-gencerts
# Install scripts
-install -p -m 755 $RPM_SOURCE_DIR/apachectl.sh $RPM_BUILD_ROOT%{_sbindir}/apachectl
+install -m 755 apachectl.sh $RPM_BUILD_ROOT%{_sbindir}/apachectl
+touch -r $RPM_SOURCE_DIR/apachectl.sh $RPM_BUILD_ROOT%{_sbindir}/apachectl
mkdir -p $RPM_BUILD_ROOT%{_libexecdir}/initscripts/legacy-actions/httpd
for f in graceful configtest; do
install -p -m 755 $RPM_SOURCE_DIR/action-${f}.sh \
@@ -743,6 +745,7 @@ exit $rv
%changelog
* Mon Jul 8 2019 Joe Orton - 2.4.39-10
- htpasswd: add SHA-256/512 support
+- apachectl: restore -V/-v/-t support (#1727434)
* Fri Jun 21 2019 Joe Orton - 2.4.39-9
- create instance-specific StateDir in httpd@.service, instance.conf
From c4e5cc737f187af40b089e3a64848cd830ebeb5a Mon Sep 17 00:00:00 2001
From: Lubos Uhliarik
Date: Tue, 16 Jul 2019 17:14:13 +0200
Subject: [PATCH 175/359] Remove redundant part of patch - we ship are own
config.layout
---
httpd-2.4.39-r1842929+.patch | 122 -----------------------------------
1 file changed, 122 deletions(-)
diff --git a/httpd-2.4.39-r1842929+.patch b/httpd-2.4.39-r1842929+.patch
index 50f8aa1..9fea432 100644
--- a/httpd-2.4.39-r1842929+.patch
+++ b/httpd-2.4.39-r1842929+.patch
@@ -23,128 +23,6 @@ http://svn.apache.org/viewvc?view=revision&revision=1853631
])
dnl
---- httpd-2.4.39/config.layout.r1842929+
-+++ httpd-2.4.39/config.layout
-@@ -29,6 +29,7 @@
- includedir: ${prefix}/include
- localstatedir: ${prefix}
- runtimedir: ${localstatedir}/logs
-+ statedir: ${localstatedir}/state
- logfiledir: ${localstatedir}/logs
- proxycachedir: ${localstatedir}/proxy
-
-@@ -54,6 +55,7 @@
- includedir: ${prefix}/include+
- localstatedir: ${prefix}/var+
- runtimedir: ${localstatedir}/run
-+ statedir: ${localstatedir}/state
- logfiledir: ${localstatedir}/log
- proxycachedir: ${localstatedir}/proxy
-
-@@ -78,6 +80,7 @@
- includedir: /System/Library/Frameworks/Apache.framework/Versions/2.0/Headers
- localstatedir: /var
- runtimedir: ${prefix}/Logs
-+ statedir: ${prefix}/State
- logfiledir: ${prefix}/Logs
- proxycachedir: ${prefix}/ProxyCache
-
-@@ -102,6 +105,7 @@
- includedir: ${prefix}/include+
- localstatedir: /var
- runtimedir: ${localstatedir}/run
-+ statedir: ${localstatedir}/state
- logfiledir: ${localstatedir}/log+
- proxycachedir: ${runtimedir}/proxy
-
-@@ -126,6 +130,7 @@
- includedir: ${prefix}/include/apache
- localstatedir: /var
- runtimedir: ${localstatedir}/run
-+ statedir: ${localstatedir}/lib/httpd
- logfiledir: ${localstatedir}/log/httpd
- proxycachedir: ${localstatedir}/cache/httpd
-
-@@ -151,6 +156,7 @@
- includedir: ${prefix}/include/httpd
- runtimedir: /run/httpd
- logfiledir: ${localstatedir}/log/httpd
-+ statedir: ${localstatedir}/lib/httpd
- proxycachedir: ${localstatedir}/cache/httpd/proxy
-
-
-@@ -175,6 +181,7 @@
- localstatedir: /var${prefix}
- runtimedir: ${localstatedir}/run
- logfiledir: ${localstatedir}/logs
-+ statedir: ${localstatedir}/state
- proxycachedir: ${localstatedir}/proxy
-
-
-@@ -197,6 +204,7 @@
- cgidir: ${datadir}/cgi-bin
- includedir: ${prefix}/include/apache
- localstatedir: /var/lib/httpd
-+ statedir: ${localstatedir}
- runtimedir: /var/run
- logfiledir: /var/log/httpd
- proxycachedir: /var/cache/httpd
-@@ -223,6 +231,7 @@
- localstatedir: /var
- runtimedir: ${localstatedir}/run
- logfiledir: ${localstatedir}/log/httpd
-+ statedir: ${prefix}/state
- proxycachedir: ${localstatedir}/proxy
-
-
-@@ -246,6 +255,7 @@
- includedir: ${exec_prefix}/include
- localstatedir: ${prefix}
- runtimedir: /var/run
-+ statedir: ${datadir}/state
- logfiledir: ${datadir}/logs
- proxycachedir: ${datadir}/proxy
-
-@@ -271,6 +281,7 @@
- localstatedir: ${prefix}
- runtimedir: ${prefix}/logs
- logfiledir: ${prefix}/logs
-+ statedir: ${prefix}/state
- proxycachedir: ${prefix}/proxy
-
-
-@@ -315,6 +326,7 @@
- cgidir: ${prefix}/usr/lib/cgi-bin
- includedir: ${exec_prefix}/include/apache2
- localstatedir: ${prefix}/var/lock/apache2
-+ statedir: ${prefix}/var/lib/apache2
- runtimedir: ${prefix}/var/run/apache2
- logfiledir: ${prefix}/var/log/apache2
- proxycachedir: ${prefix}/var/cache/apache2/proxy
-@@ -343,6 +355,7 @@
- manualdir: ${datadir}/manual
- cgidir: ${datadir}/cgi-bin
- runtimedir: ${localstatedir}/run
-+ runtimedir: ${localstatedir}/lib/httpd
- logfiledir: ${localstatedir}/log/httpd
- proxycachedir: ${localstatedir}/cache/httpd/cache-root
-
-@@ -366,6 +379,7 @@
- manualdir: ${prefix}/manual
- includedir: ${prefix}/include
- localstatedir: /var/httpd
-+ statedir: ${localstatedir}/state
- runtimedir: ${localstatedir}/run
- logfiledir: ${localstatedir}/logs
- proxycachedir: ${localstatedir}/proxy
-@@ -391,6 +405,7 @@
- includedir: ${prefix}/include/httpd
- localstatedir: /var
- runtimedir: ${localstatedir}/run/httpd
-+ statedir: ${localstatedir}/lib/httpd
- logfiledir: ${localstatedir}/log/httpd
- proxycachedir: ${localstatedir}/cache/httpd
-
--- httpd-2.4.39/configure.in.r1842929+
+++ httpd-2.4.39/configure.in
@@ -41,7 +41,7 @@
From 2993aea7a705c7ef4b943b1770f98b2964792d83 Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Wed, 17 Jul 2019 11:31:15 +0100
Subject: [PATCH 176/359] mod_cgid: use fd passing to fix script stderr
handling (#1591157) Resolves: rhbz#1591157
---
httpd-2.4.37-r1828172+.patch | 1069 ++++++++++++++++++++++++++++++++++
httpd.spec | 8 +-
2 files changed, 1076 insertions(+), 1 deletion(-)
create mode 100644 httpd-2.4.37-r1828172+.patch
diff --git a/httpd-2.4.37-r1828172+.patch b/httpd-2.4.37-r1828172+.patch
new file mode 100644
index 0000000..822cccf
--- /dev/null
+++ b/httpd-2.4.37-r1828172+.patch
@@ -0,0 +1,1069 @@
+# ./pullrev.sh 1828172 1862968 1863191
+http://svn.apache.org/viewvc?view=revision&revision=1828172
+http://svn.apache.org/viewvc?view=revision&revision=1862968
+http://svn.apache.org/viewvc?view=revision&revision=1863191
+
+--- httpd-2.4.37/modules/generators/mod_cgi.c
++++ httpd-2.4.37/modules/generators/mod_cgi.c
+@@ -92,6 +92,10 @@
+ apr_size_t bufbytes;
+ } cgi_server_conf;
+
++typedef struct {
++ apr_interval_time_t timeout;
++} cgi_dirconf;
++
+ static void *create_cgi_config(apr_pool_t *p, server_rec *s)
+ {
+ cgi_server_conf *c =
+@@ -112,6 +116,12 @@
+ return overrides->logname ? overrides : base;
+ }
+
++static void *create_cgi_dirconf(apr_pool_t *p, char *dummy)
++{
++ cgi_dirconf *c = (cgi_dirconf *) apr_pcalloc(p, sizeof(cgi_dirconf));
++ return c;
++}
++
+ static const char *set_scriptlog(cmd_parms *cmd, void *dummy, const char *arg)
+ {
+ server_rec *s = cmd->server;
+@@ -150,6 +160,17 @@
+ return NULL;
+ }
+
++static const char *set_script_timeout(cmd_parms *cmd, void *dummy, const char *arg)
++{
++ cgi_dirconf *dc = dummy;
++
++ if (ap_timeout_parameter_parse(arg, &dc->timeout, "s") != APR_SUCCESS) {
++ return "CGIScriptTimeout has wrong format";
++ }
++
++ return NULL;
++}
++
+ static const command_rec cgi_cmds[] =
+ {
+ AP_INIT_TAKE1("ScriptLog", set_scriptlog, NULL, RSRC_CONF,
+@@ -158,6 +179,9 @@
+ "the maximum length (in bytes) of the script debug log"),
+ AP_INIT_TAKE1("ScriptLogBuffer", set_scriptlog_buffer, NULL, RSRC_CONF,
+ "the maximum size (in bytes) to record of a POST request"),
++AP_INIT_TAKE1("CGIScriptTimeout", set_script_timeout, NULL, RSRC_CONF | ACCESS_CONF,
++ "The amount of time to wait between successful reads from "
++ "the CGI script, in seconds."),
+ {NULL}
+ };
+
+@@ -471,23 +495,26 @@
+ apr_filepath_name_get(r->filename));
+ }
+ else {
++ cgi_dirconf *dc = ap_get_module_config(r->per_dir_config, &cgi_module);
++ apr_interval_time_t timeout = dc->timeout > 0 ? dc->timeout : r->server->timeout;
++
+ apr_pool_note_subprocess(p, procnew, APR_KILL_AFTER_TIMEOUT);
+
+ *script_in = procnew->out;
+ if (!*script_in)
+ return APR_EBADF;
+- apr_file_pipe_timeout_set(*script_in, r->server->timeout);
++ apr_file_pipe_timeout_set(*script_in, timeout);
+
+ if (e_info->prog_type == RUN_AS_CGI) {
+ *script_out = procnew->in;
+ if (!*script_out)
+ return APR_EBADF;
+- apr_file_pipe_timeout_set(*script_out, r->server->timeout);
++ apr_file_pipe_timeout_set(*script_out, timeout);
+
+ *script_err = procnew->err;
+ if (!*script_err)
+ return APR_EBADF;
+- apr_file_pipe_timeout_set(*script_err, r->server->timeout);
++ apr_file_pipe_timeout_set(*script_err, timeout);
+ }
+ }
+ }
+@@ -563,189 +590,7 @@
+ }
+
+ #if APR_FILES_AS_SOCKETS
+-
+-/* A CGI bucket type is needed to catch any output to stderr from the
+- * script; see PR 22030. */
+-static const apr_bucket_type_t bucket_type_cgi;
+-
+-struct cgi_bucket_data {
+- apr_pollset_t *pollset;
+- request_rec *r;
+-};
+-
+-/* Create a CGI bucket using pipes from script stdout 'out'
+- * and stderr 'err', for request 'r'. */
+-static apr_bucket *cgi_bucket_create(request_rec *r,
+- apr_file_t *out, apr_file_t *err,
+- apr_bucket_alloc_t *list)
+-{
+- apr_bucket *b = apr_bucket_alloc(sizeof(*b), list);
+- apr_status_t rv;
+- apr_pollfd_t fd;
+- struct cgi_bucket_data *data = apr_palloc(r->pool, sizeof *data);
+-
+- APR_BUCKET_INIT(b);
+- b->free = apr_bucket_free;
+- b->list = list;
+- b->type = &bucket_type_cgi;
+- b->length = (apr_size_t)(-1);
+- b->start = -1;
+-
+- /* Create the pollset */
+- rv = apr_pollset_create(&data->pollset, 2, r->pool, 0);
+- if (rv != APR_SUCCESS) {
+- ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01217)
+- "apr_pollset_create(); check system or user limits");
+- return NULL;
+- }
+-
+- fd.desc_type = APR_POLL_FILE;
+- fd.reqevents = APR_POLLIN;
+- fd.p = r->pool;
+- fd.desc.f = out; /* script's stdout */
+- fd.client_data = (void *)1;
+- rv = apr_pollset_add(data->pollset, &fd);
+- if (rv != APR_SUCCESS) {
+- ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01218)
+- "apr_pollset_add(); check system or user limits");
+- return NULL;
+- }
+-
+- fd.desc.f = err; /* script's stderr */
+- fd.client_data = (void *)2;
+- rv = apr_pollset_add(data->pollset, &fd);
+- if (rv != APR_SUCCESS) {
+- ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01219)
+- "apr_pollset_add(); check system or user limits");
+- return NULL;
+- }
+-
+- data->r = r;
+- b->data = data;
+- return b;
+-}
+-
+-/* Create a duplicate CGI bucket using given bucket data */
+-static apr_bucket *cgi_bucket_dup(struct cgi_bucket_data *data,
+- apr_bucket_alloc_t *list)
+-{
+- apr_bucket *b = apr_bucket_alloc(sizeof(*b), list);
+- APR_BUCKET_INIT(b);
+- b->free = apr_bucket_free;
+- b->list = list;
+- b->type = &bucket_type_cgi;
+- b->length = (apr_size_t)(-1);
+- b->start = -1;
+- b->data = data;
+- return b;
+-}
+-
+-/* Handle stdout from CGI child. Duplicate of logic from the _read
+- * method of the real APR pipe bucket implementation. */
+-static apr_status_t cgi_read_stdout(apr_bucket *a, apr_file_t *out,
+- const char **str, apr_size_t *len)
+-{
+- char *buf;
+- apr_status_t rv;
+-
+- *str = NULL;
+- *len = APR_BUCKET_BUFF_SIZE;
+- buf = apr_bucket_alloc(*len, a->list); /* XXX: check for failure? */
+-
+- rv = apr_file_read(out, buf, len);
+-
+- if (rv != APR_SUCCESS && rv != APR_EOF) {
+- apr_bucket_free(buf);
+- return rv;
+- }
+-
+- if (*len > 0) {
+- struct cgi_bucket_data *data = a->data;
+- apr_bucket_heap *h;
+-
+- /* Change the current bucket to refer to what we read */
+- a = apr_bucket_heap_make(a, buf, *len, apr_bucket_free);
+- h = a->data;
+- h->alloc_len = APR_BUCKET_BUFF_SIZE; /* note the real buffer size */
+- *str = buf;
+- APR_BUCKET_INSERT_AFTER(a, cgi_bucket_dup(data, a->list));
+- }
+- else {
+- apr_bucket_free(buf);
+- a = apr_bucket_immortal_make(a, "", 0);
+- *str = a->data;
+- }
+- return rv;
+-}
+-
+-/* Read method of CGI bucket: polls on stderr and stdout of the child,
+- * sending any stderr output immediately away to the error log. */
+-static apr_status_t cgi_bucket_read(apr_bucket *b, const char **str,
+- apr_size_t *len, apr_read_type_e block)
+-{
+- struct cgi_bucket_data *data = b->data;
+- apr_interval_time_t timeout;
+- apr_status_t rv;
+- int gotdata = 0;
+-
+- timeout = block == APR_NONBLOCK_READ ? 0 : data->r->server->timeout;
+-
+- do {
+- const apr_pollfd_t *results;
+- apr_int32_t num;
+-
+- rv = apr_pollset_poll(data->pollset, timeout, &num, &results);
+- if (APR_STATUS_IS_TIMEUP(rv)) {
+- if (timeout) {
+- ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, data->r, APLOGNO(01220)
+- "Timeout waiting for output from CGI script %s",
+- data->r->filename);
+- return rv;
+- }
+- else {
+- return APR_EAGAIN;
+- }
+- }
+- else if (APR_STATUS_IS_EINTR(rv)) {
+- continue;
+- }
+- else if (rv != APR_SUCCESS) {
+- ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, data->r, APLOGNO(01221)
+- "poll failed waiting for CGI child");
+- return rv;
+- }
+-
+- for (; num; num--, results++) {
+- if (results[0].client_data == (void *)1) {
+- /* stdout */
+- rv = cgi_read_stdout(b, results[0].desc.f, str, len);
+- if (APR_STATUS_IS_EOF(rv)) {
+- rv = APR_SUCCESS;
+- }
+- gotdata = 1;
+- } else {
+- /* stderr */
+- apr_status_t rv2 = log_script_err(data->r, results[0].desc.f);
+- if (APR_STATUS_IS_EOF(rv2)) {
+- apr_pollset_remove(data->pollset, &results[0]);
+- }
+- }
+- }
+-
+- } while (!gotdata);
+-
+- return rv;
+-}
+-
+-static const apr_bucket_type_t bucket_type_cgi = {
+- "CGI", 5, APR_BUCKET_DATA,
+- apr_bucket_destroy_noop,
+- cgi_bucket_read,
+- apr_bucket_setaside_notimpl,
+- apr_bucket_split_notimpl,
+- apr_bucket_copy_notimpl
+-};
+-
++#include "cgi_common.h"
+ #endif
+
+ static int cgi_handler(request_rec *r)
+@@ -766,6 +611,8 @@
+ apr_status_t rv;
+ cgi_exec_info_t e_info;
+ conn_rec *c;
++ cgi_dirconf *dc = ap_get_module_config(r->per_dir_config, &cgi_module);
++ apr_interval_time_t timeout = dc->timeout > 0 ? dc->timeout : r->server->timeout;
+
+ if (strcmp(r->handler, CGI_MAGIC_TYPE) && strcmp(r->handler, "cgi-script")) {
+ return DECLINED;
+@@ -928,7 +775,7 @@
+ apr_file_pipe_timeout_set(script_in, 0);
+ apr_file_pipe_timeout_set(script_err, 0);
+
+- b = cgi_bucket_create(r, script_in, script_err, c->bucket_alloc);
++ b = cgi_bucket_create(r, dc->timeout, script_in, script_err, c->bucket_alloc);
+ if (b == NULL)
+ return HTTP_INTERNAL_SERVER_ERROR;
+ #else
+@@ -985,7 +832,7 @@
+ * stderr output, as normal. */
+ discard_script_output(bb);
+ apr_brigade_destroy(bb);
+- apr_file_pipe_timeout_set(script_err, r->server->timeout);
++ apr_file_pipe_timeout_set(script_err, timeout);
+ log_script_err(r, script_err);
+ }
+
+@@ -1036,7 +883,7 @@
+ * connection drops or we stopped sending output for some other
+ * reason */
+ if (rv == APR_SUCCESS && !r->connection->aborted) {
+- apr_file_pipe_timeout_set(script_err, r->server->timeout);
++ apr_file_pipe_timeout_set(script_err, timeout);
+ log_script_err(r, script_err);
+ }
+
+@@ -1277,7 +1124,7 @@
+ AP_DECLARE_MODULE(cgi) =
+ {
+ STANDARD20_MODULE_STUFF,
+- NULL, /* dir config creater */
++ create_cgi_dirconf, /* dir config creater */
+ NULL, /* dir merger --- default is to override */
+ create_cgi_config, /* server config */
+ merge_cgi_config, /* merge server config */
+--- httpd-2.4.37/modules/generators/mod_cgid.c
++++ httpd-2.4.37/modules/generators/mod_cgid.c
+@@ -342,15 +342,19 @@
+ return close(fd);
+ }
+
+-/* deal with incomplete reads and signals
+- * assume you really have to read buf_size bytes
+- */
+-static apr_status_t sock_read(int fd, void *vbuf, size_t buf_size)
++/* Read from the socket dealing with incomplete messages and signals.
++ * Returns 0 on success or errno on failure. Stderr fd passed as
++ * auxiliary data from other end is written to *errfd, or else stderr
++ * fileno if not present. */
++static apr_status_t sock_readhdr(int fd, int *errfd, void *vbuf, size_t buf_size)
+ {
+- char *buf = vbuf;
+ int rc;
++#ifndef HAVE_CGID_FDPASSING
++ char *buf = vbuf;
+ size_t bytes_read = 0;
+
++ if (errfd) *errfd = 0;
++
+ do {
+ do {
+ rc = read(fd, buf + bytes_read, buf_size - bytes_read);
+@@ -365,9 +369,52 @@
+ }
+ } while (bytes_read < buf_size);
+
++
++#else /* with FD passing */
++ struct msghdr msg = {0};
++ struct iovec vec = {vbuf, buf_size};
++ struct cmsghdr *cmsg;
++ union { /* union to ensure alignment */
++ struct cmsghdr cm;
++ char buf[CMSG_SPACE(sizeof(int))];
++ } u;
++
++ msg.msg_iov = &vec;
++ msg.msg_iovlen = 1;
++
++ msg.msg_control = u.buf;
++ msg.msg_controllen = sizeof(u.buf);
++
++ if (errfd) *errfd = 0;
++
++ /* use MSG_WAITALL to skip loop on truncated reads */
++ do {
++ rc = recvmsg(fd, &msg, MSG_WAITALL);
++ } while (rc < 0 && errno == EINTR);
++
++ if (rc == 0) {
++ return ECONNRESET;
++ }
++
++ cmsg = CMSG_FIRSTHDR(&msg);
++ if (errfd
++ && cmsg
++ && cmsg->cmsg_len == CMSG_LEN(sizeof(*errfd))
++ && cmsg->cmsg_level == SOL_SOCKET
++ && cmsg->cmsg_type == SCM_RIGHTS) {
++ *errfd = *((int *) CMSG_DATA(cmsg));
++ }
++#endif
++
+ return APR_SUCCESS;
+ }
+
++/* As sock_readhdr but without auxiliary fd passing. */
++static apr_status_t sock_read(int fd, void *vbuf, size_t buf_size)
++{
++ return sock_readhdr(fd, NULL, vbuf, buf_size);
++}
++
+ /* deal with signals
+ */
+ static apr_status_t sock_write(int fd, const void *buf, size_t buf_size)
+@@ -384,7 +431,7 @@
+ return APR_SUCCESS;
+ }
+
+-static apr_status_t sock_writev(int fd, request_rec *r, int count, ...)
++static apr_status_t sock_writev(int fd, int auxfd, request_rec *r, int count, ...)
+ {
+ va_list ap;
+ int rc;
+@@ -399,9 +446,39 @@
+ }
+ va_end(ap);
+
++#ifndef HAVE_CGID_FDPASSING
+ do {
+ rc = writev(fd, vec, count);
+ } while (rc < 0 && errno == EINTR);
++#else
++ {
++ struct msghdr msg = { 0 };
++ struct cmsghdr *cmsg;
++ union { /* union for alignment */
++ char buf[CMSG_SPACE(sizeof(int))];
++ struct cmsghdr align;
++ } u;
++
++ msg.msg_iov = vec;
++ msg.msg_iovlen = count;
++
++ if (auxfd) {
++ msg.msg_control = u.buf;
++ msg.msg_controllen = sizeof(u.buf);
++
++ cmsg = CMSG_FIRSTHDR(&msg);
++ cmsg->cmsg_level = SOL_SOCKET;
++ cmsg->cmsg_type = SCM_RIGHTS;
++ cmsg->cmsg_len = CMSG_LEN(sizeof(int));
++ *((int *) CMSG_DATA(cmsg)) = auxfd;
++ }
++
++ do {
++ rc = sendmsg(fd, &msg, 0);
++ } while (rc < 0 && errno == EINTR);
++ }
++#endif
++
+ if (rc < 0) {
+ return errno;
+ }
+@@ -410,7 +487,7 @@
+ }
+
+ static apr_status_t get_req(int fd, request_rec *r, char **argv0, char ***env,
+- cgid_req_t *req)
++ int *errfd, cgid_req_t *req)
+ {
+ int i;
+ char **environ;
+@@ -421,7 +498,7 @@
+ r->server = apr_pcalloc(r->pool, sizeof(server_rec));
+
+ /* read the request header */
+- stat = sock_read(fd, req, sizeof(*req));
++ stat = sock_readhdr(fd, errfd, req, sizeof(*req));
+ if (stat != APR_SUCCESS) {
+ return stat;
+ }
+@@ -479,14 +556,15 @@
+ return APR_SUCCESS;
+ }
+
+-static apr_status_t send_req(int fd, request_rec *r, char *argv0, char **env,
+- int req_type)
++static apr_status_t send_req(int fd, apr_file_t *errpipe, request_rec *r,
++ char *argv0, char **env, int req_type)
+ {
+ int i;
+ cgid_req_t req = {0};
+ apr_status_t stat;
+ ap_unix_identity_t * ugid = ap_run_get_suexec_identity(r);
+ core_dir_config *core_conf = ap_get_core_module_config(r->per_dir_config);
++ int errfd;
+
+
+ if (ugid == NULL) {
+@@ -507,16 +585,21 @@
+ req.args_len = r->args ? strlen(r->args) : 0;
+ req.loglevel = r->server->log.level;
+
++ if (errpipe)
++ apr_os_file_get(&errfd, errpipe);
++ else
++ errfd = 0;
++
+ /* Write the request header */
+ if (req.args_len) {
+- stat = sock_writev(fd, r, 5,
++ stat = sock_writev(fd, errfd, r, 5,
+ &req, sizeof(req),
+ r->filename, req.filename_len,
+ argv0, req.argv0_len,
+ r->uri, req.uri_len,
+ r->args, req.args_len);
+ } else {
+- stat = sock_writev(fd, r, 4,
++ stat = sock_writev(fd, errfd, r, 4,
+ &req, sizeof(req),
+ r->filename, req.filename_len,
+ argv0, req.argv0_len,
+@@ -531,7 +614,7 @@
+ for (i = 0; i < req.env_count; i++) {
+ apr_size_t curlen = strlen(env[i]);
+
+- if ((stat = sock_writev(fd, r, 2, &curlen, sizeof(curlen),
++ if ((stat = sock_writev(fd, 0, r, 2, &curlen, sizeof(curlen),
+ env[i], curlen)) != APR_SUCCESS) {
+ return stat;
+ }
+@@ -582,20 +665,34 @@
+ }
+ }
+
++/* Callback executed in the forked child process if exec of the CGI
++ * script fails. For the fd-passing case, output to stderr goes to
++ * the client (request handling thread) and is logged via
++ * ap_log_rerror there. For the non-fd-passing case, the "fake"
++ * request_rec passed via userdata is used to log. */
+ static void cgid_child_errfn(apr_pool_t *pool, apr_status_t err,
+ const char *description)
+ {
+- request_rec *r;
+ void *vr;
+
+ apr_pool_userdata_get(&vr, ERRFN_USERDATA_KEY, pool);
+- r = vr;
+-
+- /* sure we got r, but don't call ap_log_rerror() because we don't
+- * have r->headers_in and possibly other storage referenced by
+- * ap_log_rerror()
+- */
+- ap_log_error(APLOG_MARK, APLOG_ERR, err, r->server, APLOGNO(01241) "%s", description);
++ if (vr) {
++ request_rec *r = vr;
++
++ /* sure we got r, but don't call ap_log_rerror() because we don't
++ * have r->headers_in and possibly other storage referenced by
++ * ap_log_rerror()
++ */
++ ap_log_error(APLOG_MARK, APLOG_ERR, err, r->server, APLOGNO(01241) "%s", description);
++ }
++ else {
++ const char *logstr;
++
++ logstr = apr_psprintf(pool, APLOGNO(01241) "error spawning CGI child: %s (%pm)\n",
++ description, &err);
++ fputs(logstr, stderr);
++ fflush(stderr);
++ }
+ }
+
+ static int cgid_server(void *data)
+@@ -669,7 +766,7 @@
+ }
+
+ while (!daemon_should_exit) {
+- int errfileno = STDERR_FILENO;
++ int errfileno;
+ char *argv0 = NULL;
+ char **env = NULL;
+ const char * const *argv;
+@@ -709,7 +806,7 @@
+ r = apr_pcalloc(ptrans, sizeof(request_rec));
+ procnew = apr_pcalloc(ptrans, sizeof(*procnew));
+ r->pool = ptrans;
+- stat = get_req(sd2, r, &argv0, &env, &cgid_req);
++ stat = get_req(sd2, r, &argv0, &env, &errfileno, &cgid_req);
+ if (stat != APR_SUCCESS) {
+ ap_log_error(APLOG_MARK, APLOG_ERR, stat,
+ main_server, APLOGNO(01248)
+@@ -741,6 +838,16 @@
+ continue;
+ }
+
++ if (errfileno == 0) {
++ errfileno = STDERR_FILENO;
++ }
++ else {
++ ap_log_error(APLOG_MARK, APLOG_DEBUG, rv, main_server,
++ "using passed fd %d as stderr", errfileno);
++ /* Limit the received fd lifetime to pool lifetime */
++ apr_pool_cleanup_register(ptrans, (void *)((long)errfileno),
++ close_unix_socket, close_unix_socket);
++ }
+ apr_os_file_put(&r->server->error_log, &errfileno, 0, r->pool);
+ apr_os_file_put(&inout, &sd2, 0, r->pool);
+
+@@ -800,7 +907,10 @@
+ close(sd2);
+ }
+ else {
+- apr_pool_userdata_set(r, ERRFN_USERDATA_KEY, apr_pool_cleanup_null, ptrans);
++ if (errfileno == STDERR_FILENO) {
++ /* Used by cgid_child_errfn without fd-passing. */
++ apr_pool_userdata_set(r, ERRFN_USERDATA_KEY, apr_pool_cleanup_null, ptrans);
++ }
+
+ argv = (const char * const *)create_argv(r->pool, NULL, NULL, NULL, argv0, r->args);
+
+@@ -1099,6 +1209,33 @@
+ return ret;
+ }
+
++/* Soak up stderr from a script and redirect it to the error log.
++ * TODO: log_scripterror() and this could move to cgi_common.h. */
++static apr_status_t log_script_err(request_rec *r, apr_file_t *script_err)
++{
++ char argsbuffer[HUGE_STRING_LEN];
++ char *newline;
++ apr_status_t rv;
++ cgid_server_conf *conf = ap_get_module_config(r->server->module_config, &cgid_module);
++
++ while ((rv = apr_file_gets(argsbuffer, HUGE_STRING_LEN,
++ script_err)) == APR_SUCCESS) {
++
++ newline = strchr(argsbuffer, '\n');
++ if (newline) {
++ char *prev = newline - 1;
++ if (prev >= argsbuffer && *prev == '\r') {
++ newline = prev;
++ }
++
++ *newline = '\0';
++ }
++ log_scripterror(r, conf, r->status, 0, argsbuffer);
++ }
++
++ return rv;
++}
++
+ static int log_script(request_rec *r, cgid_server_conf * conf, int ret,
+ char *dbuf, const char *sbuf, apr_bucket_brigade *bb,
+ apr_file_t *script_err)
+@@ -1204,6 +1341,11 @@
+ return ret;
+ }
+
++#ifdef HAVE_CGID_FDPASSING
++/* Pull in CGI bucket implementation. */
++#include "cgi_common.h"
++#endif
++
+ static int connect_to_daemon(int *sdptr, request_rec *r,
+ cgid_server_conf *conf)
+ {
+@@ -1395,6 +1537,7 @@
+
+ static int cgid_handler(request_rec *r)
+ {
++ conn_rec *c = r->connection;
+ int retval, nph, dbpos;
+ char *argv0, *dbuf;
+ apr_bucket_brigade *bb;
+@@ -1404,10 +1547,11 @@
+ int seen_eos, child_stopped_reading;
+ int sd;
+ char **env;
+- apr_file_t *tempsock;
++ apr_file_t *tempsock, *script_err, *errpipe_out;
+ struct cleanup_script_info *info;
+ apr_status_t rv;
+ cgid_dirconf *dc;
++ apr_interval_time_t timeout;
+
+ if (strcmp(r->handler, CGI_MAGIC_TYPE) && strcmp(r->handler, "cgi-script")) {
+ return DECLINED;
+@@ -1416,7 +1560,7 @@
+ conf = ap_get_module_config(r->server->module_config, &cgid_module);
+ dc = ap_get_module_config(r->per_dir_config, &cgid_module);
+
+-
++ timeout = dc->timeout > 0 ? dc->timeout : r->server->timeout;
+ is_included = !strcmp(r->protocol, "INCLUDED");
+
+ if ((argv0 = strrchr(r->filename, '/')) != NULL) {
+@@ -1469,6 +1613,17 @@
+ }
+ */
+
++#ifdef HAVE_CGID_FDPASSING
++ rv = apr_file_pipe_create(&script_err, &errpipe_out, r->pool);
++ if (rv) {
++ return log_scripterror(r, conf, HTTP_SERVICE_UNAVAILABLE, rv, APLOGNO(10176)
++ "could not create pipe for stderr");
++ }
++#else
++ script_err = NULL;
++ errpipe_out = NULL;
++#endif
++
+ /*
+ * httpd core function used to add common environment variables like
+ * DOCUMENT_ROOT.
+@@ -1481,12 +1636,16 @@
+ return retval;
+ }
+
+- rv = send_req(sd, r, argv0, env, CGI_REQ);
++ rv = send_req(sd, errpipe_out, r, argv0, env, CGI_REQ);
+ if (rv != APR_SUCCESS) {
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01268)
+ "write to cgi daemon process");
+ }
+
++ /* The write-end of the pipe is only used by the server, so close
++ * it here. */
++ if (errpipe_out) apr_file_close(errpipe_out);
++
+ info = apr_palloc(r->pool, sizeof(struct cleanup_script_info));
+ info->conf = conf;
+ info->r = r;
+@@ -1508,12 +1667,7 @@
+ */
+
+ apr_os_pipe_put_ex(&tempsock, &sd, 1, r->pool);
+- if (dc->timeout > 0) {
+- apr_file_pipe_timeout_set(tempsock, dc->timeout);
+- }
+- else {
+- apr_file_pipe_timeout_set(tempsock, r->server->timeout);
+- }
++ apr_file_pipe_timeout_set(tempsock, timeout);
+ apr_pool_cleanup_kill(r->pool, (void *)((long)sd), close_unix_socket);
+
+ /* Transfer any put/post args, CERN style...
+@@ -1605,23 +1759,28 @@
+ */
+ shutdown(sd, 1);
+
++ bb = apr_brigade_create(r->pool, c->bucket_alloc);
++#ifdef HAVE_CGID_FDPASSING
++ b = cgi_bucket_create(r, dc->timeout, tempsock, script_err, c->bucket_alloc);
++ if (b == NULL)
++ return HTTP_INTERNAL_SERVER_ERROR; /* should call log_scripterror() w/ _UNAVAILABLE? */
++#else
++ b = apr_bucket_pipe_create(tempsock, c->bucket_alloc);
++#endif
++ APR_BRIGADE_INSERT_TAIL(bb, b);
++ b = apr_bucket_eos_create(c->bucket_alloc);
++ APR_BRIGADE_INSERT_TAIL(bb, b);
++
+ /* Handle script return... */
+ if (!nph) {
+- conn_rec *c = r->connection;
+ const char *location;
+ char sbuf[MAX_STRING_LEN];
+ int ret;
+
+- bb = apr_brigade_create(r->pool, c->bucket_alloc);
+- b = apr_bucket_pipe_create(tempsock, c->bucket_alloc);
+- APR_BRIGADE_INSERT_TAIL(bb, b);
+- b = apr_bucket_eos_create(c->bucket_alloc);
+- APR_BRIGADE_INSERT_TAIL(bb, b);
+-
+ if ((ret = ap_scan_script_header_err_brigade_ex(r, bb, sbuf,
+ APLOG_MODULE_INDEX)))
+ {
+- ret = log_script(r, conf, ret, dbuf, sbuf, bb, NULL);
++ ret = log_script(r, conf, ret, dbuf, sbuf, bb, script_err);
+
+ /*
+ * ret could be HTTP_NOT_MODIFIED in the case that the CGI script
+@@ -1658,6 +1817,11 @@
+ /* Soak up all the script output */
+ discard_script_output(bb);
+ apr_brigade_destroy(bb);
++ if (script_err) {
++ apr_file_pipe_timeout_set(script_err, timeout);
++ log_script_err(r, script_err);
++ }
++
+ /* This redirect needs to be a GET no matter what the original
+ * method was.
+ */
+@@ -1690,7 +1854,6 @@
+ }
+
+ if (nph) {
+- conn_rec *c = r->connection;
+ struct ap_filter_t *cur;
+
+ /* get rid of all filters up through protocol... since we
+@@ -1704,14 +1867,20 @@
+ }
+ r->output_filters = r->proto_output_filters = cur;
+
+- bb = apr_brigade_create(r->pool, c->bucket_alloc);
+- b = apr_bucket_pipe_create(tempsock, c->bucket_alloc);
+- APR_BRIGADE_INSERT_TAIL(bb, b);
+- b = apr_bucket_eos_create(c->bucket_alloc);
+- APR_BRIGADE_INSERT_TAIL(bb, b);
+- ap_pass_brigade(r->output_filters, bb);
++ rv = ap_pass_brigade(r->output_filters, bb);
+ }
+
++ /* don't soak up script output if errors occurred writing it
++ * out... otherwise, we prolong the life of the script when the
++ * connection drops or we stopped sending output for some other
++ * reason */
++ if (script_err && rv == APR_SUCCESS && !r->connection->aborted) {
++ apr_file_pipe_timeout_set(script_err, timeout);
++ log_script_err(r, script_err);
++ }
++
++ if (script_err) apr_file_close(script_err);
++
+ return OK; /* NOT r->status, even if it has changed. */
+ }
+
+@@ -1829,7 +1998,7 @@
+ return retval;
+ }
+
+- send_req(sd, r, command, env, SSI_REQ);
++ send_req(sd, NULL, r, command, env, SSI_REQ);
+
+ info = apr_palloc(r->pool, sizeof(struct cleanup_script_info));
+ info->conf = conf;
+--- httpd-2.4.37/modules/generators/config5.m4
++++ httpd-2.4.37/modules/generators/config5.m4
+@@ -78,4 +78,15 @@
+
+ APR_ADDTO(INCLUDES, [-I\$(top_srcdir)/$modpath_current])
+
++AC_ARG_ENABLE(cgid-fdpassing,
++ [APACHE_HELP_STRING(--enable-cgid-fdpassing,Enable experimental mod_cgid support for fd passing)],
++ [if test "$enableval" = "yes"; then
++ AC_CHECK_DECL(CMSG_DATA,
++ [AC_DEFINE([HAVE_CGID_FDPASSING], 1, [Enable FD passing support in mod_cgid])],
++ [AC_MSG_ERROR([cannot support mod_cgid fd-passing on this system])], [
++#include
++#include ])
++ fi
++])
++
+ APACHE_MODPATH_FINISH
+--- httpd-2.4.37/modules/generators/cgi_common.h
++++ httpd-2.4.37/modules/generators/cgi_common.h
+@@ -0,0 +1,216 @@
++/* Licensed to the Apache Software Foundation (ASF) under one or more
++ * contributor license agreements. See the NOTICE file distributed with
++ * this work for additional information regarding copyright ownership.
++ * The ASF licenses this file to You under the Apache License, Version 2.0
++ * (the "License"); you may not use this file except in compliance with
++ * the License. You may obtain a copy of the License at
++ *
++ * http://www.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++
++#include "apr.h"
++#include "apr_strings.h"
++#include "apr_buckets.h"
++#include "apr_lib.h"
++#include "apr_poll.h"
++
++#define APR_WANT_STRFUNC
++#define APR_WANT_MEMFUNC
++#include "apr_want.h"
++
++#include "httpd.h"
++#include "util_filter.h"
++
++/* A CGI bucket type is needed to catch any output to stderr from the
++ * script; see PR 22030. */
++static const apr_bucket_type_t bucket_type_cgi;
++
++struct cgi_bucket_data {
++ apr_pollset_t *pollset;
++ request_rec *r;
++ apr_interval_time_t timeout;
++};
++
++/* Create a CGI bucket using pipes from script stdout 'out'
++ * and stderr 'err', for request 'r'. */
++static apr_bucket *cgi_bucket_create(request_rec *r,
++ apr_interval_time_t timeout,
++ apr_file_t *out, apr_file_t *err,
++ apr_bucket_alloc_t *list)
++{
++ apr_bucket *b = apr_bucket_alloc(sizeof(*b), list);
++ apr_status_t rv;
++ apr_pollfd_t fd;
++ struct cgi_bucket_data *data = apr_palloc(r->pool, sizeof *data);
++
++ APR_BUCKET_INIT(b);
++ b->free = apr_bucket_free;
++ b->list = list;
++ b->type = &bucket_type_cgi;
++ b->length = (apr_size_t)(-1);
++ b->start = -1;
++
++ /* Create the pollset */
++ rv = apr_pollset_create(&data->pollset, 2, r->pool, 0);
++ if (rv != APR_SUCCESS) {
++ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01217)
++ "apr_pollset_create(); check system or user limits");
++ return NULL;
++ }
++
++ fd.desc_type = APR_POLL_FILE;
++ fd.reqevents = APR_POLLIN;
++ fd.p = r->pool;
++ fd.desc.f = out; /* script's stdout */
++ fd.client_data = (void *)1;
++ rv = apr_pollset_add(data->pollset, &fd);
++ if (rv != APR_SUCCESS) {
++ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01218)
++ "apr_pollset_add(); check system or user limits");
++ return NULL;
++ }
++
++ fd.desc.f = err; /* script's stderr */
++ fd.client_data = (void *)2;
++ rv = apr_pollset_add(data->pollset, &fd);
++ if (rv != APR_SUCCESS) {
++ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01219)
++ "apr_pollset_add(); check system or user limits");
++ return NULL;
++ }
++
++ data->r = r;
++ data->timeout = timeout;
++ b->data = data;
++ return b;
++}
++
++/* Create a duplicate CGI bucket using given bucket data */
++static apr_bucket *cgi_bucket_dup(struct cgi_bucket_data *data,
++ apr_bucket_alloc_t *list)
++{
++ apr_bucket *b = apr_bucket_alloc(sizeof(*b), list);
++ APR_BUCKET_INIT(b);
++ b->free = apr_bucket_free;
++ b->list = list;
++ b->type = &bucket_type_cgi;
++ b->length = (apr_size_t)(-1);
++ b->start = -1;
++ b->data = data;
++ return b;
++}
++
++/* Handle stdout from CGI child. Duplicate of logic from the _read
++ * method of the real APR pipe bucket implementation. */
++static apr_status_t cgi_read_stdout(apr_bucket *a, apr_file_t *out,
++ const char **str, apr_size_t *len)
++{
++ char *buf;
++ apr_status_t rv;
++
++ *str = NULL;
++ *len = APR_BUCKET_BUFF_SIZE;
++ buf = apr_bucket_alloc(*len, a->list); /* XXX: check for failure? */
++
++ rv = apr_file_read(out, buf, len);
++
++ if (rv != APR_SUCCESS && rv != APR_EOF) {
++ apr_bucket_free(buf);
++ return rv;
++ }
++
++ if (*len > 0) {
++ struct cgi_bucket_data *data = a->data;
++ apr_bucket_heap *h;
++
++ /* Change the current bucket to refer to what we read */
++ a = apr_bucket_heap_make(a, buf, *len, apr_bucket_free);
++ h = a->data;
++ h->alloc_len = APR_BUCKET_BUFF_SIZE; /* note the real buffer size */
++ *str = buf;
++ APR_BUCKET_INSERT_AFTER(a, cgi_bucket_dup(data, a->list));
++ }
++ else {
++ apr_bucket_free(buf);
++ a = apr_bucket_immortal_make(a, "", 0);
++ *str = a->data;
++ }
++ return rv;
++}
++
++/* Read method of CGI bucket: polls on stderr and stdout of the child,
++ * sending any stderr output immediately away to the error log. */
++static apr_status_t cgi_bucket_read(apr_bucket *b, const char **str,
++ apr_size_t *len, apr_read_type_e block)
++{
++ struct cgi_bucket_data *data = b->data;
++ apr_interval_time_t timeout = 0;
++ apr_status_t rv;
++ int gotdata = 0;
++
++ if (block != APR_NONBLOCK_READ) {
++ timeout = data->timeout > 0 ? data->timeout : data->r->server->timeout;
++ }
++
++ do {
++ const apr_pollfd_t *results;
++ apr_int32_t num;
++
++ rv = apr_pollset_poll(data->pollset, timeout, &num, &results);
++ if (APR_STATUS_IS_TIMEUP(rv)) {
++ if (timeout) {
++ ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, data->r, APLOGNO(01220)
++ "Timeout waiting for output from CGI script %s",
++ data->r->filename);
++ return rv;
++ }
++ else {
++ return APR_EAGAIN;
++ }
++ }
++ else if (APR_STATUS_IS_EINTR(rv)) {
++ continue;
++ }
++ else if (rv != APR_SUCCESS) {
++ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, data->r, APLOGNO(01221)
++ "poll failed waiting for CGI child");
++ return rv;
++ }
++
++ for (; num; num--, results++) {
++ if (results[0].client_data == (void *)1) {
++ /* stdout */
++ rv = cgi_read_stdout(b, results[0].desc.f, str, len);
++ if (APR_STATUS_IS_EOF(rv)) {
++ rv = APR_SUCCESS;
++ }
++ gotdata = 1;
++ } else {
++ /* stderr */
++ apr_status_t rv2 = log_script_err(data->r, results[0].desc.f);
++ if (APR_STATUS_IS_EOF(rv2)) {
++ apr_pollset_remove(data->pollset, &results[0]);
++ }
++ }
++ }
++
++ } while (!gotdata);
++
++ return rv;
++}
++
++static const apr_bucket_type_t bucket_type_cgi = {
++ "CGI", 5, APR_BUCKET_DATA,
++ apr_bucket_destroy_noop,
++ cgi_bucket_read,
++ apr_bucket_setaside_notimpl,
++ apr_bucket_split_notimpl,
++ apr_bucket_copy_notimpl
++};
++
diff --git a/httpd.spec b/httpd.spec
index 5fbcc76..98f5102 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -13,7 +13,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.39
-Release: 10%{?dist}
+Release: 11%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -77,6 +77,7 @@ Patch38: httpd-2.4.34-sslciphdefault.patch
Patch39: httpd-2.4.37-sslprotdefault.patch
Patch40: httpd-2.4.39-r1861269.patch
Patch41: httpd-2.4.37-r1861793+.patch
+Patch42: httpd-2.4.37-r1828172+.patch
# Bug fixes
# https://bugzilla.redhat.com/show_bug.cgi?id=1397243
@@ -218,6 +219,7 @@ interface for storing and accessing per-user session data.
%patch39 -p1 -b .sslprotdefault
%patch40 -p1 -b .r1861269
%patch41 -p1 -b .r1861793+
+%patch42 -p1 -b .r1828172+
%patch58 -p1 -b .r1738878
%patch60 -p1 -b .enable-sslv3
@@ -316,6 +318,7 @@ export LYNX_PATH=/usr/bin/links
--enable-disk-cache \
--enable-ldap --enable-authnz-ldap \
--enable-cgid --enable-cgi \
+ --enable-cgid-fdpassing \
--enable-authn-anon --enable-authn-alias \
--disable-imagemap --disable-file-cache \
--disable-http2 \
@@ -743,6 +746,9 @@ exit $rv
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Wed Jul 17 2019 Joe Orton - 2.4.39-11
+- mod_cgid: use fd passing to fix script stderr handling (#1591157)
+
* Mon Jul 8 2019 Joe Orton - 2.4.39-10
- htpasswd: add SHA-256/512 support
- apachectl: restore -V/-v/-t support (#1727434)
From fc0e844ce257850a310accba95d25b054f33bed3 Mon Sep 17 00:00:00 2001
From: Lubos Uhliarik
Date: Fri, 19 Jul 2019 11:28:20 +0200
Subject: [PATCH 177/359] - Remove pointless creation of /var/lib/httpd/state
dir in RPM build root - Substitute tabs for spaces.
---
httpd.spec | 47 +++++++++++++++++++++++------------------------
1 file changed, 23 insertions(+), 24 deletions(-)
diff --git a/httpd.spec b/httpd.spec
index 98f5102..b64a53e 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -276,7 +276,7 @@ autoheader && autoconf || exit 1
# Before configure; fix location of build dir in generated apxs
%{__perl} -pi -e "s:\@exp_installbuilddir\@:%{_libdir}/httpd/build:g" \
- support/apxs.in
+ support/apxs.in
export CFLAGS=$RPM_OPT_FLAGS
export LDFLAGS="-Wl,-z,relro,-z,now"
@@ -286,34 +286,34 @@ export LYNX_PATH=/usr/bin/links
# Build the daemon
./configure \
- --prefix=%{_sysconfdir}/httpd \
- --exec-prefix=%{_prefix} \
- --bindir=%{_bindir} \
- --sbindir=%{_sbindir} \
- --mandir=%{_mandir} \
- --libdir=%{_libdir} \
- --sysconfdir=%{_sysconfdir}/httpd/conf \
- --includedir=%{_includedir}/httpd \
- --libexecdir=%{_libdir}/httpd/modules \
- --datadir=%{contentdir} \
+ --prefix=%{_sysconfdir}/httpd \
+ --exec-prefix=%{_prefix} \
+ --bindir=%{_bindir} \
+ --sbindir=%{_sbindir} \
+ --mandir=%{_mandir} \
+ --libdir=%{_libdir} \
+ --sysconfdir=%{_sysconfdir}/httpd/conf \
+ --includedir=%{_includedir}/httpd \
+ --libexecdir=%{_libdir}/httpd/modules \
+ --datadir=%{contentdir} \
--enable-layout=Fedora \
--with-installbuilddir=%{_libdir}/httpd/build \
--enable-mpms-shared=all \
--with-apr=%{_prefix} --with-apr-util=%{_prefix} \
- --enable-suexec --with-suexec \
+ --enable-suexec --with-suexec \
--enable-suexec-capabilities \
- --with-suexec-caller=%{suexec_caller} \
- --with-suexec-docroot=%{docroot} \
- --without-suexec-logfile \
+ --with-suexec-caller=%{suexec_caller} \
+ --with-suexec-docroot=%{docroot} \
+ --without-suexec-logfile \
--with-suexec-syslog \
- --with-suexec-bin=%{_sbindir}/suexec \
- --with-suexec-uidmin=1000 --with-suexec-gidmin=1000 \
+ --with-suexec-bin=%{_sbindir}/suexec \
+ --with-suexec-uidmin=1000 --with-suexec-gidmin=1000 \
--with-brotli \
--enable-pie \
--with-pcre \
--enable-mods-shared=all \
- --enable-ssl --with-ssl --disable-distcache \
- --enable-proxy --enable-proxy-fdpass \
+ --enable-ssl --with-ssl --disable-distcache \
+ --enable-proxy --enable-proxy-fdpass \
--enable-cache \
--enable-disk-cache \
--enable-ldap --enable-authnz-ldap \
@@ -323,7 +323,7 @@ export LYNX_PATH=/usr/bin/links
--disable-imagemap --disable-file-cache \
--disable-http2 \
--disable-md \
- $*
+ $*
make %{?_smp_mflags}
%install
@@ -396,7 +396,6 @@ install -m 644 -p $RPM_SOURCE_DIR/httpd.tmpfiles \
# Other directories
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/dav \
- $RPM_BUILD_ROOT%{_localstatedir}/lib/httpd/state \
$RPM_BUILD_ROOT/run/httpd/htcacheclean
# Substitute in defaults which are usually done (badly) by "make install"
@@ -471,11 +470,11 @@ ln -s ../..%{_libdir}/httpd/modules $RPM_BUILD_ROOT/etc/httpd/modules
# install http-ssl-pass-dialog
mkdir -p $RPM_BUILD_ROOT%{_libexecdir}
install -m755 $RPM_SOURCE_DIR/httpd-ssl-pass-dialog \
- $RPM_BUILD_ROOT%{_libexecdir}/httpd-ssl-pass-dialog
+ $RPM_BUILD_ROOT%{_libexecdir}/httpd-ssl-pass-dialog
# install http-ssl-gencerts
install -m755 $RPM_SOURCE_DIR/httpd-ssl-gencerts \
- $RPM_BUILD_ROOT%{_libexecdir}/httpd-ssl-gencerts
+ $RPM_BUILD_ROOT%{_libexecdir}/httpd-ssl-gencerts
# Install scripts
install -m 755 apachectl.sh $RPM_BUILD_ROOT%{_sbindir}/apachectl
@@ -489,7 +488,7 @@ done
# Install logrotate config
mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
install -m 644 -p $RPM_SOURCE_DIR/httpd.logrotate \
- $RPM_BUILD_ROOT/etc/logrotate.d/httpd
+ $RPM_BUILD_ROOT/etc/logrotate.d/httpd
# Install man pages
install -d $RPM_BUILD_ROOT%{_mandir}/man8 $RPM_BUILD_ROOT%{_mandir}/man5
From 5586dfdc484bd6860eb6c46b6178318d17e5ea24 Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Tue, 23 Jul 2019 10:41:39 +0100
Subject: [PATCH 178/359] drop /var/lib/dav directory, since mod_dav_fs uses
statedir
---
httpd.spec | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/httpd.spec b/httpd.spec
index b64a53e..82ff179 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -13,7 +13,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.39
-Release: 11%{?dist}
+Release: 12%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -395,12 +395,12 @@ install -m 644 -p $RPM_SOURCE_DIR/httpd.tmpfiles \
$RPM_BUILD_ROOT%{_prefix}/lib/tmpfiles.d/httpd.conf
# Other directories
-mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/dav \
+mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/httpd \
$RPM_BUILD_ROOT/run/httpd/htcacheclean
# Substitute in defaults which are usually done (badly) by "make install"
sed -i \
- "s,@@ServerRoot@@/var,%{_localstatedir}/lib/dav,;
+ "/^DavLockDB/d;
s,@@ServerRoot@@/user.passwd,/etc/httpd/conf/user.passwd,;
s,@@ServerRoot@@/docs,%{docroot},;
s,@@ServerRoot@@,%{docroot},;
@@ -673,7 +673,6 @@ exit $rv
%attr(0710,root,apache) %dir /run/httpd
%attr(0700,apache,apache) %dir /run/httpd/htcacheclean
%attr(0700,root,root) %dir %{_localstatedir}/log/httpd
-%attr(0700,apache,apache) %dir %{_localstatedir}/lib/dav
%attr(0700,apache,apache) %dir %{_localstatedir}/lib/httpd
%attr(0700,apache,apache) %dir %{_localstatedir}/cache/httpd
%attr(0700,apache,apache) %dir %{_localstatedir}/cache/httpd/proxy
@@ -745,6 +744,9 @@ exit $rv
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Tue Jul 23 2019 Joe Orton - 2.4.39-12
+- drop /var/lib/dav directory, since mod_dav_fs uses statedir
+
* Wed Jul 17 2019 Joe Orton - 2.4.39-11
- mod_cgid: use fd passing to fix script stderr handling (#1591157)
From 84b529bffa2507d21b32bf5a95f7cdec5c6e30ef Mon Sep 17 00:00:00 2001
From: Fedora Release Engineering
Date: Thu, 25 Jul 2019 08:38:22 +0000
Subject: [PATCH 179/359] - Rebuilt for
https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering
---
httpd.spec | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/httpd.spec b/httpd.spec
index 82ff179..69c630c 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -13,7 +13,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.39
-Release: 12%{?dist}
+Release: 13%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -744,6 +744,9 @@ exit $rv
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Thu Jul 25 2019 Fedora Release Engineering - 2.4.39-13
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
+
* Tue Jul 23 2019 Joe Orton - 2.4.39-12
- drop /var/lib/dav directory, since mod_dav_fs uses statedir
From 1578b453430d67328430007f0f1ddfffc0e83dfd Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Thu, 15 Aug 2019 06:44:03 +0100
Subject: [PATCH 180/359] update to 2.4.41
---
httpd-2.4.37-r1857129.patch | 65 ------------------------------------
httpd-2.4.37-r1861793+.patch | 4 +--
httpd-2.4.39-r1842929+.patch | 35 -------------------
httpd.spec | 10 +++---
sources | 2 +-
5 files changed, 8 insertions(+), 108 deletions(-)
delete mode 100644 httpd-2.4.37-r1857129.patch
diff --git a/httpd-2.4.37-r1857129.patch b/httpd-2.4.37-r1857129.patch
deleted file mode 100644
index 4dbf05a..0000000
--- a/httpd-2.4.37-r1857129.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-# ./pullrev.sh 1857129
-http://svn.apache.org/viewvc?view=revision&revision=1857129
-
---- httpd-2.4.37/modules/filters/mod_reqtimeout.c
-+++ httpd-2.4.37/modules/filters/mod_reqtimeout.c
-@@ -31,7 +31,7 @@
- #define UNSET -1
- #define MRT_DEFAULT_handshake_TIMEOUT 0 /* disabled */
- #define MRT_DEFAULT_handshake_MAX_TIMEOUT 0
--#define MRT_DEFAULT_handshake_MIN_RATE APR_INT32_MAX
-+#define MRT_DEFAULT_handshake_MIN_RATE 0
- #define MRT_DEFAULT_header_TIMEOUT 20
- #define MRT_DEFAULT_header_MAX_TIMEOUT 40
- #define MRT_DEFAULT_header_MIN_RATE 500
-@@ -220,7 +220,7 @@
- if (block == APR_NONBLOCK_READ || mode == AP_MODE_INIT
- || mode == AP_MODE_EATCRLF) {
- rv = ap_get_brigade(f->next, bb, mode, block, readbytes);
-- if (ccfg->cur_stage.rate_factor > 0 && rv == APR_SUCCESS) {
-+ if (ccfg->cur_stage.rate_factor && rv == APR_SUCCESS) {
- extend_timeout(ccfg, bb);
- }
- return rv;
-@@ -254,7 +254,7 @@
- }
-
- if (!APR_BRIGADE_EMPTY(bb)) {
-- if (ccfg->cur_stage.rate_factor > 0) {
-+ if (ccfg->cur_stage.rate_factor) {
- extend_timeout(ccfg, bb);
- }
-
-@@ -315,7 +315,7 @@
- * the real (relevant) bytes to be asked later, within the
- * currently alloted time.
- */
-- if (ccfg->cur_stage.rate_factor > 0 && rv == APR_SUCCESS
-+ if (ccfg->cur_stage.rate_factor && rv == APR_SUCCESS
- && mode != AP_MODE_SPECULATIVE) {
- extend_timeout(ccfg, bb);
- }
-@@ -638,17 +638,17 @@
- ap_hook_post_read_request(reqtimeout_before_body, NULL, NULL,
- APR_HOOK_MIDDLE);
-
--#if MRT_DEFAULT_HANDSHAKE_MIN_RATE > 0
-+#if MRT_DEFAULT_handshake_MIN_RATE
- default_handshake_rate_factor = apr_time_from_sec(1) /
-- MRT_DEFAULT_HANDSHAKE_MIN_RATE;
-+ MRT_DEFAULT_handshake_MIN_RATE;
- #endif
--#if MRT_DEFAULT_HEADER_MIN_RATE > 0
-+#if MRT_DEFAULT_header_MIN_RATE
- default_header_rate_factor = apr_time_from_sec(1) /
-- MRT_DEFAULT_HEADER_MIN_RATE;
-+ MRT_DEFAULT_header_MIN_RATE;
- #endif
--#if MRT_DEFAULT_BODY_MIN_RATE > 0
-+#if MRT_DEFAULT_body_MIN_RATE
- default_body_rate_factor = apr_time_from_sec(1) /
-- MRT_DEFAULT_BODY_MIN_RATE;
-+ MRT_DEFAULT_body_MIN_RATE;
- #endif
- }
-
diff --git a/httpd-2.4.37-r1861793+.patch b/httpd-2.4.37-r1861793+.patch
index c522c7c..22886e2 100644
--- a/httpd-2.4.37-r1861793+.patch
+++ b/httpd-2.4.37-r1861793+.patch
@@ -46,7 +46,7 @@ http://svn.apache.org/viewvc?view=revision&revision=1862612
+ " -5 Force SHA-512 crypt() hash of the password (very secure)." NL
+ " -B Force bcrypt aencryption of the password (very secure)." NL
" -C Set the computing time used for the bcrypt algorithm" NL
- " (higher is more secure but slower, default: %d, valid: 4 to 31)." NL
+ " (higher is more secure but slower, default: %d, valid: 4 to 17)." NL
+ " -r Set the number of rounds used for the SHA-256, SHA-512 algorithms" NL
+ " (higher is more secure but slower, default: 5000)." NL
" -d Force CRYPT encryption of the password (8 chars max, insecure)." NL
@@ -237,7 +237,7 @@ http://svn.apache.org/viewvc?view=revision&revision=1862612
.TP
@@ -79,11 +85,14 @@
\fB-C\fR
- This flag is only allowed in combination with \fB-B\fR (bcrypt encryption)\&. It sets the computing time used for the bcrypt algorithm (higher is more secure but slower, default: 5, valid: 4 to 31)\&.
+ This flag is only allowed in combination with \fB-B\fR (bcrypt encryption)\&. It sets the computing time used for the bcrypt algorithm (higher is more secure but slower, default: 5, valid: 4 to 17)\&.
.TP
+\fB-r\fR
+This flag is only allowed in combination with \fB-2\fR or \fB-5\fR\&. It sets the number of hash rounds used for the SHA-2 algorithms (higher is more secure but slower; the default is 5,000)\&.
diff --git a/httpd-2.4.39-r1842929+.patch b/httpd-2.4.39-r1842929+.patch
index 9fea432..0bf7292 100644
--- a/httpd-2.4.39-r1842929+.patch
+++ b/httpd-2.4.39-r1842929+.patch
@@ -118,41 +118,6 @@ http://svn.apache.org/viewvc?view=revision&revision=1853631
dav_hook_gather_propsets(dav_fs_gather_propsets, NULL, NULL,
APR_HOOK_MIDDLE);
dav_hook_find_liveprop(dav_fs_find_liveprop, NULL, NULL, APR_HOOK_MIDDLE);
---- httpd-2.4.39/modules/md/mod_md_config.c.r1842929+
-+++ httpd-2.4.39/modules/md/mod_md_config.c
-@@ -54,10 +54,18 @@
-
- #define DEF_VAL (-1)
-
-+#ifndef MD_DEFAULT_BASE_DIR
-+#define MD_DEFAULT_BASE_DIR "md"
-+#endif
-+
- /* Default settings for the global conf */
- static md_mod_conf_t defmc = {
- NULL,
-- "md",
-+#if 1
-+ NULL, /* apply default state-dir-relative */
-+#else
-+ MD_DEFAULT_BASE_DIR,
-+#endif
- NULL,
- NULL,
- 80,
-@@ -864,6 +872,12 @@
- if (mc->hsts_max_age > 0) {
- mc->hsts_header = apr_psprintf(p, "max-age=%d", mc->hsts_max_age);
- }
-+
-+#if 1
-+ if (mc->base_dir == NULL) {
-+ mc->base_dir = ap_state_dir_relative(p, MD_DEFAULT_BASE_DIR);
-+ }
-+#endif
-
- return APR_SUCCESS;
- }
--- httpd-2.4.39/server/core.c.r1842929+
+++ httpd-2.4.39/server/core.c
@@ -129,6 +129,8 @@
diff --git a/httpd.spec b/httpd.spec
index 69c630c..ed18bf1 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -12,8 +12,8 @@
Summary: Apache HTTP Server
Name: httpd
-Version: 2.4.39
-Release: 13%{?dist}
+Version: 2.4.41
+Release: 1%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -83,8 +83,6 @@ Patch42: httpd-2.4.37-r1828172+.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1397243
Patch58: httpd-2.4.34-r1738878.patch
Patch60: httpd-2.4.34-enable-sslv3.patch
-# https://bz.apache.org/bugzilla/show_bug.cgi?id=63325
-Patch61: httpd-2.4.37-r1857129.patch
# Security fixes
@@ -223,7 +221,6 @@ interface for storing and accessing per-user session data.
%patch58 -p1 -b .r1738878
%patch60 -p1 -b .enable-sslv3
-%patch61 -p1 -b .r1857129
# Patch in the vendor string
sed -i '/^#define PLATFORM/s/Unix/%{vstring}/' os/unix/os.h
@@ -744,6 +741,9 @@ exit $rv
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Thu Aug 15 2019 Joe Orton - 2.4.41-1
+- update to 2.4.41
+
* Thu Jul 25 2019 Fedora Release Engineering - 2.4.39-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
diff --git a/sources b/sources
index 248974a..c6aa939 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (httpd-2.4.39.tar.bz2) = 9742202040b3dc6344b301540f54b2d3f8e36898410d24206a7f8dcecb1bea7d7230fabc7256752724558af249facf64bffe2cf678b8f7cccb64076737abfda7
+SHA512 (httpd-2.4.41.tar.bz2) = 350cc7dcd2c439e0590338fa6da3f44df44f9bb885c381e91f91b14c2f48597f6f0bbac0ea118a8a67eaa70ae7edbb769beace368643ed73f6daee44c307b335
From 8c08392f60a8d4651bb53b8f83cd024fb90c9653 Mon Sep 17 00:00:00 2001
From: Stephen Gallagher
Date: Tue, 14 May 2019 10:55:19 -0400
Subject: [PATCH 181/359] Use testpage from system-logos-httpd for proper
branding
Signed-off-by: Stephen Gallagher
---
httpd.spec | 10 ++--
index.html | 132 ---------------------------------------------------
welcome.conf | 1 +
3 files changed, 7 insertions(+), 136 deletions(-)
delete mode 100644 index.html
diff --git a/httpd.spec b/httpd.spec
index ed18bf1..043b593 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -13,10 +13,9 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.41
-Release: 1%{?dist}
+Release: 2%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
-Source1: index.html
Source2: httpd.logrotate
Source3: instance.conf
Source4: httpd-ssl-pass-dialog
@@ -428,8 +427,8 @@ EOF
# Handle contentdir
mkdir $RPM_BUILD_ROOT%{contentdir}/noindex \
$RPM_BUILD_ROOT%{contentdir}/server-status
-install -m 644 -p $RPM_SOURCE_DIR/index.html \
- $RPM_BUILD_ROOT%{contentdir}/noindex/index.html
+ln -s ../../fedora-testpage/index.html \
+ $RPM_BUILD_ROOT%{contentdir}/noindex/index.html
install -m 644 -p docs/server-status/* \
$RPM_BUILD_ROOT%{contentdir}/server-status
rm -rf %{contentdir}/htdocs
@@ -741,6 +740,9 @@ exit $rv
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Thu Sep 19 2019 Stephen Gallagher - 2.4.41-2
+- Use testpage from system-logos-httpd for proper branding
+
* Thu Aug 15 2019 Joe Orton - 2.4.41-1
- update to 2.4.41
diff --git a/index.html b/index.html
deleted file mode 100644
index 1b7ea03..0000000
--- a/index.html
+++ /dev/null
@@ -1,132 +0,0 @@
-
-
-
-
- Test Page for the Apache HTTP Server on Fedora
-
-
-
-
-
-
Fedora Test Page
-
-
-
-
This page is used to test the proper operation of the Apache HTTP server after it has been installed. If you can read this page, it means that the web server installed at this site is working properly, but has not yet been configured.
-
-
-
-
-
-
If you are a member of the general public:
-
-
The fact that you are seeing this page indicates that the website you just visited is either experiencing problems, or is undergoing routine maintenance.
-
-
If you would like to let the administrators of this website know that you've seen this page instead of the page you expected, you should send them e-mail. In general, mail sent to the name "webmaster" and directed to the website's domain should reach the appropriate person.
-
-
For example, if you experienced problems while visiting www.example.com, you should send e-mail to "webmaster@example.com".
-
-
Fedora is a distribution of Linux, a popular computer operating system. It is commonly used by hosting companies because it is free, and includes free web server software. Many times, they do not set up their web server correctly, and it displays this "test page" instead of the expected website.
-
-
Accordingly, please keep these facts in mind:
-
-
Neither the Fedora Project or Red Hat has any affiliation with any website or content hosted from this server (unless otherwise explicitly stated).
-
Neither the Fedora Project or Red Hat has "hacked" this webserver, this test page is an included component of Apache's httpd webserver software.
You may now add content to the directory /var/www/html/. Note that until you do so, people visiting your website will see this page, and not your content. To prevent this page from ever being used, follow the instructions in the file /etc/httpd/conf.d/welcome.conf.
-
-
-
You are free to use the images below on Apache and Fedora powered HTTP servers. Thanks for using Apache and Fedora!
-
-
-
-
-
-
-
-
diff --git a/welcome.conf b/welcome.conf
index 5d1e452..b279c2f 100644
--- a/welcome.conf
+++ b/welcome.conf
@@ -16,3 +16,4 @@
Alias /.noindex.html /usr/share/httpd/noindex/index.html
+Alias /poweredby.png /usr/share/httpd/icons/apache_pb2.png
From a4638c111cab87559dceecc46dc883164ef51375 Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Wed, 25 Sep 2019 15:23:20 +0100
Subject: [PATCH 182/359] mod_ssl: restore dependency on /usr/bin/hostname
(#1135118) Resolves: rhbz#1135118
---
httpd.spec | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/httpd.spec b/httpd.spec
index 043b593..416a207 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -13,7 +13,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.41
-Release: 2%{?dist}
+Release: 3%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source2: httpd.logrotate
@@ -157,7 +157,7 @@ Epoch: 1
BuildRequires: openssl-devel
Requires(pre): httpd-filesystem
Requires: httpd = 0:%{version}-%{release}, httpd-mmn = %{mmnisa}
-Requires: sscg >= 2.2.0
+Requires: sscg >= 2.2.0, /usr/bin/hostname
# Require an OpenSSL which supports PROFILE=SYSTEM
Conflicts: openssl-libs < 1:1.0.1h-4
@@ -740,6 +740,9 @@ exit $rv
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Wed Sep 25 2019 Joe Orton - 2.4.41-3
+- mod_ssl: restore dependency on /usr/bin/hostname (#1135118)
+
* Thu Sep 19 2019 Stephen Gallagher - 2.4.41-2
- Use testpage from system-logos-httpd for proper branding
From 5b6bedca6c8618b5f40c887c01399f5592d154e0 Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Wed, 2 Oct 2019 11:47:35 +0100
Subject: [PATCH 183/359] mod_cgid: possible stdout timeout handling fix
(#1757683) Resolves: rhbz#1757683
---
...172+.patch => httpd-2.4.41-r1828172+.patch | 115 ++++++++++--------
httpd.spec | 7 +-
pullrev.sh | 4 +-
3 files changed, 73 insertions(+), 53 deletions(-)
rename httpd-2.4.37-r1828172+.patch => httpd-2.4.41-r1828172+.patch (94%)
diff --git a/httpd-2.4.37-r1828172+.patch b/httpd-2.4.41-r1828172+.patch
similarity index 94%
rename from httpd-2.4.37-r1828172+.patch
rename to httpd-2.4.41-r1828172+.patch
index 822cccf..534acef 100644
--- a/httpd-2.4.37-r1828172+.patch
+++ b/httpd-2.4.41-r1828172+.patch
@@ -1,10 +1,12 @@
-# ./pullrev.sh 1828172 1862968 1863191
+# ./pullrev.sh 1828172 1862968 1863191 1867878 1867882
http://svn.apache.org/viewvc?view=revision&revision=1828172
http://svn.apache.org/viewvc?view=revision&revision=1862968
http://svn.apache.org/viewvc?view=revision&revision=1863191
+http://svn.apache.org/viewvc?view=revision&revision=1867878
+http://svn.apache.org/viewvc?view=revision&revision=1867882
---- httpd-2.4.37/modules/generators/mod_cgi.c
-+++ httpd-2.4.37/modules/generators/mod_cgi.c
+--- httpd-2.4.41/modules/generators/mod_cgi.c
++++ httpd-2.4.41/modules/generators/mod_cgi.c
@@ -92,6 +92,10 @@
apr_size_t bufbytes;
} cgi_server_conf;
@@ -287,16 +289,19 @@ http://svn.apache.org/viewvc?view=revision&revision=1863191
if (strcmp(r->handler, CGI_MAGIC_TYPE) && strcmp(r->handler, "cgi-script")) {
return DECLINED;
-@@ -928,7 +775,7 @@
- apr_file_pipe_timeout_set(script_in, 0);
- apr_file_pipe_timeout_set(script_err, 0);
+@@ -925,10 +772,7 @@
+ AP_DEBUG_ASSERT(script_in != NULL);
+ #if APR_FILES_AS_SOCKETS
+- apr_file_pipe_timeout_set(script_in, 0);
+- apr_file_pipe_timeout_set(script_err, 0);
+-
- b = cgi_bucket_create(r, script_in, script_err, c->bucket_alloc);
+ b = cgi_bucket_create(r, dc->timeout, script_in, script_err, c->bucket_alloc);
if (b == NULL)
return HTTP_INTERNAL_SERVER_ERROR;
#else
-@@ -985,7 +832,7 @@
+@@ -985,7 +829,7 @@
* stderr output, as normal. */
discard_script_output(bb);
apr_brigade_destroy(bb);
@@ -305,7 +310,7 @@ http://svn.apache.org/viewvc?view=revision&revision=1863191
log_script_err(r, script_err);
}
-@@ -1036,7 +883,7 @@
+@@ -1036,7 +880,7 @@
* connection drops or we stopped sending output for some other
* reason */
if (rv == APR_SUCCESS && !r->connection->aborted) {
@@ -314,7 +319,7 @@ http://svn.apache.org/viewvc?view=revision&revision=1863191
log_script_err(r, script_err);
}
-@@ -1277,7 +1124,7 @@
+@@ -1277,7 +1121,7 @@
AP_DECLARE_MODULE(cgi) =
{
STANDARD20_MODULE_STUFF,
@@ -323,8 +328,8 @@ http://svn.apache.org/viewvc?view=revision&revision=1863191
NULL, /* dir merger --- default is to override */
create_cgi_config, /* server config */
merge_cgi_config, /* merge server config */
---- httpd-2.4.37/modules/generators/mod_cgid.c
-+++ httpd-2.4.37/modules/generators/mod_cgid.c
+--- httpd-2.4.41/modules/generators/mod_cgid.c
++++ httpd-2.4.41/modules/generators/mod_cgid.c
@@ -342,15 +342,19 @@
return close(fd);
}
@@ -350,7 +355,7 @@ http://svn.apache.org/viewvc?view=revision&revision=1863191
do {
do {
rc = read(fd, buf + bytes_read, buf_size - bytes_read);
-@@ -365,9 +369,52 @@
+@@ -365,9 +369,60 @@
}
} while (bytes_read < buf_size);
@@ -366,11 +371,12 @@ http://svn.apache.org/viewvc?view=revision&revision=1863191
+
+ msg.msg_iov = &vec;
+ msg.msg_iovlen = 1;
-+
-+ msg.msg_control = u.buf;
-+ msg.msg_controllen = sizeof(u.buf);
+
-+ if (errfd) *errfd = 0;
++ if (errfd) {
++ msg.msg_control = u.buf;
++ msg.msg_controllen = sizeof(u.buf);
++ *errfd = 0;
++ }
+
+ /* use MSG_WAITALL to skip loop on truncated reads */
+ do {
@@ -380,10 +386,17 @@ http://svn.apache.org/viewvc?view=revision&revision=1863191
+ if (rc == 0) {
+ return ECONNRESET;
+ }
-+
-+ cmsg = CMSG_FIRSTHDR(&msg);
++ else if (rc < 0) {
++ return errno;
++ }
++ else if (rc != buf_size) {
++ /* MSG_WAITALL should ensure the recvmsg blocks until the
++ * entire length is read, but let's be paranoid. */
++ return APR_INCOMPLETE;
++ }
++
+ if (errfd
-+ && cmsg
++ && (cmsg = CMSG_FIRSTHDR(&msg)) != NULL
+ && cmsg->cmsg_len == CMSG_LEN(sizeof(*errfd))
+ && cmsg->cmsg_level == SOL_SOCKET
+ && cmsg->cmsg_type == SCM_RIGHTS) {
@@ -403,7 +416,7 @@ http://svn.apache.org/viewvc?view=revision&revision=1863191
/* deal with signals
*/
static apr_status_t sock_write(int fd, const void *buf, size_t buf_size)
-@@ -384,7 +431,7 @@
+@@ -384,7 +439,7 @@
return APR_SUCCESS;
}
@@ -412,7 +425,7 @@ http://svn.apache.org/viewvc?view=revision&revision=1863191
{
va_list ap;
int rc;
-@@ -399,9 +446,39 @@
+@@ -399,9 +454,39 @@
}
va_end(ap);
@@ -452,7 +465,7 @@ http://svn.apache.org/viewvc?view=revision&revision=1863191
if (rc < 0) {
return errno;
}
-@@ -410,7 +487,7 @@
+@@ -410,7 +495,7 @@
}
static apr_status_t get_req(int fd, request_rec *r, char **argv0, char ***env,
@@ -461,7 +474,7 @@ http://svn.apache.org/viewvc?view=revision&revision=1863191
{
int i;
char **environ;
-@@ -421,7 +498,7 @@
+@@ -421,7 +506,7 @@
r->server = apr_pcalloc(r->pool, sizeof(server_rec));
/* read the request header */
@@ -470,7 +483,7 @@ http://svn.apache.org/viewvc?view=revision&revision=1863191
if (stat != APR_SUCCESS) {
return stat;
}
-@@ -479,14 +556,15 @@
+@@ -479,14 +564,15 @@
return APR_SUCCESS;
}
@@ -488,7 +501,7 @@ http://svn.apache.org/viewvc?view=revision&revision=1863191
if (ugid == NULL) {
-@@ -507,16 +585,21 @@
+@@ -507,16 +593,21 @@
req.args_len = r->args ? strlen(r->args) : 0;
req.loglevel = r->server->log.level;
@@ -512,7 +525,7 @@ http://svn.apache.org/viewvc?view=revision&revision=1863191
&req, sizeof(req),
r->filename, req.filename_len,
argv0, req.argv0_len,
-@@ -531,7 +614,7 @@
+@@ -531,7 +622,7 @@
for (i = 0; i < req.env_count; i++) {
apr_size_t curlen = strlen(env[i]);
@@ -521,7 +534,7 @@ http://svn.apache.org/viewvc?view=revision&revision=1863191
env[i], curlen)) != APR_SUCCESS) {
return stat;
}
-@@ -582,20 +665,34 @@
+@@ -582,20 +673,34 @@
}
}
@@ -564,7 +577,7 @@ http://svn.apache.org/viewvc?view=revision&revision=1863191
}
static int cgid_server(void *data)
-@@ -669,7 +766,7 @@
+@@ -669,7 +774,7 @@
}
while (!daemon_should_exit) {
@@ -573,7 +586,7 @@ http://svn.apache.org/viewvc?view=revision&revision=1863191
char *argv0 = NULL;
char **env = NULL;
const char * const *argv;
-@@ -709,7 +806,7 @@
+@@ -709,7 +814,7 @@
r = apr_pcalloc(ptrans, sizeof(request_rec));
procnew = apr_pcalloc(ptrans, sizeof(*procnew));
r->pool = ptrans;
@@ -582,7 +595,7 @@ http://svn.apache.org/viewvc?view=revision&revision=1863191
if (stat != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_ERR, stat,
main_server, APLOGNO(01248)
-@@ -741,6 +838,16 @@
+@@ -741,6 +846,16 @@
continue;
}
@@ -599,7 +612,7 @@ http://svn.apache.org/viewvc?view=revision&revision=1863191
apr_os_file_put(&r->server->error_log, &errfileno, 0, r->pool);
apr_os_file_put(&inout, &sd2, 0, r->pool);
-@@ -800,7 +907,10 @@
+@@ -800,7 +915,10 @@
close(sd2);
}
else {
@@ -611,7 +624,7 @@ http://svn.apache.org/viewvc?view=revision&revision=1863191
argv = (const char * const *)create_argv(r->pool, NULL, NULL, NULL, argv0, r->args);
-@@ -1099,6 +1209,33 @@
+@@ -1099,6 +1217,33 @@
return ret;
}
@@ -645,7 +658,7 @@ http://svn.apache.org/viewvc?view=revision&revision=1863191
static int log_script(request_rec *r, cgid_server_conf * conf, int ret,
char *dbuf, const char *sbuf, apr_bucket_brigade *bb,
apr_file_t *script_err)
-@@ -1204,6 +1341,11 @@
+@@ -1204,6 +1349,11 @@
return ret;
}
@@ -657,7 +670,7 @@ http://svn.apache.org/viewvc?view=revision&revision=1863191
static int connect_to_daemon(int *sdptr, request_rec *r,
cgid_server_conf *conf)
{
-@@ -1395,6 +1537,7 @@
+@@ -1395,6 +1545,7 @@
static int cgid_handler(request_rec *r)
{
@@ -665,7 +678,7 @@ http://svn.apache.org/viewvc?view=revision&revision=1863191
int retval, nph, dbpos;
char *argv0, *dbuf;
apr_bucket_brigade *bb;
-@@ -1404,10 +1547,11 @@
+@@ -1404,10 +1555,11 @@
int seen_eos, child_stopped_reading;
int sd;
char **env;
@@ -678,7 +691,7 @@ http://svn.apache.org/viewvc?view=revision&revision=1863191
if (strcmp(r->handler, CGI_MAGIC_TYPE) && strcmp(r->handler, "cgi-script")) {
return DECLINED;
-@@ -1416,7 +1560,7 @@
+@@ -1416,7 +1568,7 @@
conf = ap_get_module_config(r->server->module_config, &cgid_module);
dc = ap_get_module_config(r->per_dir_config, &cgid_module);
@@ -687,7 +700,7 @@ http://svn.apache.org/viewvc?view=revision&revision=1863191
is_included = !strcmp(r->protocol, "INCLUDED");
if ((argv0 = strrchr(r->filename, '/')) != NULL) {
-@@ -1469,6 +1613,17 @@
+@@ -1469,6 +1621,17 @@
}
*/
@@ -705,7 +718,7 @@ http://svn.apache.org/viewvc?view=revision&revision=1863191
/*
* httpd core function used to add common environment variables like
* DOCUMENT_ROOT.
-@@ -1481,12 +1636,16 @@
+@@ -1481,12 +1644,16 @@
return retval;
}
@@ -723,7 +736,7 @@ http://svn.apache.org/viewvc?view=revision&revision=1863191
info = apr_palloc(r->pool, sizeof(struct cleanup_script_info));
info->conf = conf;
info->r = r;
-@@ -1508,12 +1667,7 @@
+@@ -1508,12 +1675,7 @@
*/
apr_os_pipe_put_ex(&tempsock, &sd, 1, r->pool);
@@ -737,7 +750,7 @@ http://svn.apache.org/viewvc?view=revision&revision=1863191
apr_pool_cleanup_kill(r->pool, (void *)((long)sd), close_unix_socket);
/* Transfer any put/post args, CERN style...
-@@ -1605,23 +1759,28 @@
+@@ -1605,23 +1767,28 @@
*/
shutdown(sd, 1);
@@ -774,7 +787,7 @@ http://svn.apache.org/viewvc?view=revision&revision=1863191
/*
* ret could be HTTP_NOT_MODIFIED in the case that the CGI script
-@@ -1658,6 +1817,11 @@
+@@ -1658,6 +1825,11 @@
/* Soak up all the script output */
discard_script_output(bb);
apr_brigade_destroy(bb);
@@ -786,7 +799,7 @@ http://svn.apache.org/viewvc?view=revision&revision=1863191
/* This redirect needs to be a GET no matter what the original
* method was.
*/
-@@ -1690,7 +1854,6 @@
+@@ -1690,7 +1862,6 @@
}
if (nph) {
@@ -794,7 +807,7 @@ http://svn.apache.org/viewvc?view=revision&revision=1863191
struct ap_filter_t *cur;
/* get rid of all filters up through protocol... since we
-@@ -1704,14 +1867,20 @@
+@@ -1704,14 +1875,20 @@
}
r->output_filters = r->proto_output_filters = cur;
@@ -821,7 +834,7 @@ http://svn.apache.org/viewvc?view=revision&revision=1863191
return OK; /* NOT r->status, even if it has changed. */
}
-@@ -1829,7 +1998,7 @@
+@@ -1829,7 +2006,7 @@
return retval;
}
@@ -830,8 +843,8 @@ http://svn.apache.org/viewvc?view=revision&revision=1863191
info = apr_palloc(r->pool, sizeof(struct cleanup_script_info));
info->conf = conf;
---- httpd-2.4.37/modules/generators/config5.m4
-+++ httpd-2.4.37/modules/generators/config5.m4
+--- httpd-2.4.41/modules/generators/config5.m4
++++ httpd-2.4.41/modules/generators/config5.m4
@@ -78,4 +78,15 @@
APR_ADDTO(INCLUDES, [-I\$(top_srcdir)/$modpath_current])
@@ -848,9 +861,9 @@ http://svn.apache.org/viewvc?view=revision&revision=1863191
+])
+
APACHE_MODPATH_FINISH
---- httpd-2.4.37/modules/generators/cgi_common.h
-+++ httpd-2.4.37/modules/generators/cgi_common.h
-@@ -0,0 +1,216 @@
+--- httpd-2.4.41/modules/generators/cgi_common.h
++++ httpd-2.4.41/modules/generators/cgi_common.h
+@@ -0,0 +1,220 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
@@ -902,6 +915,10 @@ http://svn.apache.org/viewvc?view=revision&revision=1863191
+ apr_pollfd_t fd;
+ struct cgi_bucket_data *data = apr_palloc(r->pool, sizeof *data);
+
++ /* Disable APR timeout handling since we'll use poll() entirely. */
++ apr_file_pipe_timeout_set(out, 0);
++ apr_file_pipe_timeout_set(err, 0);
++
+ APR_BUCKET_INIT(b);
+ b->free = apr_bucket_free;
+ b->list = list;
diff --git a/httpd.spec b/httpd.spec
index 416a207..06fe8c5 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -13,7 +13,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.41
-Release: 3%{?dist}
+Release: 4%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source2: httpd.logrotate
@@ -76,7 +76,7 @@ Patch38: httpd-2.4.34-sslciphdefault.patch
Patch39: httpd-2.4.37-sslprotdefault.patch
Patch40: httpd-2.4.39-r1861269.patch
Patch41: httpd-2.4.37-r1861793+.patch
-Patch42: httpd-2.4.37-r1828172+.patch
+Patch42: httpd-2.4.41-r1828172+.patch
# Bug fixes
# https://bugzilla.redhat.com/show_bug.cgi?id=1397243
@@ -740,6 +740,9 @@ exit $rv
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Wed Oct 2 2019 Joe Orton - 2.4.41-4
+- mod_cgid: possible stdout timeout handling fix (#1757683)
+
* Wed Sep 25 2019 Joe Orton - 2.4.41-3
- mod_ssl: restore dependency on /usr/bin/hostname (#1135118)
diff --git a/pullrev.sh b/pullrev.sh
index 5494c7e..efe221f 100755
--- a/pullrev.sh
+++ b/pullrev.sh
@@ -7,7 +7,7 @@ fi
repo="https://svn.apache.org/repos/asf/httpd/httpd/trunk"
#repo="https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x"
-ver=2.4.37
+ver=2.4.41
prefix="httpd-${ver}"
suffix="r$1${2:++}"
fn="${prefix}-${suffix}.patch"
@@ -36,7 +36,7 @@ for r in $*; do
echo "+ fetching ${r}"
this=`mktemp /tmp/pullrevXXXXXX`
svn diff -c ${r} ${repo} | filterdiff --remove-timestamps --clean -x 'CHANGES' -x '*/next-number' -x 'STATUS' \
- --addprefix="${prefix}/" > ${this}
+ -x '*.xml' --addprefix="${prefix}/" > ${this}
next=`mktemp /tmp/pullrevXXXXXX`
combinediff --quiet ${prev} ${this} > ${next}
rm -f "${this}"
From f1280d5f56f726ae20ad766d80dc62fffe5a606c Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Thu, 3 Oct 2019 09:06:46 +0100
Subject: [PATCH 184/359] mod_proxy_balancer: fix balancer-manager XSRF check
(PR 63688)
---
httpd-2.4.41-r1865749.patch | 14 ++++++++++++++
httpd.spec | 7 ++++++-
2 files changed, 20 insertions(+), 1 deletion(-)
create mode 100644 httpd-2.4.41-r1865749.patch
diff --git a/httpd-2.4.41-r1865749.patch b/httpd-2.4.41-r1865749.patch
new file mode 100644
index 0000000..d79a559
--- /dev/null
+++ b/httpd-2.4.41-r1865749.patch
@@ -0,0 +1,14 @@
+# ./pullrev.sh 1865749
+http://svn.apache.org/viewvc?view=revision&revision=1865749
+
+--- httpd-2.4.41/modules/proxy/mod_proxy_balancer.c.r1865749
++++ httpd-2.4.41/modules/proxy/mod_proxy_balancer.c
+@@ -1104,7 +1104,7 @@
+ if (apr_uri_parse(r->pool, ref, &uri) || !uri.hostname)
+ return 0;
+
+- return strcmp(uri.hostname, ap_get_server_name(r)) == 0;
++ return strcasecmp(uri.hostname, ap_get_server_name(r)) == 0;
+ }
+
+ /* Manages the loadfactors and member status
diff --git a/httpd.spec b/httpd.spec
index 06fe8c5..55a783d 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -13,7 +13,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.41
-Release: 4%{?dist}
+Release: 5%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source2: httpd.logrotate
@@ -82,6 +82,7 @@ Patch42: httpd-2.4.41-r1828172+.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1397243
Patch58: httpd-2.4.34-r1738878.patch
Patch60: httpd-2.4.34-enable-sslv3.patch
+Patch61: httpd-2.4.41-r1865749.patch
# Security fixes
@@ -220,6 +221,7 @@ interface for storing and accessing per-user session data.
%patch58 -p1 -b .r1738878
%patch60 -p1 -b .enable-sslv3
+%patch61 -p1 -b .r1865749
# Patch in the vendor string
sed -i '/^#define PLATFORM/s/Unix/%{vstring}/' os/unix/os.h
@@ -740,6 +742,9 @@ exit $rv
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
+* Thu Oct 3 2019 Joe Orton - 2.4.41-5
+- mod_proxy_balancer: fix balancer-manager XSRF check (PR 63688)
+
* Wed Oct 2 2019 Joe Orton - 2.4.41-4
- mod_cgid: possible stdout timeout handling fix (#1757683)
From 5f6c5adf6f8ba549061650f73ec554c9e6d23d53 Mon Sep 17 00:00:00 2001
From: Joe Orton
Date: Thu, 3 Oct 2019 09:10:23 +0100
Subject: [PATCH 185/359] Remove suexec patch already merged upstream.
---
httpd-2.4.4-r1337344+.patch | 250 ------------------------------------
httpd.spec | 2 -
2 files changed, 252 deletions(-)
delete mode 100644 httpd-2.4.4-r1337344+.patch
diff --git a/httpd-2.4.4-r1337344+.patch b/httpd-2.4.4-r1337344+.patch
deleted file mode 100644
index 6e5c3e7..0000000
--- a/httpd-2.4.4-r1337344+.patch
+++ /dev/null
@@ -1,250 +0,0 @@
-# ./pullrev.sh 1337344 1341905 1342065 1341930
-
-suexec enhancements:
-
-1) use syslog for logging
-2) use capabilities not setuid/setgid root binary
-
-http://svn.apache.org/viewvc?view=revision&revision=1337344
-http://svn.apache.org/viewvc?view=revision&revision=1341905
-http://svn.apache.org/viewvc?view=revision&revision=1342065
-http://svn.apache.org/viewvc?view=revision&revision=1341930
-
---- httpd-2.4.4/configure.in.r1337344+
-+++ httpd-2.4.4/configure.in
-@@ -734,7 +734,24 @@ APACHE_HELP_STRING(--with-suexec-gidmin,
-
- AC_ARG_WITH(suexec-logfile,
- APACHE_HELP_STRING(--with-suexec-logfile,Set the logfile),[
-- AC_DEFINE_UNQUOTED(AP_LOG_EXEC, "$withval", [SuExec log file] ) ] )
-+ if test "x$withval" = "xyes"; then
-+ AC_DEFINE_UNQUOTED(AP_LOG_EXEC, "$withval", [SuExec log file])
-+ fi
-+])
-+
-+AC_ARG_WITH(suexec-syslog,
-+APACHE_HELP_STRING(--with-suexec-syslog,Set the logfile),[
-+ if test $withval = "yes"; then
-+ if test "x${with_suexec_logfile}" != "xno"; then
-+ AC_MSG_NOTICE([hint: use "--without-suexec-logfile --with-suexec-syslog"])
-+ AC_MSG_ERROR([suexec does not support both logging to file and syslog])
-+ fi
-+ AC_CHECK_FUNCS([vsyslog], [], [
-+ AC_MSG_ERROR([cannot support syslog from suexec without vsyslog()])])
-+ AC_DEFINE(AP_LOG_SYSLOG, 1, [SuExec log to syslog])
-+ fi
-+])
-+
-
- AC_ARG_WITH(suexec-safepath,
- APACHE_HELP_STRING(--with-suexec-safepath,Set the safepath),[
-@@ -744,6 +761,15 @@ AC_ARG_WITH(suexec-umask,
- APACHE_HELP_STRING(--with-suexec-umask,umask for suexec'd process),[
- AC_DEFINE_UNQUOTED(AP_SUEXEC_UMASK, 0$withval, [umask for suexec'd process] ) ] )
-
-+INSTALL_SUEXEC=setuid
-+AC_ARG_ENABLE([suexec-capabilities],
-+APACHE_HELP_STRING(--enable-suexec-capabilities,Use Linux capability bits not setuid root suexec), [
-+INSTALL_SUEXEC=caps
-+AC_DEFINE(AP_SUEXEC_CAPABILITIES, 1,
-+ [Enable if suexec is installed with Linux capabilities, not setuid])
-+])
-+APACHE_SUBST(INSTALL_SUEXEC)
-+
- dnl APR should go after the other libs, so the right symbols can be picked up
- if test x${apu_found} != xobsolete; then
- AP_LIBS="$AP_LIBS `$apu_config --avoid-ldap --link-libtool`"
---- httpd-2.4.4/docs/manual/suexec.html.en.r1337344+
-+++ httpd-2.4.4/docs/manual/suexec.html.en
-@@ -372,6 +372,21 @@
- together with the --enable-suexec option to let
- APACI accept your request for using the suEXEC feature.
-
-+
--enable-suexec-capabilities
-+
-+
Linux specific: Normally,
-+ the suexec binary is installed "setuid/setgid
-+ root", which allows it to run with the full privileges of the
-+ root user. If this option is used, the suexec
-+ binary will instead be installed with only the setuid/setgid
-+ "capability" bits set, which is the subset of full root
-+ priviliges required for suexec operation. Note that
-+ the suexec binary may not be able to write to a log
-+ file in this mode; it is recommended that the
-+ --with-suexec-syslog --without-suexec-logfile
-+ options are used in conjunction with this mode, so that syslog
-+ logging is used instead.
-+
-
--with-suexec-bin=PATH
-
-
The path to the suexec binary must be hard-coded
-@@ -433,6 +448,12 @@
- "suexec_log" and located in your standard logfile
- directory (--logfiledir).
-
-+
--with-suexec-syslog
-+
-+
If defined, suexec will log notices and errors to syslog
-+ instead of a logfile. This option must be combined
-+ with --without-suexec-logfile.
-+
-
--with-suexec-safepath=PATH
-
-
Define a safe PATH environment to pass to CGI
-@@ -550,9 +571,12 @@ Group webgroup
-
-
The suEXEC wrapper will write log information
- to the file defined with the --with-suexec-logfile
-- option as indicated above. If you feel you have configured and
-- installed the wrapper properly, have a look at this log and the
-- error_log for the server to see where you may have gone astray.
-+ option as indicated above, or to syslog if --with-suexec-syslog
-+ is used. If you feel you have configured and
-+ installed the wrapper properly, have a look at the log and the
-+ error_log for the server to see where you may have gone astray.
-+ The output of "suexec -V" will show the options
-+ used to compile suexec, if using a binary distribution.