diff options
author | Günther Deschner <gd@samba.org> | 2013-01-23 10:34:12 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2016-11-24 20:24:26 +0100 |
commit | bc0aa242c5c1aafab2ba9eff953ace2c34bceee4 (patch) | |
tree | c55a42c459a364ef5dc877e3e0a77f5b73e2cd2e /source3/rpc_client | |
parent | 60fd6a324b1b98a02674b8afe36277359bdb5893 (diff) | |
download | samba-bc0aa242c5c1aafab2ba9eff953ace2c34bceee4.tar.gz |
s3-rpc_cli: Support the use of the object_uuid in rpc_cli interfaces
Guenther
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source3/rpc_client')
-rw-r--r-- | source3/rpc_client/cli_pipe.c | 11 |
1 files changed, 10 insertions, 1 deletions
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); } |