summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/cldap_server/cldap_server.c2
-rw-r--r--source4/cldap_server/rootdse.c5
2 files changed, 5 insertions, 2 deletions
diff --git a/source4/cldap_server/cldap_server.c b/source4/cldap_server/cldap_server.c
index 53b7570c6a..774142e2ea 100644
--- a/source4/cldap_server/cldap_server.c
+++ b/source4/cldap_server/cldap_server.c
@@ -213,8 +213,6 @@ static void cldapd_task_init(struct task_server *task)
return;
}
- /* FIXME: set ldb opaque remoteAddress here */
-
/* start listening on the configured network interfaces */
status = cldapd_startup_interfaces(cldapd, task->lp_ctx, ifaces);
if (!NT_STATUS_IS_OK(status)) {
diff --git a/source4/cldap_server/rootdse.c b/source4/cldap_server/rootdse.c
index b8956169d2..3f389ce822 100644
--- a/source4/cldap_server/rootdse.c
+++ b/source4/cldap_server/rootdse.c
@@ -158,6 +158,11 @@ void cldapd_rootdse_request(struct cldap_socket *cldap,
reply.response = NULL;
reply.result = &result;
+ /* Note: The remoteAddress should rather be set on a ldb request.
+ * We can set this savely on the context here,
+ * since cldapd_rootdse_fill operates synchronously. */
+ ldb_set_opaque(cldapd->samctx, "remoteAddress", src);
+
cldapd_rootdse_fill(cldapd, tmp_ctx, search, &reply.response,
reply.result);