diff --git a/source4/libnet/libnet_become_dc.c b/source4/libnet/libnet_become_dc.c index 876ae6162a3..f7da0cc777d 100644 --- a/source4/libnet/libnet_become_dc.c +++ b/source4/libnet/libnet_become_dc.c @@ -2303,6 +2303,7 @@ static void becomeDC_drsuapi1_add_entry_recv(struct tevent_req *subreq) struct composite_context *c = s->creq; struct drsuapi_DsAddEntry *r = talloc_get_type_abort(s->ndr_struct_ptr, struct drsuapi_DsAddEntry); + const struct dcerpc_binding *bd1 = NULL; char *binding_str; uint32_t assoc_group_id; @@ -2493,7 +2494,8 @@ static void becomeDC_drsuapi1_add_entry_recv(struct tevent_req *subreq) } /* w2k3 uses the same assoc_group_id as on the first connection, so we do */ - assoc_group_id = dcerpc_binding_get_assoc_group_id(s->drsuapi1.pipe->binding); + bd1 = dcerpc_binding_handle_get_binding(s->drsuapi1.pipe->binding_handle); + assoc_group_id = dcerpc_binding_get_assoc_group_id(bd1); c->status = dcerpc_binding_set_assoc_group_id(s->drsuapi2.binding, assoc_group_id); if (!composite_is_ok(c)) return; @@ -2541,6 +2543,7 @@ static void becomeDC_drsuapi2_bind_recv(struct tevent_req *subreq) struct libnet_BecomeDC_state *s = tevent_req_callback_data(subreq, struct libnet_BecomeDC_state); struct composite_context *c = s->creq; + const struct dcerpc_binding *bd1 = NULL; char *binding_str; uint32_t assoc_group_id; WERROR status; @@ -2571,7 +2574,8 @@ static void becomeDC_drsuapi2_bind_recv(struct tevent_req *subreq) } /* w2k3 uses the same assoc_group_id as on the first connection, so we do */ - assoc_group_id = dcerpc_binding_get_assoc_group_id(s->drsuapi1.pipe->binding); + bd1 = dcerpc_binding_handle_get_binding(s->drsuapi1.pipe->binding_handle); + assoc_group_id = dcerpc_binding_get_assoc_group_id(bd1); c->status = dcerpc_binding_set_assoc_group_id(s->drsuapi3.binding, assoc_group_id); if (!composite_is_ok(c)) return; /* w2k3 uses the concurrent multiplex feature on the 3rd connection, so we do */ diff --git a/source4/libnet/libnet_join.c b/source4/libnet/libnet_join.c index e3d5e72fea1..cc8a4f0e9d1 100644 --- a/source4/libnet/libnet_join.c +++ b/source4/libnet/libnet_join.c @@ -903,7 +903,8 @@ NTSTATUS libnet_JoinDomain(struct libnet_context *ctx, TALLOC_CTX *mem_ctx, stru talloc_steal(mem_ctx, r->out.realm); r->out.samr_pipe = samr_pipe; talloc_reparent(tmp_ctx, mem_ctx, samr_pipe); - r->out.samr_binding = samr_pipe->binding; + r->out.samr_binding = + dcerpc_binding_handle_get_binding(samr_pipe->binding_handle); r->out.user_handle = u_handle; talloc_steal(mem_ctx, u_handle); r->out.error_string = r2.samr_handle.out.error_string; diff --git a/source4/libnet/libnet_rpc.c b/source4/libnet/libnet_rpc.c index 91c538fa58c..18805172092 100644 --- a/source4/libnet/libnet_rpc.c +++ b/source4/libnet/libnet_rpc.c @@ -151,7 +151,10 @@ static void continue_pipe_connect(struct composite_context *ctx) if (s->monitor_fn) { struct monitor_msg msg; struct msg_net_rpc_connect data; - const struct dcerpc_binding *b = s->r.out.dcerpc_pipe->binding; + struct dcerpc_binding_handle *bh = + s->r.out.dcerpc_pipe->binding_handle; + const struct dcerpc_binding *b = + dcerpc_binding_handle_get_binding(bh); /* prepare monitor message and post it */ data.host = dcerpc_binding_get_string_option(b, "host"); @@ -367,7 +370,10 @@ static void continue_rpc_connect(struct composite_context *ctx) if (s->monitor_fn) { struct monitor_msg msg; struct msg_net_rpc_connect data; - const struct dcerpc_binding *b = s->r.out.dcerpc_pipe->binding; + struct dcerpc_binding_handle *bh = + s->r.out.dcerpc_pipe->binding_handle; + const struct dcerpc_binding *b = + dcerpc_binding_handle_get_binding(bh); data.host = dcerpc_binding_get_string_option(b, "host"); data.endpoint = dcerpc_binding_get_string_option(b, "endpoint"); @@ -550,7 +556,10 @@ static void continue_dci_rpc_connect(struct composite_context *ctx) if (s->monitor_fn) { struct monitor_msg msg; struct msg_net_rpc_connect data; - const struct dcerpc_binding *b = s->r.out.dcerpc_pipe->binding; + struct dcerpc_binding_handle *bh = + s->r.out.dcerpc_pipe->binding_handle; + const struct dcerpc_binding *b = + dcerpc_binding_handle_get_binding(bh); data.host = dcerpc_binding_get_string_option(b, "host"); data.endpoint = dcerpc_binding_get_string_option(b, "endpoint"); @@ -784,11 +793,13 @@ static void continue_epm_map_binding_send(struct composite_context *c) struct rpc_connect_dci_state *s; struct composite_context *epm_map_req; struct cli_credentials *epm_creds = NULL; + const struct dcerpc_binding *b = NULL; s = talloc_get_type(c->private_data, struct rpc_connect_dci_state); /* prepare to get endpoint mapping for the requested interface */ - s->final_binding = dcerpc_binding_dup(s, s->lsa_pipe->binding); + b = dcerpc_binding_handle_get_binding(s->lsa_pipe->binding_handle); + s->final_binding = dcerpc_binding_dup(s, b); if (composite_nomem(s->final_binding, c)) return; /* @@ -871,7 +882,10 @@ static void continue_secondary_conn(struct composite_context *ctx) if (s->monitor_fn) { struct monitor_msg msg; struct msg_net_rpc_connect data; - const struct dcerpc_binding *b = s->r.out.dcerpc_pipe->binding; + struct dcerpc_binding_handle *bh = + s->r.out.dcerpc_pipe->binding_handle; + const struct dcerpc_binding *b = + dcerpc_binding_handle_get_binding(bh); /* prepare monitor message and post it */ data.host = dcerpc_binding_get_string_option(b, "host");