diff options
Diffstat (limited to 'source3/web/swat.c')
-rw-r--r-- | source3/web/swat.c | 17 |
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(); |