s3:rpc_client: pass struct rpc_pipe_client to check_bind_response()
authorStefan Metzmacher <metze@samba.org>
Thu, 18 Apr 2024 23:15:52 +0000 (01:15 +0200)
committerStefan Metzmacher <metze@samba.org>
Tue, 23 Apr 2024 16:23:38 +0000 (16:23 +0000)
This prepares adding bind time feature negotiation in the next commits.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source3/rpc_client/cli_pipe.c

index b4289e9d35d7070897b5a8f5d6bd6b4a94dc1cca..4666bac6e49a446f8c2ea564fcf24cb8c3d08874 100644 (file)
@@ -1656,8 +1656,9 @@ static NTSTATUS rpc_api_pipe_req_recv(struct tevent_req *req, TALLOC_CTX *mem_ct
 ****************************************************************************/
 
 static bool check_bind_response(const struct dcerpc_bind_ack *r,
-                               const struct ndr_syntax_id *transfer)
+                               struct rpc_pipe_client *cli)
 {
+       const struct ndr_syntax_id *transfer = &cli->transfer_syntax;
        struct dcerpc_ack_ctx ctx;
        bool equal;
 
@@ -1866,7 +1867,7 @@ static void rpc_pipe_bind_step_one_done(struct tevent_req *subreq)
                return;
        }
 
-       if (!check_bind_response(&pkt->u.bind_ack, &state->cli->transfer_syntax)) {
+       if (!check_bind_response(&pkt->u.bind_ack, state->cli)) {
                DEBUG(2, ("rpc_pipe_bind: check_bind_response failed.\n"));
                tevent_req_nterror(req, NT_STATUS_BUFFER_TOO_SMALL);
                return;