]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:rpcclient: make use of dcerpc_binding_handle_get_transport()
authorStefan Metzmacher <metze@samba.org>
Thu, 19 Sep 2024 07:20:03 +0000 (09:20 +0200)
committerJule Anger <janger@samba.org>
Thu, 12 Jun 2025 11:27:15 +0000 (11:27 +0000)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit e5c09e041d1517649616d0d4b072422802a69f08)

source3/rpcclient/rpcclient.c

index 6df33e04278c41497fa9976a87d641825a1002d8..95b6baf32b031fbf2122666bee4bc885cc1c9d67 100644 (file)
@@ -396,13 +396,17 @@ static NTSTATUS cmd_set_transport(struct dcerpc_binding *b)
                struct cmd_set *tmp_set;
 
                for (tmp_set = tmp->cmd_set; tmp_set->name; tmp_set++) {
+                       struct dcerpc_binding_handle *tmp_b = NULL;
+                       enum dcerpc_transport_t tmp_t;
+
                        if (tmp_set->rpc_pipe == NULL) {
                                continue;
                        }
 
-                       if (tmp_set->rpc_pipe->transport->transport != t) {
+                       tmp_b = tmp_set->rpc_pipe->binding_handle;
+                       tmp_t = dcerpc_binding_handle_get_transport(tmp_b);
+                       if (tmp_t != t) {
                                TALLOC_FREE(tmp_set->rpc_pipe);
-                               tmp_set->rpc_pipe = NULL;
                        }
                }
        }