{
struct loadparm_context *lp_ctx = samba_cmdline_get_lp_ctx();
const char *config_file = NULL;
+ const struct samba_cmdline_daemon_cfg *cmdline_daemon_cfg = \
+ samba_cmdline_get_daemon_cfg();
bool ok;
/* Load smb conf */
}
switch (_config_type) {
- case SAMBA_CMDLINE_CONFIG_SERVER: {
- const struct samba_cmdline_daemon_cfg *cmdline_daemon_cfg =
- samba_cmdline_get_daemon_cfg();
-
+ case SAMBA_CMDLINE_CONFIG_SERVER:
if (!cmdline_daemon_cfg->interactive) {
setup_logging(getprogname(), DEBUG_FILE);
}
break;
- }
default:
break;
}
}
}
+ switch (_config_type) {
+ case SAMBA_CMDLINE_CONFIG_SERVER:
+ /*
+ * We need to setup_logging *again* to ensure multi-file
+ * logging is set up as specified in smb.conf.
+ */
+ if (!cmdline_daemon_cfg->interactive) {
+ setup_logging(getprogname(), DEBUG_FILE);
+ }
+ break;
+ default:
+ break;
+ }
+
return true;
}