From 1cca9d6dce94f35e8efc17426ea0bf5f77a3ec3d Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 21 Feb 2017 14:15:05 +1300 Subject: s4-ldap_server: Set remote and local address values into GENSEC This will allow channel bindings and logging of the address values used during authentication Signed-off-by: Andrew Bartlett Pair-Programmed-by: Gary Lockyer Signed-off-by: Gary Lockyer --- source4/ldap_server/ldap_bind.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'source4/ldap_server') diff --git a/source4/ldap_server/ldap_bind.c b/source4/ldap_server/ldap_bind.c index 83623155a4e..332bad3224e 100644 --- a/source4/ldap_server/ldap_bind.c +++ b/source4/ldap_server/ldap_bind.c @@ -199,6 +199,18 @@ static NTSTATUS ldapsrv_setup_gensec(struct ldapsrv_connection *conn, return status; } + status = gensec_set_remote_address(gensec_security, + conn->connection->remote_address); + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + status = gensec_set_local_address(gensec_security, + conn->connection->local_address); + if (!NT_STATUS_IS_OK(status)) { + return status; + } + gensec_want_feature(gensec_security, GENSEC_FEATURE_ASYNC_REPLIES); gensec_want_feature(gensec_security, GENSEC_FEATURE_LDAP_STYLE); -- cgit v1.2.1