From 5b957f816c8647c6423926ee47243ff0bb1e09e5 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 21 May 2019 15:42:39 +1200 Subject: [PATCH] libcli/ldap: Remove unsued ldap_transaction() This is unsued since a87dea2a0894015cf4a3140995791f5468c40038 in 2007 when we moved to using LDB for LDAP in this area of the code. Signed-off-by: Andrew Bartlett Reviewed-by: Gary Lockyer --- source4/libcli/ldap/ldap_client.c | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/source4/libcli/ldap/ldap_client.c b/source4/libcli/ldap/ldap_client.c index 1cbcd0d42d5..da84adc7769 100644 --- a/source4/libcli/ldap/ldap_client.c +++ b/source4/libcli/ldap/ldap_client.c @@ -1026,26 +1026,3 @@ _PUBLIC_ NTSTATUS ldap_result_one(struct ldap_request *req, struct ldap_message } return status; } - -/* - a simple ldap transaction, for single result requests that only need a status code - this relies on single valued requests having the response type == request type + 1 -*/ -_PUBLIC_ NTSTATUS ldap_transaction(struct ldap_connection *conn, struct ldap_message *msg) -{ - struct ldap_request *req = ldap_request_send(conn, msg); - struct ldap_message *res; - NTSTATUS status; - status = ldap_result_n(req, 0, &res); - if (!NT_STATUS_IS_OK(status)) { - talloc_free(req); - return status; - } - if (res->type != msg->type + 1) { - talloc_free(req); - return NT_STATUS_LDAP(LDAP_PROTOCOL_ERROR); - } - status = ldap_check_response(conn, &res->r.GeneralResult); - talloc_free(req); - return status; -} -- 2.47.3