s3-rpc_cli: pass down ndr_interface_table to rpc_pipe_get_tcp_port().
authorGünther Deschner <gd@samba.org>
Fri, 24 May 2013 11:46:07 +0000 (13:46 +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

index 3934cc6996e39c69c134194ff9d2ad9d48bb8a5c..29092aa74a945551cd4abd094bb9a9ed0b2efd45 100644 (file)
@@ -2490,7 +2490,7 @@ static NTSTATUS rpc_pipe_open_tcp_port(TALLOC_CTX *mem_ctx, const char *host,
  */
 static NTSTATUS rpc_pipe_get_tcp_port(const char *host,
                                      const struct sockaddr_storage *addr,
-                                     const struct ndr_syntax_id *abstract_syntax,
+                                     const struct ndr_interface_table *table,
                                      uint16_t *pport)
 {
        NTSTATUS status;
@@ -2513,7 +2513,7 @@ static NTSTATUS rpc_pipe_get_tcp_port(const char *host,
                goto done;
        }
 
-       if (ndr_syntax_id_equal(abstract_syntax,
+       if (ndr_syntax_id_equal(&table->syntax_id,
                                &ndr_table_epmapper.syntax_id)) {
                *pport = 135;
                return NT_STATUS_OK;
@@ -2548,7 +2548,7 @@ static NTSTATUS rpc_pipe_get_tcp_port(const char *host,
        }
 
        map_binding->transport = NCACN_IP_TCP;
-       map_binding->object = *abstract_syntax;
+       map_binding->object = table->syntax_id;
        map_binding->host = host; /* needed? */
        map_binding->endpoint = "0"; /* correct? needed? */
 
@@ -2584,7 +2584,7 @@ static NTSTATUS rpc_pipe_get_tcp_port(const char *host,
        status = dcerpc_epm_Map(epm_handle,
                                tmp_ctx,
                                discard_const_p(struct GUID,
-                                             &(abstract_syntax->uuid)),
+                                             &(table->syntax_id.uuid)),
                                map_tower,
                                entry_handle,
                                max_towers,
@@ -2641,7 +2641,7 @@ NTSTATUS rpc_pipe_open_tcp(TALLOC_CTX *mem_ctx, const char *host,
        NTSTATUS status;
        uint16_t port = 0;
 
-       status = rpc_pipe_get_tcp_port(host, addr, &table->syntax_id, &port);
+       status = rpc_pipe_get_tcp_port(host, addr, table, &port);
        if (!NT_STATUS_IS_OK(status)) {
                return status;
        }