From: Andreas Schneider Date: Mon, 11 Jan 2021 15:30:44 +0000 (+0100) Subject: s3:winbind: Pass the 'samba' daemon config file to winbindd X-Git-Tag: tevent-0.11.0~999 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=24c4fcf811517593074a606d12327a3d2842c427;p=thirdparty%2Fsamba.git s3:winbind: Pass the 'samba' daemon config file to winbindd Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett --- diff --git a/source4/winbind/winbindd.c b/source4/winbind/winbindd.c index 0811d13fa1a..5a74db66159 100644 --- a/source4/winbind/winbindd.c +++ b/source4/winbind/winbindd.c @@ -59,6 +59,7 @@ static NTSTATUS winbindd_task_init(struct task_server *task) struct tevent_req *subreq; const char *winbindd_path; const char *winbindd_cmd[2] = { NULL, NULL }; + const char *config_file = ""; task_server_set_title(task, "task[winbindd_parent]"); @@ -68,12 +69,22 @@ static NTSTATUS winbindd_task_init(struct task_server *task) } winbindd_cmd[0] = winbindd_path; + if (!is_default_dyn_CONFIGFILE()) { + config_file = talloc_asprintf(task, + "--configfile=%s", + get_dyn_CONFIGFILE()); + if (config_file == NULL) { + return NT_STATUS_NO_MEMORY; + } + } + /* start it as a child process */ subreq = samba_runcmd_send(task, task->event_ctx, timeval_zero(), 1, 0, winbindd_cmd, "-D", "--option=server role check:inhibit=yes", "--foreground", + config_file, debug_get_output_is_stdout()?"--stdout":NULL, NULL); if (subreq == NULL) {