1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

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
This commit is contained in:
Ralph Boehme 2021-11-08 12:09:43 +01:00
parent 97592f16bf
commit 06ed4ccba6

View File

@ -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) {