summaryrefslogtreecommitdiff
path: root/source3/web/swat.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-11-21 01:41:14 +0000
committerAndrew Tridgell <tridge@samba.org>1998-11-21 01:41:14 +0000
commit42e96160d373885007c4f9cc6e6b5b69e04a998b (patch)
treeb9340cc2ad55f9f143b70be2d62a81b86021830f /source3/web/swat.c
parent091a92e9962a9526dd355b8f6c2e57b0fba167ab (diff)
downloadsamba-42e96160d373885007c4f9cc6e6b5b69e04a998b.tar.gz
samba-42e96160d373885007c4f9cc6e6b5b69e04a998b.tar.bz2
samba-42e96160d373885007c4f9cc6e6b5b69e04a998b.zip
make SWAT obey the global "hosts allow" and "hosts deny" settings.
any attempt to run swat from a host that is disallowed will give an error. (This used to be commit fe4ef4bbef01aed75807c884249ca8efa5de4140)
Diffstat (limited to 'source3/web/swat.c')
-rw-r--r--source3/web/swat.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/source3/web/swat.c b/source3/web/swat.c
index 8c5ac782a3..ed139e2483 100644
--- a/source3/web/swat.c
+++ b/source3/web/swat.c
@@ -382,12 +382,9 @@ static void commit_parameters(int snum)
/****************************************************************************
load the smb.conf file into loadparm.
****************************************************************************/
-static void load_config(void)
+static BOOL load_config(void)
{
- if (!lp_load(servicesf,False,True,False)) {
- printf("<b>Can't load %s - using defaults</b><p>\n",
- servicesf);
- }
+ return lp_load(servicesf,False,True,False);
}
/****************************************************************************
@@ -909,17 +906,13 @@ static void printers_page(void)
}
}
+ charset_initialise();
+ load_config();
+
cgi_setup(SWATDIR, !demo_mode);
print_header();
- charset_initialise();
-
- /* if this binary is setuid then run completely as root */
- setuid(0);
-
- load_config();
-
cgi_load_variables(NULL);
show_main_buttons();