From 42e96160d373885007c4f9cc6e6b5b69e04a998b Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 21 Nov 1998 01:41:14 +0000 Subject: 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) --- source3/web/swat.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'source3/web/swat.c') 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("Can't load %s - using defaults

\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(); -- cgit