summaryrefslogtreecommitdiff
path: root/source3/client
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2003-08-06 22:45:46 +0000
committerJeremy Allison <jra@samba.org>2003-08-06 22:45:46 +0000
commitef65d2655622506bcc4e65fd070af0f816e455e2 (patch)
tree56b85ef8b19da6095b2ad7a3c21f8332f3d0d697 /source3/client
parente602bca52fc50f2b126d5edbd7afd019bf96bbcc (diff)
downloadsamba-ef65d2655622506bcc4e65fd070af0f816e455e2.tar.gz
samba-ef65d2655622506bcc4e65fd070af0f816e455e2.tar.bz2
samba-ef65d2655622506bcc4e65fd070af0f816e455e2.zip
Ensure smbclient obeys -s smb.conf option.
Jeremy. (This used to be commit 7950f7d6b2c5e8247bce1e96ddd1a9ec1045f7f9)
Diffstat (limited to 'source3/client')
-rw-r--r--source3/client/client.c22
1 files changed, 16 insertions, 6 deletions
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 <password>");
@@ -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)) {