#include "kdc/pac-glue.h"
#include "dsdb/samdb/samdb.h"
#include "auth/session.h"
+#include "libds/common/roles.h"
NTSTATUS server_service_kdc_init(void);
{
struct kdc_udp_call *call = tevent_req_callback_data(subreq,
struct kdc_udp_call);
- ssize_t ret;
int sys_errno;
- ret = tdgram_sendto_queue_recv(subreq, &sys_errno);
+ tdgram_sendto_queue_recv(subreq, &sys_errno);
/* We don't care about errors */
/* if we are allowing incoming packets from any address, then
we need to bind to the wildcard address */
if (!lpcfg_bind_interfaces_only(lp_ctx)) {
- const char **wcard = iface_list_wildcard(kdc, lp_ctx);
+ int num_binds = 0;
+ char **wcard = iface_list_wildcard(kdc);
NT_STATUS_HAVE_NO_MEMORY(wcard);
for (i=0; wcard[i]; i++) {
if (kdc_port) {
status = kdc_add_socket(kdc, model_ops,
"kdc", wcard[i], kdc_port,
kdc_process, false);
- NT_STATUS_NOT_OK_RETURN(status);
+ if (NT_STATUS_IS_OK(status)) {
+ num_binds++;
+ }
}
if (kpasswd_port) {
status = kdc_add_socket(kdc, model_ops,
"kpasswd", wcard[i], kpasswd_port,
kpasswdd_process, false);
- NT_STATUS_NOT_OK_RETURN(status);
+ if (NT_STATUS_IS_OK(status)) {
+ num_binds++;
+ }
}
}
talloc_free(wcard);
+ if (num_binds == 0) {
+ return NT_STATUS_INVALID_PARAMETER_MIX;
+ }
done_wildcard = true;
}
initialize_krb5_error_table();
- ret = smb_krb5_init_context(kdc, task->event_ctx, task->lp_ctx, &kdc->smb_krb5_context);
+ ret = smb_krb5_init_context(kdc, task->lp_ctx, &kdc->smb_krb5_context);
if (ret) {
DEBUG(1,("kdc_task_init: krb5_init_context failed (%s)\n",
error_message(ret)));