From 39c4e8045529c8dce091640041c4bf7d26327237 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 1 Nov 2024 12:44:42 +0100 Subject: [PATCH] libcli: Remove two unused functions Signed-off-by: Volker Lendecke Reviewed-by: Stefan Metzmacher --- libcli/cldap/cldap.c | 70 -------------------------------------------- libcli/cldap/cldap.h | 9 ------ 2 files changed, 79 deletions(-) diff --git a/libcli/cldap/cldap.c b/libcli/cldap/cldap.c index d6a9bec47e1..0104fde9d51 100644 --- a/libcli/cldap/cldap.c +++ b/libcli/cldap/cldap.c @@ -898,30 +898,6 @@ NTSTATUS cldap_search(struct cldap_socket *cldap, return NT_STATUS_OK; } -/* - send an empty reply (used on any error, so the client doesn't keep waiting - or send the bad request again) -*/ -NTSTATUS cldap_empty_reply(struct cldap_socket *cldap, - uint32_t message_id, - struct tsocket_address *dest) -{ - NTSTATUS status; - struct cldap_reply reply; - struct ldap_Result result; - - reply.messageid = message_id; - reply.dest = dest; - reply.response = NULL; - reply.result = &result; - - ZERO_STRUCT(result); - - status = cldap_reply_send(cldap, &reply); - - return status; -} - /* send an error reply (used on any error, so the client doesn't keep waiting or send the bad request again) @@ -949,49 +925,3 @@ NTSTATUS cldap_error_reply(struct cldap_socket *cldap, return status; } - - -/* - send a netlogon reply -*/ -NTSTATUS cldap_netlogon_reply(struct cldap_socket *cldap, - uint32_t message_id, - struct tsocket_address *dest, - uint32_t version, - struct netlogon_samlogon_response *netlogon) -{ - NTSTATUS status; - struct cldap_reply reply; - struct ldap_SearchResEntry response; - struct ldap_Result result; - TALLOC_CTX *tmp_ctx = talloc_new(cldap); - DATA_BLOB blob; - - status = push_netlogon_samlogon_response(&blob, tmp_ctx, - netlogon); - if (!NT_STATUS_IS_OK(status)) { - talloc_free(tmp_ctx); - return status; - } - reply.messageid = message_id; - reply.dest = dest; - reply.response = &response; - reply.result = &result; - - ZERO_STRUCT(result); - - response.dn = ""; - response.num_attributes = 1; - response.attributes = talloc(tmp_ctx, struct ldb_message_element); - NT_STATUS_HAVE_NO_MEMORY(response.attributes); - response.attributes->name = "netlogon"; - response.attributes->num_values = 1; - response.attributes->values = &blob; - - status = cldap_reply_send(cldap, &reply); - - talloc_free(tmp_ctx); - - return status; -} - diff --git a/libcli/cldap/cldap.h b/libcli/cldap/cldap.h index 8c664ffaa61..97b8e2bb864 100644 --- a/libcli/cldap/cldap.h +++ b/libcli/cldap/cldap.h @@ -83,17 +83,8 @@ struct cldap_reply { NTSTATUS cldap_reply_send(struct cldap_socket *cldap, struct cldap_reply *io); -NTSTATUS cldap_empty_reply(struct cldap_socket *cldap, - uint32_t message_id, - struct tsocket_address *dst); NTSTATUS cldap_error_reply(struct cldap_socket *cldap, uint32_t message_id, struct tsocket_address *dst, int resultcode, const char *errormessage); - -NTSTATUS cldap_netlogon_reply(struct cldap_socket *cldap, - uint32_t message_id, - struct tsocket_address *dst, - uint32_t version, - struct netlogon_samlogon_response *netlogon); -- 2.47.2