From 08402526704c6d586febadf401959bc3d8661836 Mon Sep 17 00:00:00 2001 From: Gary Lockyer Date: Mon, 18 Sep 2017 13:05:24 +1200 Subject: 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 Reviewed-by: Andrew Bartlett Reviewed-by: Garming Sam --- source4/ldap_server/ldap_server.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'source4/ldap_server') diff --git a/source4/ldap_server/ldap_server.c b/source4/ldap_server/ldap_server.c index d12c4e70e02..5f7efe90bba 100644 --- a/source4/ldap_server/ldap_server.c +++ b/source4/ldap_server/ldap_server.c @@ -1112,7 +1112,6 @@ static void ldapsrv_task_init(struct task_server *task) const char *dns_host_name; struct ldapsrv_service *ldap_service; NTSTATUS status; - const struct model_ops *model_ops; switch (lpcfg_server_role(task->lp_ctx)) { case ROLE_STANDALONE: @@ -1130,13 +1129,6 @@ static void ldapsrv_task_init(struct task_server *task) task_server_set_title(task, "task[ldapsrv]"); - /* - * Here we used to run the ldap server as a single process, - * but we don't want transaction locks for one task in a write - * blocking all other reads, so we go multi-process. - */ - model_ops = task->model_ops; - ldap_service = talloc_zero(task, struct ldapsrv_service); if (ldap_service == NULL) goto failed; @@ -1180,7 +1172,8 @@ static void ldapsrv_task_init(struct task_server *task) */ for(i = 0; i < num_interfaces; i++) { const char *address = iface_list_n_ip(ifaces, i); - status = add_socket(task, task->lp_ctx, model_ops, address, ldap_service); + status = add_socket(task, task->lp_ctx, task->model_ops, + address, ldap_service); if (!NT_STATUS_IS_OK(status)) goto failed; } } else { @@ -1193,7 +1186,8 @@ static void ldapsrv_task_init(struct task_server *task) goto failed; } for (i=0; wcard[i]; i++) { - status = add_socket(task, task->lp_ctx, model_ops, wcard[i], ldap_service); + status = add_socket(task, task->lp_ctx, task->model_ops, + wcard[i], ldap_service); if (NT_STATUS_IS_OK(status)) { num_binds++; } @@ -1210,7 +1204,7 @@ static void ldapsrv_task_init(struct task_server *task) } status = stream_setup_socket(task, task->event_ctx, task->lp_ctx, - model_ops, &ldap_stream_nonpriv_ops, + task->model_ops, &ldap_stream_nonpriv_ops, "unix", ldapi_path, NULL, lpcfg_socket_options(task->lp_ctx), ldap_service, task->process_context); @@ -1241,7 +1235,7 @@ static void ldapsrv_task_init(struct task_server *task) } status = stream_setup_socket(task, task->event_ctx, task->lp_ctx, - model_ops, &ldap_stream_priv_ops, + task->model_ops, &ldap_stream_priv_ops, "unix", ldapi_path, NULL, lpcfg_socket_options(task->lp_ctx), ldap_service, -- cgit v1.2.1