summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-07-15 11:26:43 +0200
committerMichael Adam <obnox@samba.org>2008-07-15 13:03:24 +0200
commita3356d6f32d00bd62e836dba050db04040b679ed (patch)
treecc54261b557732648d0979163f4d510fe888e1c9
parentdbac75b466831cade91dfad21a2bcbe4bd551b37 (diff)
downloadsamba-a3356d6f32d00bd62e836dba050db04040b679ed.tar.gz
samba-a3356d6f32d00bd62e836dba050db04040b679ed.tar.bz2
samba-a3356d6f32d00bd62e836dba050db04040b679ed.zip
testparm: allow the default debug level of 2 to be changed from the command line.
Michael (This used to be commit 5a0883a7f28538fad542293e1d9361e8c4bed1fd)
-rw-r--r--source3/utils/testparm.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source3/utils/testparm.c b/source3/utils/testparm.c
index 212dcf0676..527db2d805 100644
--- a/source3/utils/testparm.c
+++ b/source3/utils/testparm.c
@@ -296,12 +296,19 @@ rameter is ignored when using CUPS libraries.\n",
{"parameter-name", '\0', POPT_ARG_STRING, &parameter_name, 0, "Limit testparm to a named parameter" },
{"section-name", '\0', POPT_ARG_STRING, &section_name, 0, "Limit testparm to a named section" },
POPT_COMMON_VERSION
+ POPT_COMMON_DEBUGLEVEL
POPT_TABLEEND
};
TALLOC_CTX *frame = talloc_stackframe();
load_case_tables();
+ /*
+ * Set the default debug level to 2.
+ * Allow it to be overridden by the command line,
+ * not by smb.conf.
+ */
+ DEBUGLEVEL_CLASS[DBGC_ALL] = 2;
pc = poptGetContext(NULL, argc, argv, long_options,
POPT_CONTEXT_KEEP_FIRST);
@@ -332,7 +339,7 @@ rameter is ignored when using CUPS libraries.\n",
}
dbf = x_stderr;
- DEBUGLEVEL = 2;
+ /* Don't let the debuglevel be changed by smb.conf. */
AllowDebugChange = False;
fprintf(stderr,"Load smb config files from %s\n",config_file);