summaryrefslogtreecommitdiff
path: root/source4/ldap_server
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2007-11-10 05:31:26 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:45:03 +0100
commit716391f10679e82835f42490e1d8a69af2acad82 (patch)
tree367dd0ceef02811d8110fc967970db3edf17a553 /source4/ldap_server
parent529763a9aa192a6785ba878aceeb1683c2510913 (diff)
downloadsamba-716391f10679e82835f42490e1d8a69af2acad82.tar.gz
samba-716391f10679e82835f42490e1d8a69af2acad82.tar.bz2
samba-716391f10679e82835f42490e1d8a69af2acad82.zip
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)
Diffstat (limited to 'source4/ldap_server')
-rw-r--r--source4/ldap_server/ldap_server.c14
1 files changed, 14 insertions, 0 deletions
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: