summaryrefslogtreecommitdiff
path: root/source4/kdc
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2015-10-07 14:36:57 +0200
committerAndreas Schneider <asn@cryptomilk.org>2017-04-29 23:31:09 +0200
commiteaaf5ce66e32d05b0a649619986d67ab6176a27a (patch)
tree9098d489e3d8216130dd95debf7f905ea4fa85e0 /source4/kdc
parent6eb1ff9b47c7041b0bdc9833bb6046f77d7ca6e4 (diff)
downloadsamba-eaaf5ce66e32d05b0a649619986d67ab6176a27a.tar.gz
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 <asn@samba.org> Reviewed-by: Andrew Bartlet <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source4/kdc')
-rw-r--r--source4/kdc/kdc-service-mit.c7
1 files changed, 7 insertions, 0 deletions
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);