s3-rpc_cli: pass down ndr_interface_table to cli_rpc_pipe_open_noauth().
authorGünther Deschner <gd@samba.org>
Fri, 24 May 2013 11:29:28 +0000 (13:29 +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>
28 files changed:
source3/auth/auth_domain.c
source3/client/client.c
source3/lib/netapi/cm.c
source3/libnet/libnet_join.c
source3/libsmb/libsmb_dir.c
source3/libsmb/libsmb_server.c
source3/libsmb/passchange.c
source3/libsmb/trustdom_cache.c
source3/libsmb/trusts_util.c
source3/rpc_client/cli_pipe.c
source3/rpc_client/cli_pipe.h
source3/rpc_client/cli_pipe_schannel.c
source3/rpc_server/spoolss/srv_spoolss_nt.c
source3/rpcclient/cmd_spoolss.c
source3/rpcclient/cmd_test.c
source3/rpcclient/rpcclient.c
source3/torture/test_async_echo.c
source3/utils/net_ads.c
source3/utils/net_rpc.c
source3/utils/net_rpc_join.c
source3/utils/net_rpc_shell.c
source3/utils/net_rpc_trust.c
source3/utils/net_util.c
source3/utils/netlookup.c
source3/utils/smbcacls.c
source3/utils/smbcquotas.c
source3/utils/smbtree.c
source3/winbindd/winbindd_cm.c

index a375f1135473be1cad161a8ce23578dc8c46606b..54ee5a17df75ad4eb9d1521c14db7ac13a124053 100644 (file)
@@ -119,7 +119,7 @@ static NTSTATUS connect_to_domain_password_server(struct cli_state **cli,
                        DCERPC_AUTH_LEVEL_PRIVACY, domain, &netlogon_pipe);
        } else {
                result = cli_rpc_pipe_open_noauth(
                        DCERPC_AUTH_LEVEL_PRIVACY, domain, &netlogon_pipe);
        } else {
                result = cli_rpc_pipe_open_noauth(
-                       *cli, &ndr_table_netlogon.syntax_id, &netlogon_pipe);
+                       *cli, &ndr_table_netlogon, &netlogon_pipe);
        }
 
        if (!NT_STATUS_IS_OK(result)) {
        }
 
        if (!NT_STATUS_IS_OK(result)) {
index d03d1a40aed264dc3c80980c203a326a7bbdf328..1f6305265105591293a9dc1dd2ebaa90eb1ce60d 100644 (file)
@@ -4218,7 +4218,7 @@ static bool browse_host_rpc(bool sort)
        int i;
        struct dcerpc_binding_handle *b;
 
        int i;
        struct dcerpc_binding_handle *b;
 
-       status = cli_rpc_pipe_open_noauth(cli, &ndr_table_srvsvc.syntax_id,
+       status = cli_rpc_pipe_open_noauth(cli, &ndr_table_srvsvc,
                                          &pipe_hnd);
 
        if (!NT_STATUS_IS_OK(status)) {
                                          &pipe_hnd);
 
        if (!NT_STATUS_IS_OK(status)) {
index c158792e00fd5b922f7c3f3e3d6b9decfa09e8a7..cbc93d9784bfdefb24a7dc7f1f0bcbc49997a290 100644 (file)
@@ -202,7 +202,7 @@ static NTSTATUS pipe_cm_connect(TALLOC_CTX *mem_ctx,
                return NT_STATUS_NO_MEMORY;
        }
 
                return NT_STATUS_NO_MEMORY;
        }
 
-       status = cli_rpc_pipe_open_noauth(ipc->cli, &table->syntax_id, &p->pipe);
+       status = cli_rpc_pipe_open_noauth(ipc->cli, table, &p->pipe);
        if (!NT_STATUS_IS_OK(status)) {
                TALLOC_FREE(p);
                return status;
        if (!NT_STATUS_IS_OK(status)) {
                TALLOC_FREE(p);
                return status;
index c77149a33b0605fac0b01c4d20e3bb81c31da35f..348fb94bc500288eb55975d22a5cc1e0a6bbe947 100644 (file)
@@ -734,7 +734,7 @@ static NTSTATUS libnet_join_lookup_dc_rpc(TALLOC_CTX *mem_ctx,
                goto done;
        }
 
                goto done;
        }
 
-       status = cli_rpc_pipe_open_noauth(*cli, &ndr_table_lsarpc.syntax_id,
+       status = cli_rpc_pipe_open_noauth(*cli, &ndr_table_lsarpc,
                                          &pipe_hnd);
        if (!NT_STATUS_IS_OK(status)) {
                DEBUG(0,("Error connecting to LSA pipe. Error was %s\n",
                                          &pipe_hnd);
        if (!NT_STATUS_IS_OK(status)) {
                DEBUG(0,("Error connecting to LSA pipe. Error was %s\n",
@@ -804,7 +804,7 @@ static NTSTATUS libnet_join_joindomain_rpc_unsecure(TALLOC_CTX *mem_ctx,
        fstring trust_passwd;
        NTSTATUS status;
 
        fstring trust_passwd;
        NTSTATUS status;
 
-       status = cli_rpc_pipe_open_noauth(cli, &ndr_table_netlogon.syntax_id,
+       status = cli_rpc_pipe_open_noauth(cli, &ndr_table_netlogon,
                                          &pipe_hnd);
        if (!NT_STATUS_IS_OK(status)) {
                return status;
                                          &pipe_hnd);
        if (!NT_STATUS_IS_OK(status)) {
                return status;
@@ -893,7 +893,7 @@ static NTSTATUS libnet_join_joindomain_rpc(TALLOC_CTX *mem_ctx,
 
        /* Open the domain */
 
 
        /* Open the domain */
 
-       status = cli_rpc_pipe_open_noauth(cli, &ndr_table_samr.syntax_id,
+       status = cli_rpc_pipe_open_noauth(cli, &ndr_table_samr,
                                          &pipe_hnd);
        if (!NT_STATUS_IS_OK(status)) {
                DEBUG(0,("Error connecting to SAM pipe. Error was %s\n",
                                          &pipe_hnd);
        if (!NT_STATUS_IS_OK(status)) {
                DEBUG(0,("Error connecting to SAM pipe. Error was %s\n",
@@ -1354,7 +1354,7 @@ static NTSTATUS libnet_join_unjoindomain_rpc(TALLOC_CTX *mem_ctx,
 
        /* Open the domain */
 
 
        /* Open the domain */
 
-       status = cli_rpc_pipe_open_noauth(cli, &ndr_table_samr.syntax_id,
+       status = cli_rpc_pipe_open_noauth(cli, &ndr_table_samr,
                                          &pipe_hnd);
        if (!NT_STATUS_IS_OK(status)) {
                DEBUG(0,("Error connecting to SAM pipe. Error was %s\n",
                                          &pipe_hnd);
        if (!NT_STATUS_IS_OK(status)) {
                DEBUG(0,("Error connecting to SAM pipe. Error was %s\n",
index 87e10d8abcf54db2935c11c25df27c13f0012114..3a07f118b0c8c6110ea198037ed77abeb9855cb4 100644 (file)
@@ -277,7 +277,7 @@ net_share_enum_rpc(struct cli_state *cli,
        struct dcerpc_binding_handle *b;
 
         /* Open the server service pipe */
        struct dcerpc_binding_handle *b;
 
         /* Open the server service pipe */
-        nt_status = cli_rpc_pipe_open_noauth(cli, &ndr_table_srvsvc.syntax_id,
+        nt_status = cli_rpc_pipe_open_noauth(cli, &ndr_table_srvsvc,
                                             &pipe_hnd);
         if (!NT_STATUS_IS_OK(nt_status)) {
                 DEBUG(1, ("net_share_enum_rpc pipe open fail!\n"));
                                             &pipe_hnd);
         if (!NT_STATUS_IS_OK(nt_status)) {
                 DEBUG(1, ("net_share_enum_rpc pipe open fail!\n"));
index fc3977edbaefe69e4d786601c433b31c1a2ef4ae..5c665bfbd18ca4c88125c40d132eaae41349cd55 100644 (file)
@@ -792,7 +792,7 @@ SMBC_attr_server(TALLOC_CTX *ctx,
                 ipc_srv->cli = ipc_cli;
 
                 nt_status = cli_rpc_pipe_open_noauth(
                 ipc_srv->cli = ipc_cli;
 
                 nt_status = cli_rpc_pipe_open_noauth(
-                       ipc_srv->cli, &ndr_table_lsarpc.syntax_id, &pipe_hnd);
+                       ipc_srv->cli, &ndr_table_lsarpc, &pipe_hnd);
                 if (!NT_STATUS_IS_OK(nt_status)) {
                         DEBUG(1, ("cli_nt_session_open fail!\n"));
                         errno = ENOTSUP;
                 if (!NT_STATUS_IS_OK(nt_status)) {
                         DEBUG(1, ("cli_nt_session_open fail!\n"));
                         errno = ENOTSUP;
index 393383336bf2bae460fd9ad8e4c78bbde4179b3c..9736adab9f6cc582be2d999dbd9d186cc78d17d0 100644 (file)
@@ -169,7 +169,7 @@ NTSTATUS remote_password_change(const char *remote_machine, const char *user_nam
                 * way.
                 */
                result = cli_rpc_pipe_open_noauth(
                 * way.
                 */
                result = cli_rpc_pipe_open_noauth(
-                       cli, &ndr_table_samr.syntax_id, &pipe_hnd);
+                       cli, &ndr_table_samr, &pipe_hnd);
        }
 
        if (!NT_STATUS_IS_OK(result)) {
        }
 
        if (!NT_STATUS_IS_OK(result)) {
@@ -230,7 +230,7 @@ NTSTATUS remote_password_change(const char *remote_machine, const char *user_nam
        result = NT_STATUS_UNSUCCESSFUL;
 
        /* OK, this is ugly, but... try an anonymous pipe. */
        result = NT_STATUS_UNSUCCESSFUL;
 
        /* OK, this is ugly, but... try an anonymous pipe. */
-       result = cli_rpc_pipe_open_noauth(cli, &ndr_table_samr.syntax_id,
+       result = cli_rpc_pipe_open_noauth(cli, &ndr_table_samr,
                                          &pipe_hnd);
 
        if ( NT_STATUS_IS_OK(result) &&
                                          &pipe_hnd);
 
        if ( NT_STATUS_IS_OK(result) &&
index 8789d30338448cf824fd8d333ab503e5bc0142a8..dadc7518fde4cc07090d2bb254bb75aae1fafe29 100644 (file)
@@ -289,7 +289,7 @@ static bool enumerate_domain_trusts( TALLOC_CTX *mem_ctx, const char *domain,
 
        /* open the LSARPC_PIPE */
 
 
        /* open the LSARPC_PIPE */
 
-       status = cli_rpc_pipe_open_noauth(cli, &ndr_table_lsarpc.syntax_id,
+       status = cli_rpc_pipe_open_noauth(cli, &ndr_table_lsarpc,
                                          &lsa_pipe);
        if (!NT_STATUS_IS_OK(status)) {
                goto done;
                                          &lsa_pipe);
        if (!NT_STATUS_IS_OK(status)) {
                goto done;
index 0d039bc812e8eac127c53050e25176956d003e3d..6156ba0756c0f9889ec634172f2fcb14a7156559 100644 (file)
@@ -182,7 +182,7 @@ NTSTATUS change_trust_account_password( const char *domain, const char *remote_m
        /* Shouldn't we open this with schannel ? JRA. */
 
        nt_status = cli_rpc_pipe_open_noauth(
        /* Shouldn't we open this with schannel ? JRA. */
 
        nt_status = cli_rpc_pipe_open_noauth(
-               cli, &ndr_table_netlogon.syntax_id, &netlogon_pipe);
+               cli, &ndr_table_netlogon, &netlogon_pipe);
        if (!NT_STATUS_IS_OK(nt_status)) {
                DEBUG(0,("modify_trust_password: unable to open the domain client session to machine %s. Error was : %s.\n",
                        dc_name, nt_errstr(nt_status)));
        if (!NT_STATUS_IS_OK(nt_status)) {
                DEBUG(0,("modify_trust_password: unable to open the domain client session to machine %s. Error was : %s.\n",
                        dc_name, nt_errstr(nt_status)));
index 8ff4a861e1556993578d72530953ac1513fd8f6a..a8fbaa2bca6b150a9fbc654277ab1150848a5a86 100644 (file)
@@ -2920,11 +2920,11 @@ NTSTATUS cli_rpc_pipe_open_noauth_transport(struct cli_state *cli,
  ****************************************************************************/
 
 NTSTATUS cli_rpc_pipe_open_noauth(struct cli_state *cli,
  ****************************************************************************/
 
 NTSTATUS cli_rpc_pipe_open_noauth(struct cli_state *cli,
-                                 const struct ndr_syntax_id *interface,
+                                 const struct ndr_interface_table *table,
                                  struct rpc_pipe_client **presult)
 {
        return cli_rpc_pipe_open_noauth_transport(cli, NCACN_NP,
                                  struct rpc_pipe_client **presult)
 {
        return cli_rpc_pipe_open_noauth_transport(cli, NCACN_NP,
-                                                 interface, presult);
+                                                 &table->syntax_id, presult);
 }
 
 /****************************************************************************
 }
 
 /****************************************************************************
index 65bfbc869dbcbb48d9998b33e7ea198cdec919bd..9aae61a9d298a14710ce9556253a9cad9e86bcac 100644 (file)
@@ -77,7 +77,7 @@ NTSTATUS rpc_pipe_open_ncalrpc(TALLOC_CTX *mem_ctx, const char *socket_path,
 struct dcerpc_binding_handle *rpccli_bh_create(struct rpc_pipe_client *c);
 
 NTSTATUS cli_rpc_pipe_open_noauth(struct cli_state *cli,
 struct dcerpc_binding_handle *rpccli_bh_create(struct rpc_pipe_client *c);
 
 NTSTATUS cli_rpc_pipe_open_noauth(struct cli_state *cli,
-                                 const struct ndr_syntax_id *interface,
+                                 const struct ndr_interface_table *table,
                                  struct rpc_pipe_client **presult);
 
 NTSTATUS cli_rpc_pipe_open_noauth_transport(struct cli_state *cli,
                                  struct rpc_pipe_client **presult);
 
 NTSTATUS cli_rpc_pipe_open_noauth_transport(struct cli_state *cli,
index 784e63f56de94f43e09f71e25774e4a39088ff9d..bc672efe955cd16d4016abe789d6aa6e61913db7 100644 (file)
@@ -217,7 +217,7 @@ NTSTATUS get_schannel_session_key(struct cli_state *cli,
        struct rpc_pipe_client *netlogon_pipe = NULL;
        NTSTATUS status;
 
        struct rpc_pipe_client *netlogon_pipe = NULL;
        NTSTATUS status;
 
-       status = cli_rpc_pipe_open_noauth(cli, &ndr_table_netlogon.syntax_id,
+       status = cli_rpc_pipe_open_noauth(cli, &ndr_table_netlogon,
                                          &netlogon_pipe);
        if (!NT_STATUS_IS_OK(status)) {
                return status;
                                          &netlogon_pipe);
        if (!NT_STATUS_IS_OK(status)) {
                return status;
index 03c966b615e0e30328e23a9e30172f1ee150c097..a094b4945a497588dfbb397e7cf59f4fc6738642 100644 (file)
@@ -2493,7 +2493,7 @@ static bool spoolss_connect_to_client(struct rpc_pipe_client **pp_pipe,
         * Now start the NT Domain stuff :-).
         */
 
         * Now start the NT Domain stuff :-).
         */
 
-       ret = cli_rpc_pipe_open_noauth(the_cli, &ndr_table_spoolss.syntax_id, pp_pipe);
+       ret = cli_rpc_pipe_open_noauth(the_cli, &ndr_table_spoolss, pp_pipe);
        if (!NT_STATUS_IS_OK(ret)) {
                DEBUG(2,("spoolss_connect_to_client: unable to open the spoolss pipe on machine %s. Error was : %s.\n",
                        remote_machine, nt_errstr(ret)));
        if (!NT_STATUS_IS_OK(ret)) {
                DEBUG(2,("spoolss_connect_to_client: unable to open the spoolss pipe on machine %s. Error was : %s.\n",
                        remote_machine, nt_errstr(ret)));
index 5c499d46383171a04dd3177c332d6af5b6084bc5..fb011f8478d9c28214ff04fb5383b73a1fa33abc 100644 (file)
@@ -3453,7 +3453,7 @@ static WERROR cmd_spoolss_printercmp(struct rpc_pipe_client *cli,
        if ( !NT_STATUS_IS_OK(nt_status) )
                return WERR_GENERAL_FAILURE;
 
        if ( !NT_STATUS_IS_OK(nt_status) )
                return WERR_GENERAL_FAILURE;
 
-       nt_status = cli_rpc_pipe_open_noauth(cli_server2, &ndr_table_spoolss.syntax_id,
+       nt_status = cli_rpc_pipe_open_noauth(cli_server2, &ndr_table_spoolss,
                                             &cli2);
        if (!NT_STATUS_IS_OK(nt_status)) {
                printf("failed to open spoolss pipe on server %s (%s)\n",
                                             &cli2);
        if (!NT_STATUS_IS_OK(nt_status)) {
                printf("failed to open spoolss pipe on server %s (%s)\n",
index 591ae8cf3f51d9940ea423808d45ab1125258063..367dc713baf1d44bbbdc72a298127181781e678b 100644 (file)
@@ -36,14 +36,14 @@ static NTSTATUS cmd_testme(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
        d_printf("testme\n");
 
        status = cli_rpc_pipe_open_noauth(rpc_pipe_np_smb_conn(cli),
        d_printf("testme\n");
 
        status = cli_rpc_pipe_open_noauth(rpc_pipe_np_smb_conn(cli),
-                                         &ndr_table_lsarpc.syntax_id,
+                                         &ndr_table_lsarpc,
                                          &lsa_pipe);
        if (!NT_STATUS_IS_OK(status)) {
                goto done;
        }
 
        status = cli_rpc_pipe_open_noauth(rpc_pipe_np_smb_conn(cli),
                                          &lsa_pipe);
        if (!NT_STATUS_IS_OK(status)) {
                goto done;
        }
 
        status = cli_rpc_pipe_open_noauth(rpc_pipe_np_smb_conn(cli),
-                                         &ndr_table_samr.syntax_id,
+                                         &ndr_table_samr,
                                          &samr_pipe);
        if (!NT_STATUS_IS_OK(status)) {
                goto done;
                                          &samr_pipe);
        if (!NT_STATUS_IS_OK(status)) {
                goto done;
index 6b6478e4fc08393984446df2b37c2e6633dd1010..e3b35bbc15beea3d44e4c835d652507ff3ea0bba 100644 (file)
@@ -167,7 +167,7 @@ static void fetch_machine_sid(struct cli_state *cli)
                goto error;
        }
 
                goto error;
        }
 
-       result = cli_rpc_pipe_open_noauth(cli, &ndr_table_lsarpc.syntax_id,
+       result = cli_rpc_pipe_open_noauth(cli, &ndr_table_lsarpc,
                                          &lsapipe);
        if (!NT_STATUS_IS_OK(result)) {
                fprintf(stderr, "could not initialise lsa pipe. Error was %s\n", nt_errstr(result) );
                                          &lsapipe);
        if (!NT_STATUS_IS_OK(result)) {
                fprintf(stderr, "could not initialise lsa pipe. Error was %s\n", nt_errstr(result) );
index 6df95dd51e86d22d9bddb501ae91a5fb40998e18..f21daa4485cd18453a3bdb8b349f1b66c514e8b7 100644 (file)
@@ -82,7 +82,7 @@ bool run_async_echo(int dummy)
                printf("torture_open_connection failed\n");
                goto fail;
        }
                printf("torture_open_connection failed\n");
                goto fail;
        }
-       status = cli_rpc_pipe_open_noauth(cli, &ndr_table_rpcecho.syntax_id,
+       status = cli_rpc_pipe_open_noauth(cli, &ndr_table_rpcecho,
                                          &p);
        if (!NT_STATUS_IS_OK(status)) {
                printf("Could not open echo pipe: %s\n", nt_errstr(status));
                                          &p);
        if (!NT_STATUS_IS_OK(status)) {
                printf("Could not open echo pipe: %s\n", nt_errstr(status));
index 569994362d9294cfa015d9f3183a77709b4cba42..89eebf3388d55c31f7a893e0b6475715590d4d07 100644 (file)
@@ -1957,7 +1957,7 @@ static int net_ads_printer_publish(struct net_context *c, int argc, const char *
        SAFE_FREE(srv_cn_escaped);
        SAFE_FREE(printername_escaped);
 
        SAFE_FREE(srv_cn_escaped);
        SAFE_FREE(printername_escaped);
 
-       nt_status = cli_rpc_pipe_open_noauth(cli, &ndr_table_spoolss.syntax_id, &pipe_hnd);
+       nt_status = cli_rpc_pipe_open_noauth(cli, &ndr_table_spoolss, &pipe_hnd);
        if (!NT_STATUS_IS_OK(nt_status)) {
                d_fprintf(stderr, _("Unable to open a connection to the spoolss pipe on %s\n"),
                         servername);
        if (!NT_STATUS_IS_OK(nt_status)) {
                d_fprintf(stderr, _("Unable to open a connection to the spoolss pipe on %s\n"),
                         servername);
index 1e9d6f0f301559864b6c0abefd5e2686678960f0..488167cb39794962de41f6f99234ba407e684e3f 100644 (file)
@@ -82,7 +82,7 @@ NTSTATUS net_get_remote_domain_sid(struct cli_state *cli, TALLOC_CTX *mem_ctx,
        union lsa_PolicyInformation *info = NULL;
        struct dcerpc_binding_handle *b;
 
        union lsa_PolicyInformation *info = NULL;
        struct dcerpc_binding_handle *b;
 
-       status = cli_rpc_pipe_open_noauth(cli, &ndr_table_lsarpc.syntax_id,
+       status = cli_rpc_pipe_open_noauth(cli, &ndr_table_lsarpc,
                                          &lsa_pipe);
        if (!NT_STATUS_IS_OK(status)) {
                d_fprintf(stderr, _("Could not initialise lsa pipe\n"));
                                          &lsa_pipe);
        if (!NT_STATUS_IS_OK(status)) {
                d_fprintf(stderr, _("Could not initialise lsa pipe\n"));
@@ -212,7 +212,7 @@ int run_rpc_command(struct net_context *c,
                                        c->opt_password, &pipe_hnd);
                        } else {
                                nt_status = cli_rpc_pipe_open_noauth(
                                        c->opt_password, &pipe_hnd);
                        } else {
                                nt_status = cli_rpc_pipe_open_noauth(
-                                       cli, &table->syntax_id,
+                                       cli, table,
                                        &pipe_hnd);
                        }
                        if (!NT_STATUS_IS_OK(nt_status)) {
                                        &pipe_hnd);
                        }
                        if (!NT_STATUS_IS_OK(nt_status)) {
@@ -348,7 +348,7 @@ static NTSTATUS rpc_oldjoin_internals(struct net_context *c,
        NTSTATUS result;
        enum netr_SchannelType sec_channel_type;
 
        NTSTATUS result;
        enum netr_SchannelType sec_channel_type;
 
-       result = cli_rpc_pipe_open_noauth(cli, &ndr_table_netlogon.syntax_id,
+       result = cli_rpc_pipe_open_noauth(cli, &ndr_table_netlogon,
                                          &pipe_hnd);
        if (!NT_STATUS_IS_OK(result)) {
                DEBUG(0,("rpc_oldjoin_internals: netlogon pipe open to machine %s failed. "
                                          &pipe_hnd);
        if (!NT_STATUS_IS_OK(result)) {
                DEBUG(0,("rpc_oldjoin_internals: netlogon pipe open to machine %s failed. "
@@ -1958,7 +1958,7 @@ static NTSTATUS get_sid_from_name(struct cli_state *cli,
        NTSTATUS status, result;
        struct dcerpc_binding_handle *b;
 
        NTSTATUS status, result;
        struct dcerpc_binding_handle *b;
 
-       status = cli_rpc_pipe_open_noauth(cli, &ndr_table_lsarpc.syntax_id,
+       status = cli_rpc_pipe_open_noauth(cli, &ndr_table_lsarpc,
                                          &pipe_hnd);
        if (!NT_STATUS_IS_OK(status)) {
                goto done;
                                          &pipe_hnd);
        if (!NT_STATUS_IS_OK(status)) {
                goto done;
@@ -2951,7 +2951,7 @@ static NTSTATUS rpc_list_alias_members(struct net_context *c,
        }
 
        result = cli_rpc_pipe_open_noauth(rpc_pipe_np_smb_conn(pipe_hnd),
        }
 
        result = cli_rpc_pipe_open_noauth(rpc_pipe_np_smb_conn(pipe_hnd),
-                                         &ndr_table_lsarpc.syntax_id,
+                                         &ndr_table_lsarpc,
                                          &lsa_pipe);
        if (!NT_STATUS_IS_OK(result)) {
                d_fprintf(stderr, _("Couldn't open LSA pipe. Error was %s\n"),
                                          &lsa_pipe);
        if (!NT_STATUS_IS_OK(result)) {
                d_fprintf(stderr, _("Couldn't open LSA pipe. Error was %s\n"),
@@ -6188,7 +6188,7 @@ static NTSTATUS rpc_trustdom_get_pdc(struct net_context *c,
 
        /* Try netr_GetDcName */
 
 
        /* Try netr_GetDcName */
 
-       status = cli_rpc_pipe_open_noauth(cli, &ndr_table_netlogon.syntax_id,
+       status = cli_rpc_pipe_open_noauth(cli, &ndr_table_netlogon,
                                          &netr);
        if (!NT_STATUS_IS_OK(status)) {
                return status;
                                          &netr);
        if (!NT_STATUS_IS_OK(status)) {
                return status;
@@ -6335,7 +6335,7 @@ static int rpc_trustdom_establish(struct net_context *c, int argc,
         * Call LsaOpenPolicy and LsaQueryInfo
         */
 
         * Call LsaOpenPolicy and LsaQueryInfo
         */
 
-       nt_status = cli_rpc_pipe_open_noauth(cli, &ndr_table_lsarpc.syntax_id,
+       nt_status = cli_rpc_pipe_open_noauth(cli, &ndr_table_lsarpc,
                                             &pipe_hnd);
        if (!NT_STATUS_IS_OK(nt_status)) {
                DEBUG(0, ("Could not initialise lsa pipe. Error was %s\n", nt_errstr(nt_status) ));
                                             &pipe_hnd);
        if (!NT_STATUS_IS_OK(nt_status)) {
                DEBUG(0, ("Could not initialise lsa pipe. Error was %s\n", nt_errstr(nt_status) ));
@@ -6612,7 +6612,7 @@ static int rpc_trustdom_vampire(struct net_context *c, int argc,
                return -1;
        };
 
                return -1;
        };
 
-       nt_status = cli_rpc_pipe_open_noauth(cli, &ndr_table_lsarpc.syntax_id,
+       nt_status = cli_rpc_pipe_open_noauth(cli, &ndr_table_lsarpc,
                                             &pipe_hnd);
        if (!NT_STATUS_IS_OK(nt_status)) {
                DEBUG(0, ("Could not initialise lsa pipe. Error was %s\n",
                                             &pipe_hnd);
        if (!NT_STATUS_IS_OK(nt_status)) {
                DEBUG(0, ("Could not initialise lsa pipe. Error was %s\n",
@@ -6790,7 +6790,7 @@ static int rpc_trustdom_list(struct net_context *c, int argc, const char **argv)
                return -1;
        };
 
                return -1;
        };
 
-       nt_status = cli_rpc_pipe_open_noauth(cli, &ndr_table_lsarpc.syntax_id,
+       nt_status = cli_rpc_pipe_open_noauth(cli, &ndr_table_lsarpc,
                                             &pipe_hnd);
        if (!NT_STATUS_IS_OK(nt_status)) {
                DEBUG(0, ("Could not initialise lsa pipe. Error was %s\n",
                                             &pipe_hnd);
        if (!NT_STATUS_IS_OK(nt_status)) {
                DEBUG(0, ("Could not initialise lsa pipe. Error was %s\n",
@@ -6906,7 +6906,7 @@ static int rpc_trustdom_list(struct net_context *c, int argc, const char **argv)
        /*
         * Open \PIPE\samr and get needed policy handles
         */
        /*
         * Open \PIPE\samr and get needed policy handles
         */
-       nt_status = cli_rpc_pipe_open_noauth(cli, &ndr_table_samr.syntax_id,
+       nt_status = cli_rpc_pipe_open_noauth(cli, &ndr_table_samr,
                                             &pipe_hnd);
        if (!NT_STATUS_IS_OK(nt_status)) {
                DEBUG(0, ("Could not initialise samr pipe. Error was %s\n", nt_errstr(nt_status)));
                                             &pipe_hnd);
        if (!NT_STATUS_IS_OK(nt_status)) {
                DEBUG(0, ("Could not initialise samr pipe. Error was %s\n", nt_errstr(nt_status)));
index c5366760bc2c19b3b6eb5c48281022800e44ba28..a6ef11b254a4f3a968eaa63c2f10694fe6fc5b32 100644 (file)
@@ -245,7 +245,7 @@ int net_rpc_join_newstyle(struct net_context *c, int argc, const char **argv)
 
        /* Fetch domain sid */
 
 
        /* Fetch domain sid */
 
-       status = cli_rpc_pipe_open_noauth(cli, &ndr_table_lsarpc.syntax_id,
+       status = cli_rpc_pipe_open_noauth(cli, &ndr_table_lsarpc,
                                          &pipe_hnd);
        if (!NT_STATUS_IS_OK(status)) {
                DEBUG(0, ("Error connecting to LSA pipe. Error was %s\n",
                                          &pipe_hnd);
        if (!NT_STATUS_IS_OK(status)) {
                DEBUG(0, ("Error connecting to LSA pipe. Error was %s\n",
@@ -280,7 +280,7 @@ int net_rpc_join_newstyle(struct net_context *c, int argc, const char **argv)
        }
 
        /* Create domain user */
        }
 
        /* Create domain user */
-       status = cli_rpc_pipe_open_noauth(cli, &ndr_table_samr.syntax_id,
+       status = cli_rpc_pipe_open_noauth(cli, &ndr_table_samr,
                                          &pipe_hnd);
        if (!NT_STATUS_IS_OK(status)) {
                DEBUG(0, ("Error connecting to SAM pipe. Error was %s\n",
                                          &pipe_hnd);
        if (!NT_STATUS_IS_OK(status)) {
                DEBUG(0, ("Error connecting to SAM pipe. Error was %s\n",
@@ -447,7 +447,7 @@ int net_rpc_join_newstyle(struct net_context *c, int argc, const char **argv)
 
        /* Now check the whole process from top-to-bottom */
 
 
        /* Now check the whole process from top-to-bottom */
 
-       status = cli_rpc_pipe_open_noauth(cli, &ndr_table_netlogon.syntax_id,
+       status = cli_rpc_pipe_open_noauth(cli, &ndr_table_netlogon,
                                          &pipe_hnd);
        if (!NT_STATUS_IS_OK(status)) {
                DEBUG(0,("Error connecting to NETLOGON pipe. Error was %s\n",
                                          &pipe_hnd);
        if (!NT_STATUS_IS_OK(status)) {
                DEBUG(0,("Error connecting to NETLOGON pipe. Error was %s\n",
index 60860663c676d6a6dfc69c04ec283ba92b6893d4..120cfa6af95ef920e29dcbcbfd8c2c5f080f51a6 100644 (file)
@@ -85,7 +85,7 @@ static NTSTATUS net_sh_run(struct net_context *c,
                return NT_STATUS_NO_MEMORY;
        }
 
                return NT_STATUS_NO_MEMORY;
        }
 
-       status = cli_rpc_pipe_open_noauth(ctx->cli, &cmd->table->syntax_id,
+       status = cli_rpc_pipe_open_noauth(ctx->cli, cmd->table,
                                          &pipe_hnd);
        if (!NT_STATUS_IS_OK(status)) {
                d_fprintf(stderr, _("Could not open pipe: %s\n"),
                                          &pipe_hnd);
        if (!NT_STATUS_IS_OK(status)) {
                d_fprintf(stderr, _("Could not open pipe: %s\n"),
index 9060700be1d8197aa261897fbe2a7e2ad716f8a8..5e58103fb0308588ff3402c9a11147eeac313a00 100644 (file)
@@ -210,7 +210,7 @@ static NTSTATUS connect_and_get_info(TALLOC_CTX *mem_ctx,
                return status;
        }
 
                return status;
        }
 
-       status = cli_rpc_pipe_open_noauth(*cli, &ndr_table_lsarpc.syntax_id, pipe_hnd);
+       status = cli_rpc_pipe_open_noauth(*cli, &ndr_table_lsarpc, pipe_hnd);
        if (!NT_STATUS_IS_OK(status)) {
                DEBUG(0, ("Failed to initialise lsa pipe with error [%s]\n",
                          nt_errstr(status)));
        if (!NT_STATUS_IS_OK(status)) {
                DEBUG(0, ("Failed to initialise lsa pipe with error [%s]\n",
                          nt_errstr(status)));
index a4282ec4217aac96d9741ad83eedbea105bd49be..13a0ef12d869fc938f92f952a584603624ccc270 100644 (file)
@@ -45,7 +45,7 @@ NTSTATUS net_rpc_lookup_name(struct net_context *c,
 
        ZERO_STRUCT(pol);
 
 
        ZERO_STRUCT(pol);
 
-       status = cli_rpc_pipe_open_noauth(cli, &ndr_table_lsarpc.syntax_id,
+       status = cli_rpc_pipe_open_noauth(cli, &ndr_table_lsarpc,
                                          &lsa_pipe);
        if (!NT_STATUS_IS_OK(status)) {
                d_fprintf(stderr, _("Could not initialise lsa pipe\n"));
                                          &lsa_pipe);
        if (!NT_STATUS_IS_OK(status)) {
                d_fprintf(stderr, _("Could not initialise lsa pipe\n"));
@@ -256,7 +256,7 @@ NTSTATUS connect_dst_pipe(struct net_context *c, struct cli_state **cli_dst,
                return nt_status;
        }
 
                return nt_status;
        }
 
-       nt_status = cli_rpc_pipe_open_noauth(cli_tmp, &table->syntax_id,
+       nt_status = cli_rpc_pipe_open_noauth(cli_tmp, table,
                                             &pipe_hnd);
        if (!NT_STATUS_IS_OK(nt_status)) {
                DEBUG(0, ("couldn't not initialize pipe\n"));
                                             &pipe_hnd);
        if (!NT_STATUS_IS_OK(nt_status)) {
                DEBUG(0, ("couldn't not initialize pipe\n"));
@@ -571,7 +571,7 @@ static NTSTATUS net_scan_dc_noad(struct net_context *c,
        ZERO_STRUCTP(dc_info);
        ZERO_STRUCT(pol);
 
        ZERO_STRUCTP(dc_info);
        ZERO_STRUCT(pol);
 
-       status = cli_rpc_pipe_open_noauth(cli, &ndr_table_lsarpc.syntax_id,
+       status = cli_rpc_pipe_open_noauth(cli, &ndr_table_lsarpc,
                                          &pipe_hnd);
        if (!NT_STATUS_IS_OK(status)) {
                return status;
                                          &pipe_hnd);
        if (!NT_STATUS_IS_OK(status)) {
                return status;
@@ -634,7 +634,7 @@ NTSTATUS net_scan_dc(struct net_context *c,
 
        ZERO_STRUCTP(dc_info);
 
 
        ZERO_STRUCTP(dc_info);
 
-       status = cli_rpc_pipe_open_noauth(cli, &ndr_table_dssetup.syntax_id,
+       status = cli_rpc_pipe_open_noauth(cli, &ndr_table_dssetup,
                                          &dssetup_pipe);
         if (!NT_STATUS_IS_OK(status)) {
                DEBUG(10,("net_scan_dc: failed to open dssetup pipe with %s, "
                                          &dssetup_pipe);
         if (!NT_STATUS_IS_OK(status)) {
                DEBUG(10,("net_scan_dc: failed to open dssetup pipe with %s, "
index b66c34e61dced8e4a16fa4f9624bb397de0b55fe..56d3bfe42dc8b528a582fd1de0de638c3982f3a2 100644 (file)
@@ -122,7 +122,7 @@ static struct con_struct *create_cs(struct net_context *c,
        }
 
        nt_status = cli_rpc_pipe_open_noauth(cs->cli,
        }
 
        nt_status = cli_rpc_pipe_open_noauth(cs->cli,
-                                       &ndr_table_lsarpc.syntax_id,
+                                       &ndr_table_lsarpc,
                                        &cs->lsapipe);
 
        if (!NT_STATUS_IS_OK(nt_status)) {
                                        &cs->lsapipe);
 
        if (!NT_STATUS_IS_OK(nt_status)) {
index 39400c8bdd78392c86a3d8f65b2840958f86fff9..d3d60bc8eaf21a60038f4ee13c74e55a7554a618 100644 (file)
@@ -96,7 +96,7 @@ static NTSTATUS cli_lsa_lookup_sid(struct cli_state *cli,
                goto tcon_fail;
        }
 
                goto tcon_fail;
        }
 
-       status = cli_rpc_pipe_open_noauth(cli, &ndr_table_lsarpc.syntax_id,
+       status = cli_rpc_pipe_open_noauth(cli, &ndr_table_lsarpc,
                                          &p);
        if (!NT_STATUS_IS_OK(status)) {
                goto fail;
                                          &p);
        if (!NT_STATUS_IS_OK(status)) {
                goto fail;
@@ -146,7 +146,7 @@ static NTSTATUS cli_lsa_lookup_name(struct cli_state *cli,
                goto tcon_fail;
        }
 
                goto tcon_fail;
        }
 
-       status = cli_rpc_pipe_open_noauth(cli, &ndr_table_lsarpc.syntax_id,
+       status = cli_rpc_pipe_open_noauth(cli, &ndr_table_lsarpc,
                                          &p);
        if (!NT_STATUS_IS_OK(status)) {
                goto fail;
                                          &p);
        if (!NT_STATUS_IS_OK(status)) {
                goto fail;
@@ -187,14 +187,13 @@ static NTSTATUS cli_lsa_lookup_domain_sid(struct cli_state *cli,
        struct policy_handle handle;
        NTSTATUS status, result;
        TALLOC_CTX *frame = talloc_stackframe();
        struct policy_handle handle;
        NTSTATUS status, result;
        TALLOC_CTX *frame = talloc_stackframe();
-       const struct ndr_syntax_id *lsarpc_syntax = &ndr_table_lsarpc.syntax_id;
 
        status = cli_tree_connect(cli, "IPC$", "?????", "", 0);
        if (!NT_STATUS_IS_OK(status)) {
                goto done;
        }
 
 
        status = cli_tree_connect(cli, "IPC$", "?????", "", 0);
        if (!NT_STATUS_IS_OK(status)) {
                goto done;
        }
 
-       status = cli_rpc_pipe_open_noauth(cli, lsarpc_syntax, &rpc_pipe);
+       status = cli_rpc_pipe_open_noauth(cli, &ndr_table_lsarpc, &rpc_pipe);
        if (!NT_STATUS_IS_OK(status)) {
                goto tdis;
        }
        if (!NT_STATUS_IS_OK(status)) {
                goto tdis;
        }
index bf1f95c25f87fd27cc10f2c264b371c1319f5dea..2791b93424fa4110b157d1fff5fd520a1c2d2d84 100644 (file)
@@ -58,7 +58,7 @@ static bool cli_open_policy_hnd(void)
                NTSTATUS ret;
                cli_ipc = connect_one("IPC$");
                ret = cli_rpc_pipe_open_noauth(cli_ipc,
                NTSTATUS ret;
                cli_ipc = connect_one("IPC$");
                ret = cli_rpc_pipe_open_noauth(cli_ipc,
-                                              &ndr_table_lsarpc.syntax_id,
+                                              &ndr_table_lsarpc,
                                               &global_pipe_hnd);
                if (!NT_STATUS_IS_OK(ret)) {
                                return False;
                                               &global_pipe_hnd);
                if (!NT_STATUS_IS_OK(ret)) {
                                return False;
index 40b1f096ad995defca273a285b70e2986533717a..5c07b122b274c38a18a4b877f21dd91b250e066e 100644 (file)
@@ -177,7 +177,7 @@ static bool get_rpc_shares(struct cli_state *cli,
                return False;
        }
 
                return False;
        }
 
-       status = cli_rpc_pipe_open_noauth(cli, &ndr_table_srvsvc.syntax_id,
+       status = cli_rpc_pipe_open_noauth(cli, &ndr_table_srvsvc,
                                          &pipe_hnd);
 
        if (!NT_STATUS_IS_OK(status)) {
                                          &pipe_hnd);
 
        if (!NT_STATUS_IS_OK(status)) {
index dfcf3f4bd4d7b63c183ad210edf6b6ce4d0bb5e1..6c3f6eadf277ed9765b3471c3c8ebdf68f1314aa 100644 (file)
@@ -2006,7 +2006,7 @@ static void set_dc_type_and_flags_connect( struct winbindd_domain *domain )
        DEBUG(5, ("set_dc_type_and_flags_connect: domain %s\n", domain->name ));
 
        status = cli_rpc_pipe_open_noauth(domain->conn.cli,
        DEBUG(5, ("set_dc_type_and_flags_connect: domain %s\n", domain->name ));
 
        status = cli_rpc_pipe_open_noauth(domain->conn.cli,
-                                         &ndr_table_dssetup.syntax_id,
+                                         &ndr_table_dssetup,
                                          &cli);
 
        if (!NT_STATUS_IS_OK(status)) {
                                          &cli);
 
        if (!NT_STATUS_IS_OK(status)) {
@@ -2057,7 +2057,7 @@ static void set_dc_type_and_flags_connect( struct winbindd_domain *domain )
 
 no_dssetup:
        status = cli_rpc_pipe_open_noauth(domain->conn.cli,
 
 no_dssetup:
        status = cli_rpc_pipe_open_noauth(domain->conn.cli,
-                                         &ndr_table_lsarpc.syntax_id, &cli);
+                                         &ndr_table_lsarpc, &cli);
 
        if (!NT_STATUS_IS_OK(status)) {
                DEBUG(5, ("set_dc_type_and_flags_connect: Could not bind to "
 
        if (!NT_STATUS_IS_OK(status)) {
                DEBUG(5, ("set_dc_type_and_flags_connect: Could not bind to "
@@ -2375,7 +2375,7 @@ NTSTATUS cm_connect_sam(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx,
  anonymous:
 
        /* Finally fall back to anonymous. */
  anonymous:
 
        /* Finally fall back to anonymous. */
-       status = cli_rpc_pipe_open_noauth(conn->cli, &ndr_table_samr.syntax_id,
+       status = cli_rpc_pipe_open_noauth(conn->cli, &ndr_table_samr,
                                          &conn->samr_pipe);
 
        if (!NT_STATUS_IS_OK(status)) {
                                          &conn->samr_pipe);
 
        if (!NT_STATUS_IS_OK(status)) {
@@ -2602,7 +2602,7 @@ NTSTATUS cm_connect_lsa(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx,
  anonymous:
 
        result = cli_rpc_pipe_open_noauth(conn->cli,
  anonymous:
 
        result = cli_rpc_pipe_open_noauth(conn->cli,
-                                         &ndr_table_lsarpc.syntax_id,
+                                         &ndr_table_lsarpc,
                                          &conn->lsa_pipe);
        if (!NT_STATUS_IS_OK(result)) {
                result = NT_STATUS_PIPE_NOT_AVAILABLE;
                                          &conn->lsa_pipe);
        if (!NT_STATUS_IS_OK(result)) {
                result = NT_STATUS_PIPE_NOT_AVAILABLE;
@@ -2688,7 +2688,7 @@ NTSTATUS cm_connect_netlogon(struct winbindd_domain *domain,
        TALLOC_FREE(conn->netlogon_pipe);
 
        result = cli_rpc_pipe_open_noauth(conn->cli,
        TALLOC_FREE(conn->netlogon_pipe);
 
        result = cli_rpc_pipe_open_noauth(conn->cli,
-                                         &ndr_table_netlogon.syntax_id,
+                                         &ndr_table_netlogon,
                                          &netlogon_pipe);
        if (!NT_STATUS_IS_OK(result)) {
                return result;
                                          &netlogon_pipe);
        if (!NT_STATUS_IS_OK(result)) {
                return result;