diff options
author | Andrew Tridgell <tridge@samba.org> | 1998-03-08 14:31:50 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1998-03-08 14:31:50 +0000 |
commit | 6a37b245e3894c5a3a62bf38d4eef27be5f209e8 (patch) | |
tree | 2912f89a4cab908e16854fcb88f20143fc7d9647 /source3/swat.c | |
parent | 35d67dd80aa3ba72b75683cb1f35c81066e21223 (diff) | |
download | samba-6a37b245e3894c5a3a62bf38d4eef27be5f209e8.tar.gz samba-6a37b245e3894c5a3a62bf38d4eef27be5f209e8.tar.bz2 samba-6a37b245e3894c5a3a62bf38d4eef27be5f209e8.zip |
allow for non-authenticated SWAT for demo purposes
(This used to be commit 6e1237568b559c006ee5429308ac47e97cc4a1c4)
Diffstat (limited to 'source3/swat.c')
-rw-r--r-- | source3/swat.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source3/swat.c b/source3/swat.c index 4810d87af3..6a5b4f51f1 100644 --- a/source3/swat.c +++ b/source3/swat.c @@ -432,6 +432,7 @@ int main(int argc, char *argv[]) extern FILE *dbf; int opt; char *page; + int auth_required = 1; /* just in case it goes wild ... */ alarm(300); @@ -440,16 +441,18 @@ int main(int argc, char *argv[]) if (!dbf) dbf = stderr; - cgi_setup(SWATDIR); - - while ((opt = getopt(argc, argv,"s:")) != EOF) { + while ((opt = getopt(argc, argv,"s:a")) != EOF) { switch (opt) { case 's': pstrcpy(servicesf,optarg); break; + case 'a': + auth_required = 0; + break; } } + cgi_setup(SWATDIR, auth_required); print_header(); |