From ef65d2655622506bcc4e65fd070af0f816e455e2 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 6 Aug 2003 22:45:46 +0000 Subject: Ensure smbclient obeys -s smb.conf option. Jeremy. (This used to be commit 7950f7d6b2c5e8247bce1e96ddd1a9ec1045f7f9) --- source3/client/client.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'source3') diff --git a/source3/client/client.c b/source3/client/client.c index dd2df55723..036be36175 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -2751,6 +2751,7 @@ static void remember_query_host(const char *arg, int main(int argc,char *argv[]) { + extern BOOL AllowDebugChange; fstring base_directory; int opt; pstring query_host; @@ -2792,13 +2793,11 @@ static void remember_query_host(const char *arg, *query_host = 0; *base_directory = 0; - setup_logging(argv[0],True); + /* set default debug level to 0 regardless of what smb.conf sets */ + DEBUGLEVEL_CLASS[DBGC_ALL] = 0; + dbf = x_stderr; + x_setbuf( x_stderr, NULL ); - if (!lp_load(dyn_CONFIGFILE,True,False,False)) { - fprintf(stderr, "%s: Can't load %s - run testparm to debug it\n", - argv[0], dyn_CONFIGFILE); - } - pc = poptGetContext("smbclient", argc, (const char **) argv, long_options, POPT_CONTEXT_KEEP_FIRST); poptSetOtherOptionHelp(pc, "service "); @@ -2870,6 +2869,17 @@ static void remember_query_host(const char *arg, poptGetArg(pc); + /* + * Don't load debug level from smb.conf. It should be + * set by cmdline arg or remain default (0) + */ + AllowDebugChange = False; + + if (!lp_load(dyn_CONFIGFILE,True,False,False)) { + fprintf(stderr, "%s: Can't load %s - run testparm to debug it\n", + argv[0], dyn_CONFIGFILE); + } + load_interfaces(); if(poptPeekArg(pc)) { -- cgit