Import of pkgsrc-2016Q3

This commit is contained in:
2016-11-18 22:39:22 +01:00
committed by sambuc
parent 9d819b6d54
commit 1242aa1e36
35952 changed files with 949747 additions and 377081 deletions
@@ -0,0 +1,27 @@
$NetBSD: patch-include_ap_mmn.h,v 1.1 2015/11/12 15:21:51 prlw1 Exp $
Fix a regression with 2.2.31 that caused inherited workers to
use a different scoreboard slot then the original one.
https://svn.apache.org/viewvc?view=revision&revision=1700408
--- include/ap_mmn.h.orig 2015-06-05 16:50:47.000000000 +0000
+++ include/ap_mmn.h
@@ -158,6 +158,8 @@
* 20051115.38 (2.2.30) Add ap_proxy_set_scoreboard_lb() in mod_proxy.h
* 20051115.39 (2.2.30) Add ap_proxy_connection_reusable()
* 20051115.40 (2.2.30) Add ap_map_http_request_error()
+ * 20051115.41 (2.2.32) Add s member to proxy_server_conf struct and server
+ * member to proxy_worker struct.
*/
#define MODULE_MAGIC_COOKIE 0x41503232UL /* "AP22" */
@@ -165,7 +167,7 @@
#ifndef MODULE_MAGIC_NUMBER_MAJOR
#define MODULE_MAGIC_NUMBER_MAJOR 20051115
#endif
-#define MODULE_MAGIC_NUMBER_MINOR 40 /* 0...n */
+#define MODULE_MAGIC_NUMBER_MINOR 41 /* 0...n */
/**
* Determine if the server's current MODULE_MAGIC_NUMBER is at least a
@@ -0,0 +1,25 @@
$NetBSD: patch-modules_proxy_mod_proxy.c,v 1.3 2015/11/12 15:21:51 prlw1 Exp $
Fix a regression with 2.2.31 that caused inherited workers to
use a different scoreboard slot then the original one.
https://svn.apache.org/viewvc?view=revision&revision=1700408
--- modules/proxy/mod_proxy.c.orig 2015-06-05 16:50:47.000000000 +0000
+++ modules/proxy/mod_proxy.c
@@ -1129,6 +1129,7 @@ static void * create_proxy_config(apr_po
ps->badopt = bad_error;
ps->badopt_set = 0;
ps->pool = p;
+ ps->s = s;
return ps;
}
@@ -1172,6 +1173,7 @@ static void * merge_proxy_config(apr_poo
ps->proxy_status = (overrides->proxy_status_set == 0) ? base->proxy_status : overrides->proxy_status;
ps->proxy_status_set = overrides->proxy_status_set || base->proxy_status_set;
ps->pool = p;
+ ps->s = overrides->s;
return ps;
}
@@ -0,0 +1,25 @@
$NetBSD: patch-modules_proxy_mod_proxy.h,v 1.1 2015/11/12 15:21:51 prlw1 Exp $
Fix a regression with 2.2.31 that caused inherited workers to
use a different scoreboard slot then the original one.
https://svn.apache.org/viewvc?view=revision&revision=1700408
--- modules/proxy/mod_proxy.h.orig 2015-07-15 16:10:27.000000000 +0000
+++ modules/proxy/mod_proxy.h
@@ -193,6 +193,7 @@ typedef struct {
} proxy_status; /* Status display options */
char proxy_status_set;
apr_pool_t *pool; /* Pool used for allocating this struct */
+ server_rec *s; /* The server_rec where this configuration was created in */
} proxy_server_conf;
@@ -369,6 +370,7 @@ struct proxy_worker {
char disablereuse_set;
apr_interval_time_t conn_timeout;
char conn_timeout_set;
+ server_rec *server; /* The server_rec where this configuration was created in */
};
/*
@@ -0,0 +1,63 @@
$NetBSD: patch-modules_proxy_proxy_util.c,v 1.1 2015/11/12 15:21:51 prlw1 Exp $
Fix a regression with 2.2.31 that caused inherited workers to
use a different scoreboard slot then the original one.
https://svn.apache.org/viewvc?view=revision&revision=1700408
--- modules/proxy/proxy_util.c.orig 2015-07-15 16:10:27.000000000 +0000
+++ modules/proxy/proxy_util.c
@@ -1460,6 +1460,7 @@ PROXY_DECLARE(const char *) ap_proxy_add
(*worker)->flush_packets = flush_off;
(*worker)->flush_wait = PROXY_FLUSH_WAIT;
(*worker)->smax = -1;
+ (*worker)->server = conf->s;
/* Increase the total worker count */
proxy_lb_workers++;
init_conn_pool(p, *worker);
@@ -1807,6 +1808,7 @@ PROXY_DECLARE(void*) ap_proxy_set_scoreb
server_rec *server)
{
if (ap_scoreboard_image && !worker->s) {
+ server_rec *id_server;
int i = 0;
proxy_worker_stat *free_slot = NULL;
proxy_worker_stat *s;
@@ -1824,14 +1826,20 @@ PROXY_DECLARE(void*) ap_proxy_set_scoreb
apr_md5_update(&ctx, (unsigned char *)balancer->name,
strlen(balancer->name));
}
- if (server) {
+ if (worker->server) {
+ id_server = worker->server;
+ }
+ else {
+ id_server = server;
+ }
+ if (id_server) {
server_addr_rec *addr;
/* Assumes the unique identifier of a vhost is its address(es)
* plus the ServerName:Port. Should two or more vhosts have this
* same identifier, the first one would always be elected to
* handle the requests, so this shouldn't be an issue...
*/
- for (addr = server->addrs; addr; addr = addr->next) {
+ for (addr = id_server->addrs; addr; addr = addr->next) {
char host_ip[64]; /* for any IPv[46] string */
apr_sockaddr_ip_getbuf(host_ip, sizeof host_ip,
addr->host_addr);
@@ -1840,10 +1848,10 @@ PROXY_DECLARE(void*) ap_proxy_set_scoreb
apr_md5_update(&ctx, (unsigned char *)&addr->host_port,
sizeof(addr->host_port));
}
- apr_md5_update(&ctx, (unsigned char *)server->server_hostname,
- strlen(server->server_hostname));
- apr_md5_update(&ctx, (unsigned char *)&server->port,
- sizeof(server->port));
+ apr_md5_update(&ctx, (unsigned char *)id_server->server_hostname,
+ strlen(id_server->server_hostname));
+ apr_md5_update(&ctx, (unsigned char *)&id_server->port,
+ sizeof(id_server->port));
}
apr_md5_final(digest, &ctx);
@@ -0,0 +1,22 @@
$NetBSD: patch-server_util__script.c,v 1.1 2016/07/29 11:10:24 wiz Exp $
Fix httpoxy vulnerability.
https://www.apache.org/security/asf-httpoxy-response.txt
--- server/util_script.c.orig 2012-08-21 17:42:49.000000000 +0000
+++ server/util_script.c
@@ -165,6 +165,14 @@ AP_DECLARE(void) ap_add_common_vars(requ
else if (!strcasecmp(hdrs[i].key, "Content-length")) {
apr_table_addn(e, "CONTENT_LENGTH", hdrs[i].val);
}
+ /* HTTP_PROXY collides with a popular envvar used to configure
+ * proxies, don't let clients set/override it. But, if you must...
+ */
+#ifndef SECURITY_HOLE_PASS_PROXY
+ else if (!strcasecmp(hdrs[i].key, "Proxy")) {
+ ;
+ }
+#endif
/*
* You really don't want to disable this check, since it leaves you
* wide open to CGIs stealing passwords and people viewing them