From c50664f68f10d0965908707258909d9da1e879fc Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sat, 25 Jan 2014 11:14:36 +0100 Subject: [PATCH] s4:librpc/rpc: always call dcerpc_binding_set_abstract_syntax() in dcerpc_epm_map_binding_send() We should always set the abstract syntax even if we don't ask the endpoint mapper. By using dcerpc_binding_set_abstract_syntax() instead of calling binding->object = table->syntax_id, we will be able to separate the abstract_syntax from the object uuid in future. Signed-off-by: Stefan Metzmacher Reviewed-by: Guenther Deschner --- source4/librpc/rpc/dcerpc_util.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/source4/librpc/rpc/dcerpc_util.c b/source4/librpc/rpc/dcerpc_util.c index aa2b13cc0c3..2cb8ee2b24c 100644 --- a/source4/librpc/rpc/dcerpc_util.c +++ b/source4/librpc/rpc/dcerpc_util.c @@ -145,9 +145,6 @@ static void continue_epm_recv_binding(struct composite_context *ctx) c->status = dcerpc_pipe_connect_b_recv(ctx, c, &s->pipe); if (!composite_is_ok(c)) return; - /* prepare requested binding parameters */ - s->binding->object = s->table->syntax_id; - c->status = dcerpc_binding_build_tower(s->pipe, s->binding, &s->twr.tower); if (!composite_is_ok(c)) return; @@ -248,6 +245,12 @@ struct composite_context *dcerpc_epm_map_binding_send(TALLOC_CTX *mem_ctx, s->binding = binding; s->table = table; + c->status = dcerpc_binding_set_abstract_syntax(binding, + &table->syntax_id); + if (!composite_is_ok(c)) { + return c; + } + /* First, check if there is a default endpoint specified in the IDL */ -- 2.11.4.GIT