s3-rpc_cli: pass down ndr_interface_table to cli_rpc_pipe_open_noauth_transport().
authorGünther Deschner <gd@samba.org>
Fri, 24 May 2013 11:33:03 +0000 (13:33 +0200)
committerAndreas Schneider <asn@samba.org>
Mon, 5 Aug 2013 08:30:00 +0000 (10:30 +0200)
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/rpc_client/cli_pipe.c
source3/rpc_client/cli_pipe.h
source3/rpcclient/rpcclient.c

index a8fbaa2bca6b150a9fbc654277ab1150848a5a86..02d2a16683cb25e5a6a8acca5c40192ef6139505 100644 (file)
@@ -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);
 }
 
 /****************************************************************************
index 9aae61a9d298a14710ce9556253a9cad9e86bcac..f37f8a9af6c65e8d190862bb14e48af9eec1a650 100644 (file)
@@ -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,
index e3b35bbc15beea3d44e4c835d652507ff3ea0bba..c23ff2df25cc9e76c219dbee4b498103e0bfa5b1 100644 (file)
@@ -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: