summaryrefslogtreecommitdiff
path: root/source4/kdc
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2007-06-13 05:44:24 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:53:18 -0500
commit91adebe749beb0dc23cacaea316cb2b724776aad (patch)
tree133d480f5b23b99fcf1149861136103dc4525cb1 /source4/kdc
parentf7110d928afd61cee203d07fd85968af993a327f (diff)
downloadsamba-91adebe749beb0dc23cacaea316cb2b724776aad.tar.gz
samba-91adebe749beb0dc23cacaea316cb2b724776aad.tar.bz2
samba-91adebe749beb0dc23cacaea316cb2b724776aad.zip
r23456: Update Samba4 to current lorikeet-heimdal.
Andrew Bartlett (This used to be commit ae0f81ab235c72cceb120bcdeb051a483cf3cc4f)
Diffstat (limited to 'source4/kdc')
-rw-r--r--source4/kdc/kdc.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/source4/kdc/kdc.c b/source4/kdc/kdc.c
index 0cb05dee34..5f777a667c 100644
--- a/source4/kdc/kdc.c
+++ b/source4/kdc/kdc.c
@@ -323,6 +323,8 @@ static BOOL kdc_process(struct kdc_server *kdc,
krb5_data k5_reply;
krb5_data_zero(&k5_reply);
+ krb5_kdc_update_time(NULL);
+
DEBUG(10,("Received KDC packet of length %lu from %s:%d\n",
(long)input->length - 4, peer_addr->addr, peer_addr->port));
@@ -592,25 +594,15 @@ static void kdc_task_init(struct task_server *task)
krb5_add_et_list(kdc->smb_krb5_context->krb5_context, initialize_hdb_error_table_r);
- /* Registar WinDC hooks */
- ret = _krb5_plugin_register(kdc->smb_krb5_context->krb5_context,
- PLUGIN_TYPE_DATA, "windc",
- &windc_plugin_table);
+ ret = krb5_kdc_get_config(kdc->smb_krb5_context->krb5_context,
+ &kdc->config);
if(ret) {
- task_server_terminate(task, "kdc: failed to register hdb keytab");
- return;
- }
-
- /* Setup the KDC configuration */
- kdc->config = talloc(kdc, krb5_kdc_configuration);
- if (!kdc->config) {
- task_server_terminate(task, "kdc: out of memory");
+ task_server_terminate(task, "kdc: failed to get KDC configuration");
return;
}
- krb5_kdc_default_config(kdc->config);
kdc->config->logf = kdc->smb_krb5_context->logf;
- kdc->config->db = talloc(kdc->config, struct HDB *);
+ kdc->config->db = talloc(kdc, struct HDB *);
if (!kdc->config->db) {
task_server_terminate(task, "kdc: out of memory");
return;
@@ -630,7 +622,16 @@ static void kdc_task_init(struct task_server *task)
return;
}
- krb5_kdc_configure(kdc->smb_krb5_context->krb5_context, kdc->config);
+ /* Registar WinDC hooks */
+ ret = _krb5_plugin_register(kdc->smb_krb5_context->krb5_context,
+ PLUGIN_TYPE_DATA, "windc",
+ &windc_plugin_table);
+ if(ret) {
+ task_server_terminate(task, "kdc: failed to register hdb keytab");
+ return;
+ }
+
+ krb5_kdc_windc_init(kdc->smb_krb5_context->krb5_context);
kdc_mem_ctx = kdc->smb_krb5_context;