summaryrefslogtreecommitdiff
path: root/source4/kdc
diff options
context:
space:
mode:
authorGary Lockyer <gary@catalyst.net.nz>2017-09-18 13:05:24 +1200
committerAndrew Bartlett <abartlet@samba.org>2017-10-19 05:33:10 +0200
commit08402526704c6d586febadf401959bc3d8661836 (patch)
tree2ef36fcacab16df9d7a9c3aef1b18e7643a97cc8 /source4/kdc
parent62d7bf9e0ae94baaaa090051bd6b7cb40e5ef3c3 (diff)
downloadsamba-08402526704c6d586febadf401959bc3d8661836.tar.gz
source4/smbd: Do not overstamp the process model with "single"
Instead, except in RPC which is a special SNOWFLAKE, we rely on the struct service_details in the init function. Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Diffstat (limited to 'source4/kdc')
-rw-r--r--source4/kdc/kdc-heimdal.c19
-rw-r--r--source4/kdc/kdc-service-mit.c6
2 files changed, 6 insertions, 19 deletions
diff --git a/source4/kdc/kdc-heimdal.c b/source4/kdc/kdc-heimdal.c
index 788959a737a..fcc1eb02edf 100644
--- a/source4/kdc/kdc-heimdal.c
+++ b/source4/kdc/kdc-heimdal.c
@@ -110,10 +110,11 @@ static kdc_code kdc_process(struct kdc_server *kdc,
/*
setup our listening sockets on the configured network interfaces
*/
-static NTSTATUS kdc_startup_interfaces(struct kdc_server *kdc, struct loadparm_context *lp_ctx,
- struct interface *ifaces)
+static NTSTATUS kdc_startup_interfaces(struct kdc_server *kdc,
+ struct loadparm_context *lp_ctx,
+ struct interface *ifaces,
+ const struct model_ops *model_ops)
{
- const struct model_ops *model_ops;
int num_interfaces;
TALLOC_CTX *tmp_ctx = talloc_new(kdc);
NTSTATUS status;
@@ -122,15 +123,6 @@ static NTSTATUS kdc_startup_interfaces(struct kdc_server *kdc, struct loadparm_c
uint16_t kpasswd_port = lpcfg_kpasswd_port(lp_ctx);
bool done_wildcard = false;
- /* within the kdc task we want to be a single process, so
- ask for the single process model ops and pass these to the
- stream_setup_socket() call. */
- model_ops = process_model_startup("single");
- if (!model_ops) {
- DEBUG(0,("Can't find 'single' process model_ops\n"));
- return NT_STATUS_INTERNAL_ERROR;
- }
-
num_interfaces = iface_list_count(ifaces);
/* if we are allowing incoming packets from any address, then
@@ -448,7 +440,8 @@ static void kdc_task_init(struct task_server *task)
kdc->private_data = kdc_config;
/* start listening on the configured network interfaces */
- status = kdc_startup_interfaces(kdc, task->lp_ctx, ifaces);
+ status = kdc_startup_interfaces(kdc, task->lp_ctx, ifaces,
+ task->model_ops);
if (!NT_STATUS_IS_OK(status)) {
task_server_terminate(task, "kdc failed to setup interfaces", true);
return;
diff --git a/source4/kdc/kdc-service-mit.c b/source4/kdc/kdc-service-mit.c
index d48b0328882..53997d5473d 100644
--- a/source4/kdc/kdc-service-mit.c
+++ b/source4/kdc/kdc-service-mit.c
@@ -72,12 +72,6 @@ static NTSTATUS startup_kpasswd_server(TALLOC_CTX *mem_ctx,
return NT_STATUS_OK;
}
- model_ops = process_model_startup("single");
- if (model_ops == NULL) {
- DBG_ERR("Can't find 'single' process model_ops\n");
- return NT_STATUS_INTERNAL_ERROR;
- }
-
tmp_ctx = talloc_named_const(mem_ctx, 0, "kpasswd");
if (tmp_ctx == NULL) {
return NT_STATUS_NO_MEMORY;