summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2021-11-08 12:09:43 +0100
committerRalph Boehme <slow@samba.org>2021-11-11 14:42:13 +0000
commit06ed4ccba6cfe08aef061866f98b1d1da26682b8 (patch)
tree0bbdd4876fd7c478abd43d823b18e963763649d5 /lib
parent97592f16bfb8590efbd2ed31fc9883d747ec650f (diff)
downloadsamba-06ed4ccba6cfe08aef061866f98b1d1da26682b8.tar.gz
lib/cmdline: setup default file logging for servers
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14897 RN: samba process doesn't log to logfile Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Thu Nov 11 14:42:13 UTC 2021 on sn-devel-184
Diffstat (limited to 'lib')
-rw-r--r--lib/cmdline/cmdline_s4.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/cmdline/cmdline_s4.c b/lib/cmdline/cmdline_s4.c
index 6ef6f59db49..29e9f34bbe2 100644
--- a/lib/cmdline/cmdline_s4.c
+++ b/lib/cmdline/cmdline_s4.c
@@ -44,6 +44,20 @@ static bool _samba_cmdline_load_config_s4(void)
}
}
+ switch (_config_type) {
+ case SAMBA_CMDLINE_CONFIG_SERVER: {
+ const struct samba_cmdline_daemon_cfg *cmdline_daemon_cfg =
+ samba_cmdline_get_daemon_cfg();
+
+ if (!cmdline_daemon_cfg->interactive) {
+ setup_logging(getprogname(), DEBUG_FILE);
+ }
+ break;
+ }
+ default:
+ break;
+ }
+
config_file = get_dyn_CONFIGFILE();
ok = lpcfg_load(lp_ctx, config_file);
if (!ok) {