lib/param: sync debug related options with source3/param
authorStefan Metzmacher <metze@samba.org>
Thu, 4 Jul 2013 16:11:02 +0000 (18:11 +0200)
committerBjoern Jacke <bj@sernet.de>
Tue, 9 Jul 2013 15:15:15 +0000 (17:15 +0200)
The most important change is "debug hires timestamp = Yes"
and "syslog = 1".

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Björn Jacke <bj@sernet.de>
Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Tue Jul  9 17:15:15 CEST 2013 on sn-devel-104

lib/param/loadparm.c

index 310f95a3c586563498121e1a829c92d222739c9c..455c5e623074170a89a7240cc62dcbdef6a2df79 100644 (file)
@@ -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