From bc0aa242c5c1aafab2ba9eff953ace2c34bceee4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=BCnther=20Deschner?= Date: Wed, 23 Jan 2013 10:34:12 +0100 Subject: [PATCH] s3-rpc_cli: Support the use of the object_uuid in rpc_cli interfaces Guenther Signed-off-by: Guenther Deschner Reviewed-by: Andreas Schneider --- source3/rpc_client/cli_pipe.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c index f2881569703..5418fbe6e1b 100644 --- a/source3/rpc_client/cli_pipe.c +++ b/source3/rpc_client/cli_pipe.c @@ -1286,6 +1286,7 @@ struct rpc_api_pipe_req_state { uint8_t op_num; uint32_t call_id; const DATA_BLOB *req_data; + const struct GUID *object_uuid; uint32_t req_data_sent; DATA_BLOB req_trailer; uint32_t req_trailer_sent; @@ -1305,6 +1306,7 @@ static struct tevent_req *rpc_api_pipe_req_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, struct rpc_pipe_client *cli, uint8_t op_num, + const struct GUID *object_uuid, const DATA_BLOB *req_data) { struct tevent_req *req, *subreq; @@ -1320,6 +1322,7 @@ static struct tevent_req *rpc_api_pipe_req_send(TALLOC_CTX *mem_ctx, state->ev = ev; state->cli = cli; state->op_num = op_num; + state->object_uuid = object_uuid; state->req_data = req_data; state->req_data_sent = 0; state->call_id = get_rpc_call_id(); @@ -1555,6 +1558,12 @@ static NTSTATUS prepare_next_frag(struct rpc_api_pipe_req_state *state, u.request.context_id = 0; u.request.opnum = state->op_num; + if (state->object_uuid) { + flags |= DCERPC_PFC_FLAG_OBJECT_UUID; + u.request.object.object = *state->object_uuid; + frag_len += ndr_size_GUID(state->object_uuid, 0); + } + status = dcerpc_push_ncacn_packet(state, DCERPC_PKT_REQUEST, flags, @@ -2252,7 +2261,7 @@ static struct tevent_req *rpccli_bh_raw_call_send(TALLOC_CTX *mem_ctx, } subreq = rpc_api_pipe_req_send(state, ev, hs->rpc_cli, - opnum, &state->in_data); + opnum, object, &state->in_data); if (tevent_req_nomem(subreq, req)) { return tevent_req_post(req, ev); } -- 2.11.4.GIT