diff options
-rw-r--r-- | source4/libnet/libnet_unbecome_dc.c | 12 | ||||
-rw-r--r-- | source4/librpc/idl/drsuapi.idl | 7 |
2 files changed, 12 insertions, 7 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; } diff --git a/source4/librpc/idl/drsuapi.idl b/source4/librpc/idl/drsuapi.idl index 2c5c7ae5ef..5b4132d279 100644 --- a/source4/librpc/idl/drsuapi.idl +++ b/source4/librpc/idl/drsuapi.idl @@ -989,9 +989,10 @@ interface drsuapi WERROR drsuapi_DsRemoveDSServer( [in] policy_handle *bind_handle, - [in,out] int32 level, - [in,switch_is(level)] drsuapi_DsRemoveDSServerRequest req, - [out,switch_is(level)] drsuapi_DsRemoveDSServerResult res + [in] int32 level, + [in,ref,switch_is(level)] drsuapi_DsRemoveDSServerRequest *req, + [out,ref] int32 *level_out, + [out,ref,switch_is(*level_out)] drsuapi_DsRemoveDSServerResult *res ); /*****************/ |