summaryrefslogtreecommitdiff
path: root/source4/libnet
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libnet')
-rw-r--r--source4/libnet/libnet_unbecome_dc.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/source4/libnet/libnet_unbecome_dc.c b/source4/libnet/libnet_unbecome_dc.c
index 2ee3c641b2..79c6dc0fc1 100644
--- a/source4/libnet/libnet_unbecome_dc.c
+++ b/source4/libnet/libnet_unbecome_dc.c
@@ -639,9 +639,13 @@ static void unbecomeDC_drsuapi_remove_ds_server_send(struct libnet_UnbecomeDC_st
r->in.bind_handle = &s->drsuapi.bind_handle;
r->in.level = 1;
- r->in.req.req1.server_dn= s->dest_dsa.server_dn_str;
- r->in.req.req1.domain_dn= s->domain.dn_str;
- r->in.req.req1.commit = true;
+ r->in.req = talloc(s, union drsuapi_DsRemoveDSServerRequest);
+ r->in.req->req1.server_dn = s->dest_dsa.server_dn_str;
+ r->in.req->req1.domain_dn = s->domain.dn_str;
+ r->in.req->req1.commit = true;
+
+ r->out.level_out = talloc(s, int32_t);
+ r->out.res = talloc(s, union drsuapi_DsRemoveDSServerResult);
req = dcerpc_drsuapi_DsRemoveDSServer_send(s->drsuapi.pipe, s, r);
composite_continue_rpc(c, req, unbecomeDC_drsuapi_remove_ds_server_recv, s);
@@ -662,7 +666,7 @@ static void unbecomeDC_drsuapi_remove_ds_server_recv(struct rpc_request *req)
return;
}
- if (r->out.level != 1) {
+ if (*r->out.level_out != 1) {
composite_error(c, NT_STATUS_INVALID_NETWORK_RESPONSE);
return;
}