mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
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>
This commit is contained in:
parent
55b07e1dec
commit
4dd06fb721
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user