summaryrefslogtreecommitdiff
path: root/usr.sbin/httpd/httpd.h
diff options
context:
space:
mode:
authorFlorian Obser <florian@cvs.openbsd.org>2015-01-18 14:01:18 +0000
committerFlorian Obser <florian@cvs.openbsd.org>2015-01-18 14:01:18 +0000
commitf55c920eb4a59e8b8251258da2fbc89f381cbc05 (patch)
tree0aa1f62a038cbe3ba6b0abf93dbc3195691ed3fc /usr.sbin/httpd/httpd.h
parentb58b7b50aa0f6b94702c2daa0337c79b80b11add (diff)
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 'usr.sbin/httpd/httpd.h')
-rw-r--r--usr.sbin/httpd/httpd.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.sbin/httpd/httpd.h b/usr.sbin/httpd/httpd.h
index a6f470658b7..0822a5b3014 100644
--- a/usr.sbin/httpd/httpd.h
+++ b/usr.sbin/httpd/httpd.h
@@ -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;