According to the result of voting, net has default debug level with
authorRafal Szczesniak <mimir@samba.org>
Sat, 19 Jul 2003 00:23:08 +0000 (00:23 +0000)
committerRafal Szczesniak <mimir@samba.org>
Sat, 19 Jul 2003 00:23:08 +0000 (00:23 +0000)
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.

source/utils/net.c

index e643a3d10d7a2b69dca5358dea9e888a5e1299d1..f99b2bad84363eff845e47b0b83a099b0b31df89 100644 (file)
@@ -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++) {