From: Andreas Schneider Date: Wed, 7 Oct 2015 12:36:57 +0000 (+0200) Subject: param: Add 'mit kdc config' option to smb.conf X-Git-Tag: ldb-1.1.30~403 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=eaaf5ce66e32d05b0a649619986d67ab6176a27a;p=thirdparty%2Fsamba.git param: Add 'mit kdc config' option to smb.conf This points to the kdc config file created by Samba by default. Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlet Reviewed-by: Jeremy Allison --- diff --git a/docs-xml/smbdotconf/security/mitkdcconfig.xml b/docs-xml/smbdotconf/security/mitkdcconfig.xml new file mode 100644 index 00000000000..4dd9f9badff --- /dev/null +++ b/docs-xml/smbdotconf/security/mitkdcconfig.xml @@ -0,0 +1,14 @@ + + + + This option allows to use a different MIT KDC config file than using + the system default. + + + +/etc/samba/kdc.conf + diff --git a/source4/kdc/kdc-service-mit.c b/source4/kdc/kdc-service-mit.c index 36d0063e4ed..719ea48c090 100644 --- a/source4/kdc/kdc-service-mit.c +++ b/source4/kdc/kdc-service-mit.c @@ -42,6 +42,7 @@ void mitkdc_task_init(struct task_server *task) { struct tevent_req *subreq; const char * const *kdc_cmd; + const char *kdc_config; NTSTATUS status; task_server_set_title(task, "task[mitkdc_parent]"); @@ -64,6 +65,12 @@ void mitkdc_task_init(struct task_server *task) break; } + kdc_config = lpcfg_mit_kdc_config(task->lp_ctx, task); + if (kdc_config != NULL && kdc_config[0] != '\0') { + /* Do not overwrite the variable if already set! */ + setenv("KRB5_KDC_PROFILE", kdc_config, 0); + } + /* start it as a child process */ kdc_cmd = lpcfg_mit_kdc_command(task->lp_ctx);