diff options
author | Reyk Floeter <reyk@esdenera.com> | 2015-01-18 15:08:29 +0100 |
---|---|---|
committer | Reyk Floeter <reyk@esdenera.com> | 2015-01-18 15:08:29 +0100 |
commit | 033827073d80d99b44522279612d84a25b42645d (patch) | |
tree | 4d9767dcd63c6037420879c8f664b279a85eb6a6 /httpd.h | |
parent | 56cddace6a66b505f8e47b7117290ab1214aa84a (diff) | |
download | httpd-033827073d80d99b44522279612d84a25b42645d.tar.gz httpd-033827073d80d99b44522279612d84a25b42645d.zip |
sync with -current:
First stab at implementing basic auth.
Currently the htpasswd file needs to be in the chroot; will hopefully
improved soonish.
Based on a diff from Oscar Linderholm many months ago but turned into
a complete rewrite.
input/OK reyk@
Diffstat (limited to 'httpd.h')
-rw-r--r-- | httpd.h | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -1,4 +1,4 @@ -/* $OpenBSD: httpd.h,v 1.68 2015/01/16 06:40:17 deraadt Exp $ */ +/* $OpenBSD: httpd.h,v 1.69 2015/01/18 14:01:17 florian Exp $ */ /* * Copyright (c) 2006 - 2015 Reyk Floeter <reyk@openbsd.org> @@ -296,6 +296,7 @@ struct client { int clt_fcgi_type; int clt_fcgi_chunked; int clt_fcgi_end; + char *clt_fcgi_remote_user; struct evbuffer *clt_srvevb; struct evbuffer *clt_log; @@ -324,11 +325,13 @@ SPLAY_HEAD(client_tree, client); #define SRVFLAG_TLS 0x00002000 #define SRVFLAG_ACCESS_LOG 0x00004000 #define SRVFLAG_ERROR_LOG 0x00008000 +#define SRVFLAG_AUTH_BASIC 0x00010000 #define SRVFLAG_BITS \ "\10\01INDEX\02NO_INDEX\03AUTO_INDEX\04NO_AUTO_INDEX" \ "\05ROOT\06LOCATION\07FCGI\10NO_FCGI\11LOG\12NO_LOG\13SOCKET" \ - "\14SYSLOG\15NO_SYSLOG\16TLS\17ACCESS_LOG\20ERROR_LOG" + "\14SYSLOG\15NO_SYSLOG\16TLS\17ACCESS_LOG\20ERROR_LOG" \ + "\21AUTH_BASIC" #define TCPFLAG_NODELAY 0x01 #define TCPFLAG_NNODELAY 0x02 @@ -367,6 +370,8 @@ struct server_config { char socket[PATH_MAX]; char accesslog[NAME_MAX]; char errorlog[NAME_MAX]; + char auth_realm[NAME_MAX]; + char auth_htpasswd[PATH_MAX]; in_port_t port; struct sockaddr_storage ss; |