sync code with last improvements from OpenBSD
This commit is contained in:
parent
5903cbe575
commit
62d64fa864
841 changed files with 83929 additions and 40755 deletions
|
@ -1,4 +1,4 @@
|
|||
.\" $OpenBSD: httpd.conf.5,v 1.123 2023/08/17 07:25:57 op Exp $
|
||||
.\" $OpenBSD: httpd.conf.5,v 1.125 2023/11/03 13:03:02 espie Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 2014, 2015 Reyk Floeter <reyk@openbsd.org>
|
||||
.\"
|
||||
|
@ -14,7 +14,7 @@
|
|||
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
.\"
|
||||
.Dd $Mdocdate: August 17 2023 $
|
||||
.Dd $Mdocdate: November 3 2023 $
|
||||
.Dt HTTPD.CONF 5
|
||||
.Os
|
||||
.Sh NAME
|
||||
|
@ -186,7 +186,9 @@ first defined
|
|||
section that matches the listening port.
|
||||
.Bl -tag -width Ds
|
||||
.It Ic server Ar name Brq ...
|
||||
Match the server name using shell globbing rules.
|
||||
Match the server name using shell globbing rules,
|
||||
see
|
||||
.Xr glob 7 .
|
||||
This can be an explicit name,
|
||||
.Ar www.example.com ,
|
||||
or a name including wildcards,
|
||||
|
@ -649,7 +651,7 @@ If not specified, the default value
|
|||
will be used (strong crypto cipher suites without anonymous DH).
|
||||
See the CIPHERS section of
|
||||
.Xr openssl 1
|
||||
for information about SSL/TLS cipher suites and preference lists.
|
||||
for information about TLS cipher suites and preference lists.
|
||||
.It Ic client ca Ar cafile Oo Ic crl Ar crlfile Oc Op Ic optional
|
||||
Require
|
||||
.Po
|
||||
|
@ -867,6 +869,7 @@ server "example.com" {
|
|||
.Ed
|
||||
.Sh SEE ALSO
|
||||
.Xr htpasswd 1 ,
|
||||
.Xr glob 7 ,
|
||||
.Xr patterns 7 ,
|
||||
.Xr httpd 8 ,
|
||||
.Xr ocspcheck 8 ,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: httpd.h,v 1.163 2023/07/12 12:37:27 tb Exp $ */
|
||||
/* $OpenBSD: httpd.h,v 1.164 2023/11/08 19:19:10 millert Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2006 - 2015 Reyk Floeter <reyk@openbsd.org>
|
||||
|
@ -45,7 +45,7 @@
|
|||
|
||||
#define CONF_FILE "/etc/httpd.conf"
|
||||
#define HTTPD_USER "www"
|
||||
#define HTTPD_SERVERNAME "Tezcatlipoca"
|
||||
#define HTTPD_SERVERNAME "Mictlantecuhtli"
|
||||
#define HTTPD_DOCROOT "/htdocs"
|
||||
#define HTTPD_ERRDOCTEMPLATE "err" /* 3-char name */
|
||||
#define HTTPD_ERRDOCROOT_MAX (PATH_MAX - sizeof("000.html"))
|
||||
|
@ -350,6 +350,7 @@ struct client {
|
|||
int clt_done;
|
||||
int clt_chunk;
|
||||
int clt_inflight;
|
||||
int clt_fcgi_count;
|
||||
struct range_data clt_ranges;
|
||||
struct fcgi_data clt_fcgi;
|
||||
const char *clt_fcgi_error;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.\" $OpenBSD: patterns.7,v 1.7 2022/02/18 10:24:33 jsg Exp $
|
||||
.\" $OpenBSD: patterns.7,v 1.8 2023/11/08 11:17:20 deraadt Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 2015 Reyk Floeter <reyk@openbsd.org>
|
||||
.\" Copyright (C) 1994-2015 Lua.org, PUC-Rio.
|
||||
|
@ -23,9 +23,9 @@
|
|||
.\" SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
.\"
|
||||
.\" Derived from section 6.4.1 in manual.html of Lua 5.3.1:
|
||||
.\" $Id: patterns.7,v 1.7 2022/02/18 10:24:33 jsg Exp $
|
||||
.\" $Id: patterns.7,v 1.8 2023/11/08 11:17:20 deraadt Exp $
|
||||
.\"
|
||||
.Dd $Mdocdate: February 18 2022 $
|
||||
.Dd $Mdocdate: November 8 2023 $
|
||||
.Dt PATTERNS 7
|
||||
.Os
|
||||
.Sh NAME
|
||||
|
@ -148,7 +148,7 @@ In particular, the class
|
|||
may not be equivalent to
|
||||
.Sq %l .
|
||||
.Sh PATTERN ITEM
|
||||
A pattern item can be
|
||||
A pattern item can be
|
||||
.Bl -bullet
|
||||
.It
|
||||
a single character class, which matches any single character in the class;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: server.c,v 1.128 2023/09/03 10:18:18 nicm Exp $ */
|
||||
/* $OpenBSD: server.c,v 1.129 2023/11/08 19:19:10 millert Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2006 - 2015 Reyk Floeter <reyk@openbsd.org>
|
||||
|
@ -1300,7 +1300,7 @@ server_close(struct client *clt, const char *msg)
|
|||
{
|
||||
struct server *srv = clt->clt_srv;
|
||||
|
||||
if (clt->clt_fcgi_error != NULL) {
|
||||
if (clt->clt_fcgi_count-- > 0) {
|
||||
clt->clt_fcgi_error = msg;
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: server_fcgi.c,v 1.96 2023/07/12 12:37:28 tb Exp $ */
|
||||
/* $OpenBSD: server_fcgi.c,v 1.97 2023/11/08 19:19:10 millert Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2014 Florian Obser <florian@openbsd.org>
|
||||
|
@ -374,16 +374,15 @@ server_fcgi(struct httpd *env, struct client *clt)
|
|||
if (clt->clt_toread != 0) {
|
||||
/*
|
||||
* XXX - Work around UAF: server_read_httpcontent() can call
|
||||
* server_close(), normally freeing clt. If clt->clt_fcgi_error
|
||||
* changed, call server_close() via server_abort_http().
|
||||
* server_close(), normally freeing clt. If clt->clt_fcgi_count
|
||||
* reaches 0, call server_close() via server_abort_http().
|
||||
*/
|
||||
clt->clt_fcgi_error = "";
|
||||
clt->clt_fcgi_count++;
|
||||
server_read_httpcontent(clt->clt_bev, clt);
|
||||
errstr = clt->clt_fcgi_error;
|
||||
clt->clt_fcgi_error = NULL;
|
||||
if (errstr[0] != '\0')
|
||||
if (clt->clt_fcgi_count-- <= 0) {
|
||||
errstr = clt->clt_fcgi_error;
|
||||
goto fail;
|
||||
errstr = NULL;
|
||||
}
|
||||
bufferevent_enable(clt->clt_bev, EV_READ);
|
||||
} else {
|
||||
bufferevent_disable(clt->clt_bev, EV_READ);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue