]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:librpc/rpc: implement dcerpc_bh_get_binding()
authorStefan Metzmacher <metze@samba.org>
Tue, 17 Sep 2024 18:55:35 +0000 (20:55 +0200)
committerRalph Boehme <slow@samba.org>
Thu, 26 Sep 2024 15:22:45 +0000 (15:22 +0000)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source4/librpc/rpc/dcerpc.c

index 6600febf068feb4a5ad5168f72a9887aecc00f38..feacdcb2f59188851e763a56c6a259c73d481678 100644 (file)
@@ -176,6 +176,14 @@ struct dcerpc_bh_state {
        struct dcerpc_pipe *p;
 };
 
+static const struct dcerpc_binding *dcerpc_bh_get_binding(struct dcerpc_binding_handle *h)
+{
+       struct dcerpc_bh_state *hs = dcerpc_binding_handle_data(h,
+                                    struct dcerpc_bh_state);
+
+       return hs->p->binding;
+}
+
 static bool dcerpc_bh_is_connected(struct dcerpc_binding_handle *h)
 {
        struct dcerpc_bh_state *hs = dcerpc_binding_handle_data(h,
@@ -692,6 +700,7 @@ static NTSTATUS dcerpc_bh_ndr_validate_out(struct dcerpc_binding_handle *h,
 
 static const struct dcerpc_binding_handle_ops dcerpc_bh_ops = {
        .name                   = "dcerpc",
+       .get_binding            = dcerpc_bh_get_binding,
        .is_connected           = dcerpc_bh_is_connected,
        .set_timeout            = dcerpc_bh_set_timeout,
        .transport_encrypted    = dcerpc_bh_transport_encrypted,