From: Stefan Metzmacher Date: Thu, 28 May 2026 14:30:19 +0000 (+0200) Subject: libcli/netlogon: add some const to pull_{netlogon_samlogon,nbt_netlogon}_response() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=03fa404dc048d843353c32f3fc8c36b9919d4845;p=thirdparty%2Fsamba.git libcli/netlogon: add some const to pull_{netlogon_samlogon,nbt_netlogon}_response() pull_* functions should use the data blob read-only. Signed-off-by: Stefan Metzmacher Reviewed-by: Andreas Schneider --- diff --git a/libcli/netlogon/netlogon.c b/libcli/netlogon/netlogon.c index 417991ada79..889180fd777 100644 --- a/libcli/netlogon/netlogon.c +++ b/libcli/netlogon/netlogon.c @@ -51,7 +51,7 @@ NTSTATUS push_netlogon_samlogon_response(DATA_BLOB *data, TALLOC_CTX *mem_ctx, return NT_STATUS_OK; } -NTSTATUS pull_netlogon_samlogon_response(DATA_BLOB *data, TALLOC_CTX *mem_ctx, +NTSTATUS pull_netlogon_samlogon_response(const DATA_BLOB *data, TALLOC_CTX *mem_ctx, struct netlogon_samlogon_response *response) { uint32_t ntver; @@ -222,7 +222,7 @@ NTSTATUS push_nbt_netlogon_response(DATA_BLOB *data, TALLOC_CTX *mem_ctx, } -NTSTATUS pull_nbt_netlogon_response(DATA_BLOB *data, TALLOC_CTX *mem_ctx, +NTSTATUS pull_nbt_netlogon_response(const DATA_BLOB *data, TALLOC_CTX *mem_ctx, struct nbt_netlogon_response *response) { NTSTATUS status; diff --git a/libcli/netlogon/netlogon_proto.h b/libcli/netlogon/netlogon_proto.h index ba82c0579a5..d46f331605d 100644 --- a/libcli/netlogon/netlogon_proto.h +++ b/libcli/netlogon/netlogon_proto.h @@ -20,12 +20,12 @@ struct nbt_netlogon_response; NTSTATUS push_netlogon_samlogon_response(DATA_BLOB *data, TALLOC_CTX *mem_ctx, struct netlogon_samlogon_response *response); -NTSTATUS pull_netlogon_samlogon_response(DATA_BLOB *data, TALLOC_CTX *mem_ctx, +NTSTATUS pull_netlogon_samlogon_response(const DATA_BLOB *data, TALLOC_CTX *mem_ctx, struct netlogon_samlogon_response *response); void map_netlogon_samlogon_response(struct netlogon_samlogon_response *response); NTSTATUS push_nbt_netlogon_response(DATA_BLOB *data, TALLOC_CTX *mem_ctx, struct nbt_netlogon_response *response); -NTSTATUS pull_nbt_netlogon_response(DATA_BLOB *data, TALLOC_CTX *mem_ctx, +NTSTATUS pull_nbt_netlogon_response(const DATA_BLOB *data, TALLOC_CTX *mem_ctx, struct nbt_netlogon_response *response); #undef _PRINTF_ATTRIBUTE #define _PRINTF_ATTRIBUTE(a1, a2)