summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafal Szczesniak <mimir@samba.org>2003-07-19 00:23:08 +0000
committerRafal Szczesniak <mimir@samba.org>2003-07-19 00:23:08 +0000
commitfb56f58fbc78efbfa6e5a552946ab792e45380a1 (patch)
tree76fd00cd279224a118a10e990140b52a4c4631e4
parentf4d4b079e986bfa79ff0748597582d46c6ee7297 (diff)
downloadsamba-fb56f58fbc78efbfa6e5a552946ab792e45380a1.tar.gz
samba-fb56f58fbc78efbfa6e5a552946ab792e45380a1.tar.bz2
samba-fb56f58fbc78efbfa6e5a552946ab792e45380a1.zip
According to the result of voting, net has default debug level with
ability to change it by command line instead of turn-off cmdline switch for debug messages. It's a bit more comfortable to use now. (This used to be commit b65fe75bec8170ad48d1ad0a9017ccc4de651eba)
-rw-r--r--source3/utils/net.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/source3/utils/net.c b/source3/utils/net.c
index e643a3d10d..f99b2bad84 100644
--- a/source3/utils/net.c
+++ b/source3/utils/net.c
@@ -77,6 +77,8 @@ static int opt_machine_pass = 0;
BOOL opt_have_ip = False;
struct in_addr opt_dest_ip;
+extern BOOL AllowDebugChange;
+
/*****************************************************************************
stubb functions
****************************************************************************/
@@ -580,6 +582,8 @@ static struct functable net_func[] = {
zero_ip(&opt_dest_ip);
+ /* set default debug level to 0 regardless of what smb.conf sets */
+ DEBUGLEVEL_CLASS[DBGC_ALL] = 0;
dbf = x_stderr;
pc = poptGetContext(NULL, argc, (const char **) argv, long_options,
@@ -615,9 +619,14 @@ static struct functable net_func[] = {
}
}
- lp_load(dyn_CONFIGFILE,True,False,False);
-
- argv_new = (const char **)poptGetArgs(pc);
+ /*
+ * Don't load debug level from smb.conf. It should be
+ * set by cmdline arg or remain default (0)
+ */
+ AllowDebugChange = False;
+ lp_load(dyn_CONFIGFILE,True,False,False);
+
+ argv_new = (const char **)poptGetArgs(pc);
argc_new = argc;
for (i=0; i<argc; i++) {