s3-rpc_cli: pass down ndr_interface_table to rpc_pipe_open_tcp().
authorGünther Deschner <gd@samba.org>
Fri, 24 May 2013 11:44:00 +0000 (13:44 +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/torture/rpc_open_tcp.c

index 632a42b9ace7781010a8a30d37ea0e9a93e28c4f..3934cc6996e39c69c134194ff9d2ad9d48bb8a5c 100644 (file)
@@ -2635,19 +2635,19 @@ done:
  */
 NTSTATUS rpc_pipe_open_tcp(TALLOC_CTX *mem_ctx, const char *host,
                           const struct sockaddr_storage *addr,
-                          const struct ndr_syntax_id *abstract_syntax,
+                          const struct ndr_interface_table *table,
                           struct rpc_pipe_client **presult)
 {
        NTSTATUS status;
        uint16_t port = 0;
 
-       status = rpc_pipe_get_tcp_port(host, addr, abstract_syntax, &port);
+       status = rpc_pipe_get_tcp_port(host, addr, &table->syntax_id, &port);
        if (!NT_STATUS_IS_OK(status)) {
                return status;
        }
 
        return rpc_pipe_open_tcp_port(mem_ctx, host, addr, port,
-                                       abstract_syntax, presult);
+                                     &table->syntax_id, presult);
 }
 
 /********************************************************************
@@ -2823,7 +2823,7 @@ static NTSTATUS cli_rpc_pipe_open(struct cli_state *cli,
                return rpc_pipe_open_tcp(NULL,
                                         smbXcli_conn_remote_name(cli->conn),
                                         smbXcli_conn_remote_sockaddr(cli->conn),
-                                        &table->syntax_id, presult);
+                                        table, presult);
        case NCACN_NP:
                return rpc_pipe_open_np(cli, table, presult);
        default:
index f37f8a9af6c65e8d190862bb14e48af9eec1a650..6fcc5873bfe499f4d787a036d0f6827d97c63788 100644 (file)
@@ -67,7 +67,7 @@ NTSTATUS rpccli_schannel_bind_data(TALLOC_CTX *mem_ctx,
 NTSTATUS rpc_pipe_open_tcp(TALLOC_CTX *mem_ctx,
                           const char *host,
                           const struct sockaddr_storage *ss_addr,
-                          const struct ndr_syntax_id *abstract_syntax,
+                          const struct ndr_interface_table *table,
                           struct rpc_pipe_client **presult);
 
 NTSTATUS rpc_pipe_open_ncalrpc(TALLOC_CTX *mem_ctx, const char *socket_path,
index d29f4cfbee88b8771bece044b24515cd20adecd9..cd27b5ff208a5bc1198f20177465ab731542b702 100644 (file)
@@ -95,7 +95,7 @@ int main(int argc, const char **argv)
        }
 
        status = rpc_pipe_open_tcp(mem_ctx, argv[2], NULL,
-                                  &((*table)->syntax_id),
+                                  *table,
                                   &rpc_pipe);
        if (!NT_STATUS_IS_OK(status)) {
                d_printf("ERROR calling rpc_pipe_open_tcp(): %s\n",