From 6a37b245e3894c5a3a62bf38d4eef27be5f209e8 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 8 Mar 1998 14:31:50 +0000 Subject: allow for non-authenticated SWAT for demo purposes (This used to be commit 6e1237568b559c006ee5429308ac47e97cc4a1c4) --- source3/web/cgi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/web/cgi.c') diff --git a/source3/web/cgi.c b/source3/web/cgi.c index 7c84f47ada..83158fc1a5 100644 --- a/source3/web/cgi.c +++ b/source3/web/cgi.c @@ -548,7 +548,7 @@ static void cgi_download(char *file) setup the cgi framework, handling the possability that this program is either run as a true cgi program by a web browser or is itself a mini web server ***************************************************************************/ -void cgi_setup(char *rootdir) +void cgi_setup(char *rootdir, int auth_required) { int authenticated = 0; char line[1024]; @@ -586,7 +586,7 @@ void cgi_setup(char *rootdir) /* ignore all other requests! */ } - if (!authenticated) { + if (auth_required && !authenticated) { cgi_setup_error("401 Authorization Required", "WWW-Authenticate: Basic realm=\"root\"\r\n", "You must be authenticated to use this service"); -- cgit