From 716391f10679e82835f42490e1d8a69af2acad82 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 10 Nov 2007 05:31:26 +0100 Subject: r25921: Now also listen on ldapi by default in the LDAP server Create a phpLDAPadmin configuration file example to use ldapi to talk to Samba4 Andrew Bartlett (This used to be commit 54f4c8ba6127757fd272bd97e301188eb69977ed) --- source4/ldap_server/ldap_server.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'source4/ldap_server') diff --git a/source4/ldap_server/ldap_server.c b/source4/ldap_server/ldap_server.c index a74d002e9b..c165eb698a 100644 --- a/source4/ldap_server/ldap_server.c +++ b/source4/ldap_server/ldap_server.c @@ -509,6 +509,7 @@ static NTSTATUS add_socket(struct event_context *event_context, */ static void ldapsrv_task_init(struct task_server *task) { + char *ldapi_path; struct ldapsrv_service *ldap_service; NTSTATUS status; const struct model_ops *model_ops; @@ -556,6 +557,19 @@ static void ldapsrv_task_init(struct task_server *task) if (!NT_STATUS_IS_OK(status)) goto failed; } + ldapi_path = private_path(ldap_service, global_loadparm, "ldapi"); + if (!ldapi_path) { + goto failed; + } + + status = stream_setup_socket(task->event_ctx, model_ops, &ldap_stream_ops, + "unix", ldapi_path, NULL, ldap_service); + talloc_free(ldapi_path); + if (!NT_STATUS_IS_OK(status)) { + DEBUG(0,("ldapsrv failed to bind to %s - %s\n", + ldapi_path, nt_errstr(status))); + } + return; failed: -- cgit