diff options
author | Stefan Metzmacher <metze@samba.org> | 2016-09-24 00:22:41 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2016-10-26 11:20:18 +0200 |
commit | b5abc7cadc48146576da3187437ca3486da05c3d (patch) | |
tree | 4b1ca83a20017e4b064507f95febcbc4dfc6a438 /source4/librpc/rpc/dcerpc_auth.c | |
parent | 47d89002a4c30e50e3efaced689dd87edbbafa9a (diff) | |
download | samba-b5abc7cadc48146576da3187437ca3486da05c3d.tar.gz |
s4:librpc/rpc: pass the object guid to the binding handle if required
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source4/librpc/rpc/dcerpc_auth.c')
-rw-r--r-- | source4/librpc/rpc/dcerpc_auth.c | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/source4/librpc/rpc/dcerpc_auth.c b/source4/librpc/rpc/dcerpc_auth.c index c902d6e5259..08578c9adcf 100644 --- a/source4/librpc/rpc/dcerpc_auth.c +++ b/source4/librpc/rpc/dcerpc_auth.c @@ -32,15 +32,27 @@ /* return the rpc syntax and transfer syntax given the pipe uuid and version */ -static NTSTATUS dcerpc_init_syntaxes(const struct ndr_interface_table *table, - uint32_t pipe_flags, +static NTSTATUS dcerpc_init_syntaxes(struct dcerpc_pipe *p, + const struct ndr_interface_table *table, struct ndr_syntax_id *syntax, struct ndr_syntax_id *transfer_syntax) { + struct GUID *object = NULL; + + p->object = dcerpc_binding_get_object(p->binding); + if (!GUID_all_zero(&p->object)) { + object = &p->object; + } + + p->binding_handle = dcerpc_pipe_binding_handle(p, object, table); + if (p->binding_handle == NULL) { + return NT_STATUS_NO_MEMORY; + } + syntax->uuid = table->syntax_id.uuid; syntax->if_version = table->syntax_id.if_version; - if (pipe_flags & DCERPC_NDR64) { + if (p->conn->flags & DCERPC_NDR64) { *transfer_syntax = ndr_transfer_syntax_ndr64; } else { *transfer_syntax = ndr_transfer_syntax_ndr; @@ -68,7 +80,7 @@ struct composite_context *dcerpc_bind_auth_none_send(TALLOC_CTX *mem_ctx, c = composite_create(mem_ctx, p->conn->event_ctx); if (c == NULL) return NULL; - c->status = dcerpc_init_syntaxes(table, p->conn->flags, + c->status = dcerpc_init_syntaxes(p, table, &syntax, &transfer_syntax); if (!NT_STATUS_IS_OK(c->status)) { DEBUG(2,("Invalid uuid string in " @@ -311,7 +323,7 @@ struct composite_context *dcerpc_bind_auth_send(TALLOC_CTX *mem_ctx, state->pipe = p; - c->status = dcerpc_init_syntaxes(table, p->conn->flags, + c->status = dcerpc_init_syntaxes(p, table, &syntax, &transfer_syntax); if (!composite_is_ok(c)) return c; |