s3-debug Remove 'AllowDebugChange' and use lp_set_cmdline() instead
[idra/samba.git] / source3 / utils / net.c
index 6993f9e52c45a7418b2c1fa28a997078f4007577..44119dc2c6f0b9f15c7778a5e003d592ee87a55b 100644 (file)
@@ -47,8 +47,6 @@
 #include "lib/netapi/netapi.h"
 #include "../libcli/security/security.h"
 
-extern bool AllowDebugChange;
-
 #ifdef WITH_FAKE_KASERVER
 #include "utils/net_afs.h"
 #endif
@@ -835,7 +833,7 @@ static struct functable net_func[] = {
 #endif
 
        /* set default debug level to 0 regardless of what smb.conf sets */
-       DEBUGLEVEL_CLASS[DBGC_ALL] = 0;
+       lp_set_cmdline("log level", "0");
        c->private_data = net_func;
 
        pc = poptGetContext(NULL, argc, (const char **) argv, long_options,
@@ -874,11 +872,6 @@ static struct functable net_func[] = {
                }
        }
 
-       /*
-        * Don't load debug level from smb.conf. It should be
-        * set by cmdline arg or remain default (0)
-        */
-       AllowDebugChange = false;
        lp_load(get_dyn_CONFIGFILE(), true, false, false, true);
 
        argv_new = (const char **)poptGetArgs(pc);