summaryrefslogtreecommitdiff
path: root/librpc
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2016-09-24 00:22:12 +0200
committerAndreas Schneider <asn@cryptomilk.org>2016-10-26 11:20:18 +0200
commit4dd06fb721940ff2c7efab361da91de2fb40891f (patch)
tree818b60752d20f76732a425c4ccb385c4b362f8b2 /librpc
parent55b07e1dec23ba18f072127540d82ba9e4f6218a (diff)
downloadsamba-4dd06fb721940ff2c7efab361da91de2fb40891f.tar.gz
librpc/rpc: make sure we use the object from the handle in dcerpc_binding_handle_raw_call_send()
If there's an object set on the binding handle, we need to use that and disallow per request passing of object. The normal client code will always have the object on the binding handle. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'librpc')
-rw-r--r--librpc/rpc/binding_handle.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/librpc/rpc/binding_handle.c b/librpc/rpc/binding_handle.c
index f5e043d382d..4c9469515e3 100644
--- a/librpc/rpc/binding_handle.c
+++ b/librpc/rpc/binding_handle.c
@@ -155,6 +155,22 @@ struct tevent_req *dcerpc_binding_handle_raw_call_send(TALLOC_CTX *mem_ctx,
state->out_length = 0;
state->out_flags = 0;
+ if (h->object != NULL) {
+ /*
+ * If an object is set on the binding handle,
+ * per request object passing is not allowed.
+ */
+ if (object != NULL) {
+ tevent_req_nterror(req, NT_STATUS_INVALID_HANDLE);
+ return tevent_req_post(req, ev);
+ }
+
+ /*
+ * We use the object from the binding handle
+ */
+ object = h->object;
+ }
+
subreq = state->ops->raw_call_send(state, ev, h,
object, opnum,
in_flags, in_data, in_length);