Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-test
[samba.git] / source4 / kdc / kdc.c
1 /* 
2    Unix SMB/CIFS implementation.
3
4    KDC Server startup
5
6    Copyright (C) Andrew Bartlett <abartlet@samba.org> 2005
7    Copyright (C) Andrew Tridgell        2005
8    Copyright (C) Stefan Metzmacher      2005
9
10    This program is free software; you can redistribute it and/or modify
11    it under the terms of the GNU General Public License as published by
12    the Free Software Foundation; either version 3 of the License, or
13    (at your option) any later version.
14    
15    This program is distributed in the hope that it will be useful,
16    but WITHOUT ANY WARRANTY; without even the implied warranty of
17    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18    GNU General Public License for more details.
19    
20    You should have received a copy of the GNU General Public License
21    along with this program.  If not, see <http://www.gnu.org/licenses/>.
22 */
23
24 #include "includes.h"
25 #include "smbd/service_task.h"
26 #include "smbd/service.h"
27 #include "smbd/service_stream.h"
28 #include "smbd/process_model.h"
29 #include "lib/events/events.h"
30 #include "lib/socket/socket.h"
31 #include "system/network.h"
32 #include "lib/util/dlinklist.h"
33 #include "lib/messaging/irpc.h"
34 #include "lib/stream/packet.h"
35 #include "librpc/gen_ndr/samr.h"
36 #include "lib/socket/netif.h"
37 #include "param/param.h"
38 #include "kdc/kdc.h"
39
40
41 /* Disgusting hack to get a mem_ctx and lp_ctx into the hdb plugin, when 
42  * used as a keytab */
43 TALLOC_CTX *kdc_mem_ctx;
44 struct loadparm_context *kdc_lp_ctx;
45
46 /* hold all the info needed to send a reply */
47 struct kdc_reply {
48         struct kdc_reply *next, *prev;
49         struct socket_address *dest;
50         DATA_BLOB packet;
51 };
52
53 typedef bool (*kdc_process_fn_t)(struct kdc_server *kdc,
54                                  TALLOC_CTX *mem_ctx, 
55                                  DATA_BLOB *input, 
56                                  DATA_BLOB *reply,
57                                  struct socket_address *peer_addr, 
58                                  struct socket_address *my_addr, 
59                                  int datagram);
60
61 /* hold information about one kdc socket */
62 struct kdc_socket {
63         struct socket_context *sock;
64         struct kdc_server *kdc;
65         struct fd_event *fde;
66
67         /* a queue of outgoing replies that have been deferred */
68         struct kdc_reply *send_queue;
69
70         kdc_process_fn_t process;
71 };
72 /*
73   state of an open tcp connection
74 */
75 struct kdc_tcp_connection {
76         /* stream connection we belong to */
77         struct stream_connection *conn;
78
79         /* the kdc_server the connection belongs to */
80         struct kdc_server *kdc;
81
82         struct packet_context *packet;
83
84         kdc_process_fn_t process;
85 };
86
87 /*
88   handle fd send events on a KDC socket
89 */
90 static void kdc_send_handler(struct kdc_socket *kdc_socket)
91 {
92         while (kdc_socket->send_queue) {
93                 struct kdc_reply *rep = kdc_socket->send_queue;
94                 NTSTATUS status;
95                 size_t sendlen;
96
97                 status = socket_sendto(kdc_socket->sock, &rep->packet, &sendlen,
98                                        rep->dest);
99                 if (NT_STATUS_EQUAL(status, STATUS_MORE_ENTRIES)) {
100                         break;
101                 }
102                 if (NT_STATUS_EQUAL(status, NT_STATUS_INVALID_BUFFER_SIZE)) {
103                         /* Replace with a krb err, response to big */
104                 }
105                 
106                 DLIST_REMOVE(kdc_socket->send_queue, rep);
107                 talloc_free(rep);
108         }
109
110         if (kdc_socket->send_queue == NULL) {
111                 EVENT_FD_NOT_WRITEABLE(kdc_socket->fde);
112         }
113 }
114
115
116 /*
117   handle fd recv events on a KDC socket
118 */
119 static void kdc_recv_handler(struct kdc_socket *kdc_socket)
120 {
121         NTSTATUS status;
122         TALLOC_CTX *tmp_ctx = talloc_new(kdc_socket);
123         DATA_BLOB blob;
124         struct kdc_reply *rep;
125         DATA_BLOB reply;
126         size_t nread, dsize;
127         struct socket_address *src;
128         struct socket_address *my_addr;
129         int ret;
130
131         status = socket_pending(kdc_socket->sock, &dsize);
132         if (!NT_STATUS_IS_OK(status)) {
133                 talloc_free(tmp_ctx);
134                 return;
135         }
136
137         blob = data_blob_talloc(tmp_ctx, NULL, dsize);
138         if (blob.data == NULL) {
139                 /* hope this is a temporary low memory condition */
140                 talloc_free(tmp_ctx);
141                 return;
142         }
143
144         status = socket_recvfrom(kdc_socket->sock, blob.data, blob.length, &nread,
145                                  tmp_ctx, &src);
146         if (!NT_STATUS_IS_OK(status)) {
147                 talloc_free(tmp_ctx);
148                 return;
149         }
150         blob.length = nread;
151         
152         DEBUG(10,("Received krb5 UDP packet of length %lu from %s:%u\n", 
153                  (long)blob.length, src->addr, (uint16_t)src->port));
154         
155         my_addr = socket_get_my_addr(kdc_socket->sock, tmp_ctx);
156         if (!my_addr) {
157                 talloc_free(tmp_ctx);
158                 return;
159         }
160
161
162         /* Call krb5 */
163         ret = kdc_socket->process(kdc_socket->kdc, 
164                                   tmp_ctx, 
165                                   &blob,  
166                                   &reply,
167                                   src, my_addr,
168                                   1 /* Datagram */);
169         if (!ret) {
170                 talloc_free(tmp_ctx);
171                 return;
172         }
173
174         /* queue a pending reply */
175         rep = talloc(kdc_socket, struct kdc_reply);
176         if (rep == NULL) {
177                 talloc_free(tmp_ctx);
178                 return;
179         }
180         rep->dest         = talloc_steal(rep, src);
181         rep->packet       = reply;
182         talloc_steal(rep, reply.data);
183
184         if (rep->packet.data == NULL) {
185                 talloc_free(rep);
186                 talloc_free(tmp_ctx);
187                 return;
188         }
189
190         DLIST_ADD_END(kdc_socket->send_queue, rep, struct kdc_reply *);
191         EVENT_FD_WRITEABLE(kdc_socket->fde);
192         talloc_free(tmp_ctx);
193 }
194
195 /*
196   handle fd events on a KDC socket
197 */
198 static void kdc_socket_handler(struct event_context *ev, struct fd_event *fde,
199                                uint16_t flags, void *private)
200 {
201         struct kdc_socket *kdc_socket = talloc_get_type(private, struct kdc_socket);
202         if (flags & EVENT_FD_WRITE) {
203                 kdc_send_handler(kdc_socket);
204         } 
205         if (flags & EVENT_FD_READ) {
206                 kdc_recv_handler(kdc_socket);
207         }
208 }
209
210 static void kdc_tcp_terminate_connection(struct kdc_tcp_connection *kdcconn, const char *reason)
211 {
212         stream_terminate_connection(kdcconn->conn, reason);
213 }
214
215 /*
216   receive a full packet on a KDC connection
217 */
218 static NTSTATUS kdc_tcp_recv(void *private, DATA_BLOB blob)
219 {
220         struct kdc_tcp_connection *kdcconn = talloc_get_type(private, 
221                                                              struct kdc_tcp_connection);
222         NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
223         TALLOC_CTX *tmp_ctx = talloc_new(kdcconn);
224         int ret;
225         DATA_BLOB input, reply;
226         struct socket_address *src_addr;
227         struct socket_address *my_addr;
228
229         talloc_steal(tmp_ctx, blob.data);
230
231         src_addr = socket_get_peer_addr(kdcconn->conn->socket, tmp_ctx);
232         if (!src_addr) {
233                 talloc_free(tmp_ctx);
234                 return NT_STATUS_NO_MEMORY;
235         }
236
237         my_addr = socket_get_my_addr(kdcconn->conn->socket, tmp_ctx);
238         if (!my_addr) {
239                 talloc_free(tmp_ctx);
240                 return NT_STATUS_NO_MEMORY;
241         }
242
243         /* Call krb5 */
244         input = data_blob_const(blob.data + 4, blob.length - 4); 
245
246         ret = kdcconn->process(kdcconn->kdc, 
247                                tmp_ctx,
248                                &input,
249                                &reply,
250                                src_addr,
251                                my_addr,
252                                0 /* Not datagram */);
253         if (!ret) {
254                 talloc_free(tmp_ctx);
255                 return NT_STATUS_INTERNAL_ERROR;
256         }
257
258         /* and now encode the reply */
259         blob = data_blob_talloc(kdcconn, NULL, reply.length + 4);
260         if (!blob.data) {
261                 talloc_free(tmp_ctx);
262                 return NT_STATUS_NO_MEMORY;
263         }
264
265         RSIVAL(blob.data, 0, reply.length);
266         memcpy(blob.data + 4, reply.data, reply.length);        
267
268         status = packet_send(kdcconn->packet, blob);
269         if (!NT_STATUS_IS_OK(status)) {
270                 talloc_free(tmp_ctx);
271                 return status;
272         }
273
274         /* the call isn't needed any more */
275         talloc_free(tmp_ctx);
276         return NT_STATUS_OK;
277 }
278
279 /*
280   receive some data on a KDC connection
281 */
282 static void kdc_tcp_recv_handler(struct stream_connection *conn, uint16_t flags)
283 {
284         struct kdc_tcp_connection *kdcconn = talloc_get_type(conn->private, 
285                                                              struct kdc_tcp_connection);
286         packet_recv(kdcconn->packet);
287 }
288
289 /*
290   called on a tcp recv error
291 */
292 static void kdc_tcp_recv_error(void *private, NTSTATUS status)
293 {
294         struct kdc_tcp_connection *kdcconn = talloc_get_type(private, struct kdc_tcp_connection);
295         kdc_tcp_terminate_connection(kdcconn, nt_errstr(status));
296 }
297
298 /*
299   called when we can write to a connection
300 */
301 static void kdc_tcp_send(struct stream_connection *conn, uint16_t flags)
302 {
303         struct kdc_tcp_connection *kdcconn = talloc_get_type(conn->private, 
304                                                              struct kdc_tcp_connection);
305         packet_queue_run(kdcconn->packet);
306 }
307
308 /**
309    Wrapper for krb5_kdc_process_krb5_request, converting to/from Samba
310    calling conventions
311 */
312
313 static bool kdc_process(struct kdc_server *kdc,
314                         TALLOC_CTX *mem_ctx, 
315                         DATA_BLOB *input, 
316                         DATA_BLOB *reply,
317                         struct socket_address *peer_addr, 
318                         struct socket_address *my_addr,
319                         int datagram_reply)
320 {
321         int ret;        
322         krb5_data k5_reply;
323         krb5_data_zero(&k5_reply);
324
325         krb5_kdc_update_time(NULL);
326
327         DEBUG(10,("Received KDC packet of length %lu from %s:%d\n", 
328                   (long)input->length - 4, peer_addr->addr, peer_addr->port));
329
330         ret = krb5_kdc_process_krb5_request(kdc->smb_krb5_context->krb5_context, 
331                                             kdc->config,
332                                             input->data, input->length,
333                                             &k5_reply,
334                                             peer_addr->addr,
335                                             peer_addr->sockaddr,
336                                             datagram_reply);
337         if (ret == -1) {
338                 *reply = data_blob(NULL, 0);
339                 return false;
340         }
341         if (k5_reply.length) {
342                 *reply = data_blob_talloc(mem_ctx, k5_reply.data, k5_reply.length);
343                 krb5_free_data_contents(kdc->smb_krb5_context->krb5_context, &k5_reply);
344         } else {
345                 *reply = data_blob(NULL, 0);    
346         }
347         return true;
348 }
349
350 /*
351   called when we get a new connection
352 */
353 static void kdc_tcp_generic_accept(struct stream_connection *conn, kdc_process_fn_t process_fn)
354 {
355         struct kdc_server *kdc = talloc_get_type(conn->private, struct kdc_server);
356         struct kdc_tcp_connection *kdcconn;
357
358         kdcconn = talloc_zero(conn, struct kdc_tcp_connection);
359         if (!kdcconn) {
360                 stream_terminate_connection(conn, "kdc_tcp_accept: out of memory");
361                 return;
362         }
363         kdcconn->conn    = conn;
364         kdcconn->kdc     = kdc;
365         kdcconn->process = process_fn;
366         conn->private    = kdcconn;
367
368         kdcconn->packet = packet_init(kdcconn);
369         if (kdcconn->packet == NULL) {
370                 kdc_tcp_terminate_connection(kdcconn, "kdc_tcp_accept: out of memory");
371                 return;
372         }
373         packet_set_private(kdcconn->packet, kdcconn);
374         packet_set_socket(kdcconn->packet, conn->socket);
375         packet_set_callback(kdcconn->packet, kdc_tcp_recv);
376         packet_set_full_request(kdcconn->packet, packet_full_request_u32);
377         packet_set_error_handler(kdcconn->packet, kdc_tcp_recv_error);
378         packet_set_event_context(kdcconn->packet, conn->event.ctx);
379         packet_set_fde(kdcconn->packet, conn->event.fde);
380         packet_set_serialise(kdcconn->packet);
381 }
382
383 static void kdc_tcp_accept(struct stream_connection *conn)
384 {
385         kdc_tcp_generic_accept(conn, kdc_process);
386 }
387
388 static const struct stream_server_ops kdc_tcp_stream_ops = {
389         .name                   = "kdc_tcp",
390         .accept_connection      = kdc_tcp_accept,
391         .recv_handler           = kdc_tcp_recv_handler,
392         .send_handler           = kdc_tcp_send
393 };
394
395 static void kpasswdd_tcp_accept(struct stream_connection *conn)
396 {
397         kdc_tcp_generic_accept(conn, kpasswdd_process);
398 }
399
400 static const struct stream_server_ops kpasswdd_tcp_stream_ops = {
401         .name                   = "kpasswdd_tcp",
402         .accept_connection      = kpasswdd_tcp_accept,
403         .recv_handler           = kdc_tcp_recv_handler,
404         .send_handler           = kdc_tcp_send
405 };
406
407 /*
408   start listening on the given address
409 */
410 static NTSTATUS kdc_add_socket(struct kdc_server *kdc, const char *address,
411                                uint16_t kdc_port, uint16_t kpasswd_port)
412 {
413         const struct model_ops *model_ops;
414         struct kdc_socket *kdc_socket;
415         struct kdc_socket *kpasswd_socket;
416         struct socket_address *kdc_address, *kpasswd_address;
417         NTSTATUS status;
418
419         kdc_socket = talloc(kdc, struct kdc_socket);
420         NT_STATUS_HAVE_NO_MEMORY(kdc_socket);
421
422         kpasswd_socket = talloc(kdc, struct kdc_socket);
423         NT_STATUS_HAVE_NO_MEMORY(kpasswd_socket);
424
425         status = socket_create("ip", SOCKET_TYPE_DGRAM, &kdc_socket->sock, 0);
426         if (!NT_STATUS_IS_OK(status)) {
427                 talloc_free(kdc_socket);
428                 return status;
429         }
430
431         status = socket_create("ip", SOCKET_TYPE_DGRAM, &kpasswd_socket->sock, 0);
432         if (!NT_STATUS_IS_OK(status)) {
433                 talloc_free(kpasswd_socket);
434                 return status;
435         }
436
437         kdc_socket->kdc = kdc;
438         kdc_socket->send_queue = NULL;
439         kdc_socket->process = kdc_process;
440
441         talloc_steal(kdc_socket, kdc_socket->sock);
442
443         kdc_socket->fde = event_add_fd(kdc->task->event_ctx, kdc, 
444                                        socket_get_fd(kdc_socket->sock), EVENT_FD_READ,
445                                        kdc_socket_handler, kdc_socket);
446
447         kdc_address = socket_address_from_strings(kdc_socket, kdc_socket->sock->backend_name, 
448                                                   address, kdc_port);
449         NT_STATUS_HAVE_NO_MEMORY(kdc_address);
450
451         status = socket_listen(kdc_socket->sock, kdc_address, 0, 0);
452         if (!NT_STATUS_IS_OK(status)) {
453                 DEBUG(0,("Failed to bind to %s:%d UDP for kdc - %s\n", 
454                          address, kdc_port, nt_errstr(status)));
455                 talloc_free(kdc_socket);
456                 return status;
457         }
458
459         kpasswd_socket->kdc = kdc;
460         kpasswd_socket->send_queue = NULL;
461         kpasswd_socket->process = kpasswdd_process;
462
463         talloc_steal(kpasswd_socket, kpasswd_socket->sock);
464
465         kpasswd_socket->fde = event_add_fd(kdc->task->event_ctx, kdc, 
466                                            socket_get_fd(kpasswd_socket->sock), EVENT_FD_READ,
467                                            kdc_socket_handler, kpasswd_socket);
468         
469         kpasswd_address = socket_address_from_strings(kpasswd_socket, kpasswd_socket->sock->backend_name, 
470                                                       address, kpasswd_port);
471         NT_STATUS_HAVE_NO_MEMORY(kpasswd_address);
472
473         status = socket_listen(kpasswd_socket->sock, kpasswd_address, 0, 0);
474         if (!NT_STATUS_IS_OK(status)) {
475                 DEBUG(0,("Failed to bind to %s:%d UDP for kpasswd - %s\n", 
476                          address, kpasswd_port, nt_errstr(status)));
477                 talloc_free(kpasswd_socket);
478                 return status;
479         }
480
481         /* within the kdc task we want to be a single process, so
482            ask for the single process model ops and pass these to the
483            stream_setup_socket() call. */
484         model_ops = process_model_byname("single");
485         if (!model_ops) {
486                 DEBUG(0,("Can't find 'single' process model_ops\n"));
487                 talloc_free(kdc_socket);
488                 return NT_STATUS_INTERNAL_ERROR;
489         }
490
491         status = stream_setup_socket(kdc->task->event_ctx, 
492                                      kdc->task->lp_ctx,
493                                      model_ops, 
494                                      &kdc_tcp_stream_ops, 
495                                      "ip", address, &kdc_port, 
496                                      lp_socket_options(kdc->task->lp_ctx), 
497                                      kdc);
498         if (!NT_STATUS_IS_OK(status)) {
499                 DEBUG(0,("Failed to bind to %s:%u TCP - %s\n",
500                          address, kdc_port, nt_errstr(status)));
501                 talloc_free(kdc_socket);
502                 return status;
503         }
504
505         status = stream_setup_socket(kdc->task->event_ctx, 
506                                      kdc->task->lp_ctx,
507                                      model_ops, 
508                                      &kpasswdd_tcp_stream_ops, 
509                                      "ip", address, &kpasswd_port, 
510                                      lp_socket_options(kdc->task->lp_ctx), 
511                                      kdc);
512         if (!NT_STATUS_IS_OK(status)) {
513                 DEBUG(0,("Failed to bind to %s:%u TCP - %s\n",
514                          address, kpasswd_port, nt_errstr(status)));
515                 talloc_free(kdc_socket);
516                 return status;
517         }
518
519         return NT_STATUS_OK;
520 }
521
522
523 /*
524   setup our listening sockets on the configured network interfaces
525 */
526 static NTSTATUS kdc_startup_interfaces(struct kdc_server *kdc, struct loadparm_context *lp_ctx,
527                                        struct interface *ifaces)
528 {
529         int num_interfaces;
530         TALLOC_CTX *tmp_ctx = talloc_new(kdc);
531         NTSTATUS status;
532         int i;
533
534         num_interfaces = iface_count(ifaces);
535         
536         for (i=0; i<num_interfaces; i++) {
537                 const char *address = talloc_strdup(tmp_ctx, iface_n_ip(ifaces, i));
538                 status = kdc_add_socket(kdc, address, lp_krb5_port(lp_ctx), 
539                                         lp_kpasswd_port(lp_ctx));
540                 NT_STATUS_NOT_OK_RETURN(status);
541         }
542
543         talloc_free(tmp_ctx);
544
545         return NT_STATUS_OK;
546 }
547
548 static struct krb5plugin_windc_ftable windc_plugin_table = {
549         .minor_version = KRB5_WINDC_PLUGING_MINOR,
550         .init = samba_kdc_plugin_init,
551         .fini = samba_kdc_plugin_fini,
552         .pac_generate = samba_kdc_get_pac,
553         .pac_verify = samba_kdc_reget_pac,
554         .client_access = samba_kdc_check_client_access,
555 };
556
557
558 /*
559   startup the kdc task
560 */
561 static void kdc_task_init(struct task_server *task)
562 {
563         struct kdc_server *kdc;
564         NTSTATUS status;
565         krb5_error_code ret;
566         struct interface *ifaces;
567
568         switch (lp_server_role(task->lp_ctx)) {
569         case ROLE_STANDALONE:
570                 task_server_terminate(task, "kdc: no KDC required in standalone configuration");
571                 return;
572         case ROLE_DOMAIN_MEMBER:
573                 task_server_terminate(task, "kdc: no KDC required in member server configuration");
574                 return;
575         case ROLE_DOMAIN_CONTROLLER:
576                 /* Yes, we want a KDC */
577                 break;
578         }
579
580         load_interfaces(task, lp_interfaces(task->lp_ctx), &ifaces);
581
582         if (iface_count(ifaces) == 0) {
583                 task_server_terminate(task, "kdc: no network interfaces configured");
584                 return;
585         }
586
587         task_server_set_title(task, "task[kdc]");
588
589         kdc = talloc(task, struct kdc_server);
590         if (kdc == NULL) {
591                 task_server_terminate(task, "kdc: out of memory");
592                 return;
593         }
594
595         kdc->task = task;
596
597         initialize_krb5_error_table();
598
599         ret = smb_krb5_init_context(kdc, task->event_ctx, task->lp_ctx, &kdc->smb_krb5_context);
600         if (ret) {
601                 DEBUG(1,("kdc_task_init: krb5_init_context failed (%s)\n", 
602                          error_message(ret)));
603                 task_server_terminate(task, "kdc: krb5_init_context failed");
604                 return; 
605         }
606
607         krb5_add_et_list(kdc->smb_krb5_context->krb5_context, initialize_hdb_error_table_r);
608
609         ret = krb5_kdc_get_config(kdc->smb_krb5_context->krb5_context, 
610                                   &kdc->config);
611         if(ret) {
612                 task_server_terminate(task, "kdc: failed to get KDC configuration");
613                 return;
614         }
615
616         kdc->config->logf = kdc->smb_krb5_context->logf;
617         kdc->config->db = talloc(kdc, struct HDB *);
618         if (!kdc->config->db) {
619                 task_server_terminate(task, "kdc: out of memory");
620                 return;
621         }
622         kdc->config->num_db = 1;
623                 
624         status = kdc_hdb_ldb_create(kdc, task->event_ctx, task->lp_ctx, 
625                                     kdc->smb_krb5_context->krb5_context, 
626                                     &kdc->config->db[0], NULL);
627         if (!NT_STATUS_IS_OK(status)) {
628                 task_server_terminate(task, "kdc: hdb_ldb_create (setup KDC database) failed");
629                 return; 
630         }
631
632         ret = krb5_kt_register(kdc->smb_krb5_context->krb5_context, &hdb_kt_ops);
633         if(ret) {
634                 task_server_terminate(task, "kdc: failed to register hdb keytab");
635                 return;
636         }
637
638         /* Registar WinDC hooks */
639         ret = krb5_plugin_register(kdc->smb_krb5_context->krb5_context, 
640                                    PLUGIN_TYPE_DATA, "windc",
641                                    &windc_plugin_table);
642         if(ret) {
643                 task_server_terminate(task, "kdc: failed to register hdb keytab");
644                 return;
645         }
646
647         krb5_kdc_windc_init(kdc->smb_krb5_context->krb5_context);
648
649         kdc_mem_ctx = kdc->smb_krb5_context;
650         kdc_lp_ctx = task->lp_ctx;
651
652         /* start listening on the configured network interfaces */
653         status = kdc_startup_interfaces(kdc, task->lp_ctx, ifaces);
654         if (!NT_STATUS_IS_OK(status)) {
655                 task_server_terminate(task, "kdc failed to setup interfaces");
656                 return;
657         }
658
659         irpc_add_name(task->msg_ctx, "kdc_server");
660 }
661
662
663 /* called at smbd startup - register ourselves as a server service */
664 NTSTATUS server_service_kdc_init(void)
665 {
666         return register_server_service("kdc", kdc_task_init);
667 }