From 2e6fdd7e0d109223502618c32c945dc80f401761 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 4 Jul 2013 18:11:02 +0200 Subject: lib/param: sync debug related options with source3/param MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The most important change is "debug hires timestamp = Yes" and "syslog = 1". Signed-off-by: Stefan Metzmacher Reviewed-by: Björn Jacke Autobuild-User(master): Björn Jacke Autobuild-Date(master): Tue Jul 9 17:15:15 CEST 2013 on sn-devel-104 (cherry picked from commit cd36a3e902813c065e14059d325f7628b06595aa) The last 4 patches fix bug #10015 - Fix/Improve debug options. --- lib/param/loadparm.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/param/loadparm.c b/lib/param/loadparm.c index 310f95a3c5..455c5e6230 100644 --- a/lib/param/loadparm.c +++ b/lib/param/loadparm.c @@ -2083,6 +2083,15 @@ struct loadparm_context *loadparm_init(TALLOC_CTX *mem_ctx) lpcfg_do_global_parameter(lp_ctx, "log level", "0"); + lpcfg_do_global_parameter(lp_ctx, "syslog", "1"); + lpcfg_do_global_parameter(lp_ctx, "syslog only", "No"); + lpcfg_do_global_parameter(lp_ctx, "debug timestamp", "Yes"); + lpcfg_do_global_parameter(lp_ctx, "debug prefix timestamp", "No"); + lpcfg_do_global_parameter(lp_ctx, "debug hires timestamp", "Yes"); + lpcfg_do_global_parameter(lp_ctx, "debug pid", "No"); + lpcfg_do_global_parameter(lp_ctx, "debug uid", "No"); + lpcfg_do_global_parameter(lp_ctx, "debug class", "No"); + lpcfg_do_global_parameter(lp_ctx, "share backend", "classic"); lpcfg_do_global_parameter(lp_ctx, "server role", "auto"); @@ -2302,7 +2311,14 @@ static bool lpcfg_update(struct loadparm_context *lp_ctx) ZERO_STRUCT(settings); /* Add any more debug-related smb.conf parameters created in * future here */ - settings.timestamp_logs = true; + settings.syslog = lp_ctx->globals->syslog; + settings.syslog_only = lp_ctx->globals->bSyslogOnly; + settings.timestamp_logs = lp_ctx->globals->bTimestampLogs; + settings.debug_prefix_timestamp = lp_ctx->globals->bDebugPrefixTimestamp; + settings.debug_hires_timestamp = lp_ctx->globals->bDebugHiresTimestamp; + settings.debug_pid = lp_ctx->globals->bDebugPid; + settings.debug_uid = lp_ctx->globals->bDebugUid; + settings.debug_class = lp_ctx->globals->bDebugClass; debug_set_settings(&settings); /* FIXME: This is a bit of a hack, but we can't use a global, since -- cgit v1.2.3