diff options
author | Gary Lockyer <gary@catalyst.net.nz> | 2017-09-18 13:05:24 +1200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2017-10-19 05:33:10 +0200 |
commit | 08402526704c6d586febadf401959bc3d8661836 (patch) | |
tree | 2ef36fcacab16df9d7a9c3aef1b18e7643a97cc8 /source4/ldap_server | |
parent | 62d7bf9e0ae94baaaa090051bd6b7cb40e5ef3c3 (diff) | |
download | samba-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/ldap_server')
-rw-r--r-- | source4/ldap_server/ldap_server.c | 18 |
1 files changed, 6 insertions, 12 deletions
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, |