From 9aa99c3cfb0ff7a290dd4df472a4ff30d0efcb76 Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=BCnther=20Deschner?= Date: Fri, 24 May 2013 13:33:03 +0200 Subject: [PATCH] s3-rpc_cli: pass down ndr_interface_table to cli_rpc_pipe_open_noauth_transport(). MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Guenther Signed-off-by: Günther Deschner Reviewed-by: Stefan Metzmacher Reviewed-by: Andreas Schneider --- source3/rpc_client/cli_pipe.c | 13 +++++++------ source3/rpc_client/cli_pipe.h | 2 +- source3/rpcclient/rpcclient.c | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c index a8fbaa2bca6..02d2a16683c 100644 --- a/source3/rpc_client/cli_pipe.c +++ b/source3/rpc_client/cli_pipe.c @@ -2837,14 +2837,14 @@ static NTSTATUS cli_rpc_pipe_open(struct cli_state *cli, NTSTATUS cli_rpc_pipe_open_noauth_transport(struct cli_state *cli, enum dcerpc_transport_t transport, - const struct ndr_syntax_id *interface, + const struct ndr_interface_table *table, struct rpc_pipe_client **presult) { struct rpc_pipe_client *result; struct pipe_auth_data *auth; NTSTATUS status; - status = cli_rpc_pipe_open(cli, transport, interface, &result); + status = cli_rpc_pipe_open(cli, transport, &table->syntax_id, &result); if (!NT_STATUS_IS_OK(status)) { return status; } @@ -2893,7 +2893,7 @@ NTSTATUS cli_rpc_pipe_open_noauth_transport(struct cli_state *cli, status = rpc_pipe_bind(result, auth); if (!NT_STATUS_IS_OK(status)) { int lvl = 0; - if (ndr_syntax_id_equal(interface, + if (ndr_syntax_id_equal(&table->syntax_id, &ndr_table_dssetup.syntax_id)) { /* non AD domains just don't have this pipe, avoid * level 0 statement in that case - gd */ @@ -2901,7 +2901,8 @@ NTSTATUS cli_rpc_pipe_open_noauth_transport(struct cli_state *cli, } DEBUG(lvl, ("cli_rpc_pipe_open_noauth: rpc_pipe_bind for pipe " "%s failed with error %s\n", - get_pipe_name_from_syntax(talloc_tos(), interface), + get_pipe_name_from_syntax(talloc_tos(), + &table->syntax_id), nt_errstr(status) )); TALLOC_FREE(result); return status; @@ -2909,7 +2910,7 @@ NTSTATUS cli_rpc_pipe_open_noauth_transport(struct cli_state *cli, DEBUG(10,("cli_rpc_pipe_open_noauth: opened pipe %s to machine " "%s and bound anonymously.\n", - get_pipe_name_from_syntax(talloc_tos(), interface), + get_pipe_name_from_syntax(talloc_tos(), &table->syntax_id), result->desthost)); *presult = result; @@ -2924,7 +2925,7 @@ NTSTATUS cli_rpc_pipe_open_noauth(struct cli_state *cli, struct rpc_pipe_client **presult) { return cli_rpc_pipe_open_noauth_transport(cli, NCACN_NP, - &table->syntax_id, presult); + table, presult); } /**************************************************************************** diff --git a/source3/rpc_client/cli_pipe.h b/source3/rpc_client/cli_pipe.h index 9aae61a9d29..f37f8a9af6c 100644 --- a/source3/rpc_client/cli_pipe.h +++ b/source3/rpc_client/cli_pipe.h @@ -82,7 +82,7 @@ NTSTATUS cli_rpc_pipe_open_noauth(struct cli_state *cli, NTSTATUS cli_rpc_pipe_open_noauth_transport(struct cli_state *cli, enum dcerpc_transport_t transport, - const struct ndr_syntax_id *interface, + const struct ndr_interface_table *table, struct rpc_pipe_client **presult); NTSTATUS cli_rpc_pipe_open_generic_auth(struct cli_state *cli, diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c index e3b35bbc15b..c23ff2df25c 100644 --- a/source3/rpcclient/rpcclient.c +++ b/source3/rpcclient/rpcclient.c @@ -690,7 +690,7 @@ static NTSTATUS do_cmd(struct cli_state *cli, case DCERPC_AUTH_TYPE_NONE: ntresult = cli_rpc_pipe_open_noauth_transport( cli, default_transport, - &cmd_entry->table->syntax_id, + cmd_entry->table, &cmd_entry->rpc_pipe); break; case DCERPC_AUTH_TYPE_SPNEGO: -- 2.34.1