1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-29 15:42:04 +03:00

ldap: Run the LDAP server with the default (typically standard) process model

This allows one LDAP socket to proceed if another fails, and reduces the
impact of a crash becoming a DoS bug, as it only impacts one socket.

This may mean we have a lot of idle tasks, but this should not be a big
issue

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
Andrew Bartlett
2016-10-17 13:55:42 +13:00
committed by Stefan Metzmacher
parent 5ec724687e
commit f4ce77857b

View File

@ -1121,9 +1121,12 @@ static void ldapsrv_task_init(struct task_server *task)
task_server_set_title(task, "task[ldapsrv]");
/* run the ldap server as a single process */
model_ops = process_model_startup("single");
if (!model_ops) goto failed;
/*
* 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;