diff options
author | Andrew Bartlett <abartlet@samba.org> | 2010-10-29 21:10:31 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2010-11-02 04:36:04 +0000 |
commit | ed111d11ebcbaa1e709485f86ca45e582a55301f (patch) | |
tree | 5a9866d3417a24b21412a7158e80a234a8dee2f5 /source3/utils | |
parent | e64dfdcc71e17f21419f24b3f2b32d477b4cea1e (diff) | |
download | samba-ed111d11ebcbaa1e709485f86ca45e582a55301f.tar.gz samba-ed111d11ebcbaa1e709485f86ca45e582a55301f.tar.bz2 samba-ed111d11ebcbaa1e709485f86ca45e582a55301f.zip |
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
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/dbwrap_torture.c | 3 | ||||
-rw-r--r-- | source3/utils/sharesec.c | 5 | ||||
-rw-r--r-- | source3/utils/smbcacls.c | 1 |
3 files changed, 5 insertions, 4 deletions
diff --git a/source3/utils/dbwrap_torture.c b/source3/utils/dbwrap_torture.c index abb17e8e2a..22c0a64a52 100644 --- a/source3/utils/dbwrap_torture.c +++ b/source3/utils/dbwrap_torture.c @@ -256,6 +256,8 @@ int main(int argc, const char *argv[]) setlinebuf(stdout); } + load_case_tables(); + setup_logging(argv[0], DEBUG_STDERR); lp_set_cmdline("log level", "0"); @@ -277,7 +279,6 @@ int main(int argc, const char *argv[]) while (extra_argv[extra_argc]) extra_argc++; } - load_case_tables(); lp_load(get_dyn_CONFIGFILE(), true, false, false, true); ev_ctx = tevent_context_init(mem_ctx); 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 */ diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c index 4de24dc767..bb438bab78 100644 --- a/source3/utils/smbcacls.c +++ b/source3/utils/smbcacls.c @@ -1199,7 +1199,6 @@ static struct cli_state *connect_one(struct user_auth_info *auth_info, load_case_tables(); - /* set default debug level to 1 regardless of what smb.conf sets */ setup_logging( "smbcacls", DEBUG_STDERR); lp_set_cmdline("log level", "1"); |