From ed111d11ebcbaa1e709485f86ca45e582a55301f Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 29 Oct 2010 21:10:31 +1100 Subject: s3-debug Move 'load_case_tables()' before lp_set_cmdline() and popt calls The problem here is that we cannot run lp_set_cmdline() (directly or indirectly via the popt helpers) until load_case_tables() has been run. However, load_case_tables does not have auto-initialisation, so we must init it once, and once only. Andrew Bartlett --- source3/utils/sharesec.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source3/utils/sharesec.c') diff --git a/source3/utils/sharesec.c b/source3/utils/sharesec.c index 7ed238cdd4..1a12ce0228 100644 --- a/source3/utils/sharesec.c +++ b/source3/utils/sharesec.c @@ -544,6 +544,9 @@ int main(int argc, const char *argv[]) /* set default debug level to 1 regardless of what smb.conf sets */ setup_logging( "sharesec", DEBUG_STDERR); + + load_case_tables(); + lp_set_cmdline("log level", "1"); pc = poptGetContext("sharesec", argc, argv, long_options, 0); @@ -592,8 +595,6 @@ int main(int argc, const char *argv[]) setlinebuf(stdout); - load_case_tables(); - lp_load( get_dyn_CONFIGFILE(), False, False, False, True ); /* check for initializing secrets.tdb first */ -- cgit