s3-rpc_client: add dcerpc_transport_t to cli_rpc_pipe_open_schannel().
authorGünther Deschner <gd@samba.org>
Thu, 10 Sep 2009 20:23:21 +0000 (22:23 +0200)
committerKarolin Seeger <kseeger@samba.org>
Thu, 8 Oct 2009 07:39:30 +0000 (09:39 +0200)
Guenther
(cherry picked from commit bea8e5fa6038d5abd2ec1e12f9005c4a04abb79f)

source3/auth/auth_domain.c
source3/include/proto.h
source3/libnet/libnet_join.c
source3/rpc_client/cli_pipe.c
source3/rpcclient/rpcclient.c
source3/utils/net_rpc.c
source3/utils/net_rpc_join.c
source3/winbindd/winbindd_cm.c

index f11dbe60ee13a41493c8f12f1599ea5163a6ecee..45150ab1425474caf16938b5338616bb83dd90aa 100644 (file)
@@ -175,7 +175,7 @@ static NTSTATUS connect_to_domain_password_server(struct cli_state **cli,
        if (lp_client_schannel()) {
                /* We also setup the creds chain in the open_schannel call. */
                result = cli_rpc_pipe_open_schannel(
-                       *cli, &ndr_table_netlogon.syntax_id,
+                       *cli, &ndr_table_netlogon.syntax_id, NCACN_NP,
                        PIPE_AUTH_LEVEL_PRIVACY, domain, &netlogon_pipe);
        } else {
                result = cli_rpc_pipe_open_noauth(
index 96c1d93016050ee59f8e635e94837f37caa63d13..8a5936351a37b62205a518c718370ffb48f78547 100644 (file)
@@ -5315,12 +5315,14 @@ NTSTATUS get_schannel_session_key(struct cli_state *cli,
                                  struct rpc_pipe_client **presult);
 NTSTATUS cli_rpc_pipe_open_schannel_with_key(struct cli_state *cli,
                                             const struct ndr_syntax_id *interface,
+                                            enum dcerpc_transport_t transport,
                                             enum pipe_auth_level auth_level,
                                             const char *domain,
                                             const struct dcinfo *pdc,
                                             struct rpc_pipe_client **presult);
 NTSTATUS cli_rpc_pipe_open_ntlmssp_auth_schannel(struct cli_state *cli,
                                                 const struct ndr_syntax_id *interface,
+                                                enum dcerpc_transport_t transport,
                                                 enum pipe_auth_level auth_level,
                                                 const char *domain,
                                                 const char *username,
@@ -5328,6 +5330,7 @@ NTSTATUS cli_rpc_pipe_open_ntlmssp_auth_schannel(struct cli_state *cli,
                                                 struct rpc_pipe_client **presult);
 NTSTATUS cli_rpc_pipe_open_schannel(struct cli_state *cli,
                                    const struct ndr_syntax_id *interface,
+                                   enum dcerpc_transport_t transport,
                                    enum pipe_auth_level auth_level,
                                    const char *domain,
                                    struct rpc_pipe_client **presult);
index 5309452a3d20aded5d7ef6c8f3a83e3e28bcfe5e..03832cffe5aef7a63493bf6f7ae70c6ffee05c85 100644 (file)
@@ -1070,7 +1070,8 @@ NTSTATUS libnet_join_ok(const char *netbios_domain_name,
        }
 
        status = cli_rpc_pipe_open_schannel_with_key(
-               cli, &ndr_table_netlogon.syntax_id, PIPE_AUTH_LEVEL_PRIVACY,
+               cli, &ndr_table_netlogon.syntax_id, NCACN_NP,
+               PIPE_AUTH_LEVEL_PRIVACY,
                netbios_domain_name, netlogon_pipe->dc, &pipe_hnd);
 
        cli_shutdown(cli);
index 5b8a2d42646923f468e945c03b377aaba5f3ae58..9990f1b7a0184d40e1c08c064a77324b8791c09a 100644 (file)
@@ -3887,6 +3887,7 @@ NTSTATUS get_schannel_session_key(struct cli_state *cli,
 
 NTSTATUS cli_rpc_pipe_open_schannel_with_key(struct cli_state *cli,
                                             const struct ndr_syntax_id *interface,
+                                            enum dcerpc_transport_t transport,
                                             enum pipe_auth_level auth_level,
                                             const char *domain,
                                             const struct dcinfo *pdc,
@@ -3896,7 +3897,7 @@ NTSTATUS cli_rpc_pipe_open_schannel_with_key(struct cli_state *cli,
        struct cli_pipe_auth_data *auth;
        NTSTATUS status;
 
-       status = cli_rpc_pipe_open(cli, NCACN_NP, interface, &result);
+       status = cli_rpc_pipe_open(cli, transport, interface, &result);
        if (!NT_STATUS_IS_OK(status)) {
                return status;
        }
@@ -3982,6 +3983,7 @@ static NTSTATUS get_schannel_session_key_auth_ntlmssp(struct cli_state *cli,
 
 NTSTATUS cli_rpc_pipe_open_ntlmssp_auth_schannel(struct cli_state *cli,
                                                 const struct ndr_syntax_id *interface,
+                                                enum dcerpc_transport_t transport,
                                                 enum pipe_auth_level auth_level,
                                                 const char *domain,
                                                 const char *username,
@@ -4003,7 +4005,7 @@ NTSTATUS cli_rpc_pipe_open_ntlmssp_auth_schannel(struct cli_state *cli,
        }
 
        status = cli_rpc_pipe_open_schannel_with_key(
-               cli, interface, auth_level, domain, netlogon_pipe->dc,
+               cli, interface, transport, auth_level, domain, netlogon_pipe->dc,
                &result);
 
        /* Now we've bound using the session key we can close the netlog pipe. */
@@ -4022,6 +4024,7 @@ NTSTATUS cli_rpc_pipe_open_ntlmssp_auth_schannel(struct cli_state *cli,
 
 NTSTATUS cli_rpc_pipe_open_schannel(struct cli_state *cli,
                                    const struct ndr_syntax_id *interface,
+                                   enum dcerpc_transport_t transport,
                                    enum pipe_auth_level auth_level,
                                    const char *domain,
                                    struct rpc_pipe_client **presult)
@@ -4041,7 +4044,7 @@ NTSTATUS cli_rpc_pipe_open_schannel(struct cli_state *cli,
        }
 
        status = cli_rpc_pipe_open_schannel_with_key(
-               cli, interface, auth_level, domain, netlogon_pipe->dc,
+               cli, interface, transport, auth_level, domain, netlogon_pipe->dc,
                &result);
 
        /* Now we've bound using the session key we can close the netlog pipe. */
index ae2a820a3409fb08a1e95c8bd4dfb12a7e64b5c7..17ca5e77c474f127a458c6d0373f5590badf90e6 100644 (file)
@@ -614,6 +614,7 @@ static NTSTATUS do_cmd(struct cli_state *cli,
                        case PIPE_AUTH_TYPE_SCHANNEL:
                                ntresult = cli_rpc_pipe_open_schannel(
                                        cli, cmd_entry->interface,
+                                       NCACN_NP,
                                        pipe_default_auth_level,
                                        lp_workgroup(),
                                        &cmd_entry->rpc_pipe);
index 168659a4dbf05dad4735197c8c84768c13368142..7fafa1b587722128139f8581338db81da844f55a 100644 (file)
@@ -157,7 +157,7 @@ int run_rpc_command(struct net_context *c,
                                            &ndr_table_netlogon.syntax_id))) {
                        /* Always try and create an schannel netlogon pipe. */
                        nt_status = cli_rpc_pipe_open_schannel(
-                               cli, interface,
+                               cli, interface, NCACN_NP,
                                PIPE_AUTH_LEVEL_PRIVACY, domain_name,
                                &pipe_hnd);
                        if (!NT_STATUS_IS_OK(nt_status)) {
index f0e6fe7041eb7d93516d9582a7608698320577fd..127b3065ea79571d74ee4ef0870fd7c1d67b9ab8 100644 (file)
@@ -100,7 +100,8 @@ NTSTATUS net_rpc_join_ok(struct net_context *c, const char *domain,
        }
 
        ntret = cli_rpc_pipe_open_schannel_with_key(
-               cli, &ndr_table_netlogon.syntax_id, PIPE_AUTH_LEVEL_PRIVACY,
+               cli, &ndr_table_netlogon.syntax_id, NCACN_NP,
+               PIPE_AUTH_LEVEL_PRIVACY,
                domain, netlogon_pipe->dc, &pipe_hnd);
 
        if (!NT_STATUS_IS_OK(ntret)) {
@@ -415,7 +416,7 @@ int net_rpc_join_newstyle(struct net_context *c, int argc, const char **argv)
                struct rpc_pipe_client *netlogon_schannel_pipe;
 
                result = cli_rpc_pipe_open_schannel_with_key(
-                       cli, &ndr_table_netlogon.syntax_id,
+                       cli, &ndr_table_netlogon.syntax_id, NCACN_NP,
                        PIPE_AUTH_LEVEL_PRIVACY, domain, pipe_hnd->dc,
                        &netlogon_schannel_pipe);
 
index ac22ed43367616d51665ebfff6239bf7f1b8b241..85333cf77a03f09f4d0fe520a6d5fa4d5431e294 100644 (file)
@@ -2089,7 +2089,8 @@ NTSTATUS cm_connect_sam(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx,
                goto anonymous;
        }
        result = cli_rpc_pipe_open_schannel_with_key
-               (conn->cli, &ndr_table_samr.syntax_id, PIPE_AUTH_LEVEL_PRIVACY,
+               (conn->cli, &ndr_table_samr.syntax_id, NCACN_NP,
+               PIPE_AUTH_LEVEL_PRIVACY,
                 domain->name, p_dcinfo, &conn->samr_pipe);
 
        if (!NT_STATUS_IS_OK(result)) {
@@ -2225,7 +2226,7 @@ NTSTATUS cm_connect_lsa(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx,
                goto anonymous;
        }
        result = cli_rpc_pipe_open_schannel_with_key
-               (conn->cli, &ndr_table_lsarpc.syntax_id,
+               (conn->cli, &ndr_table_lsarpc.syntax_id, NCACN_NP,
                 PIPE_AUTH_LEVEL_PRIVACY,
                 domain->name, p_dcinfo, &conn->lsa_pipe);
 
@@ -2372,7 +2373,7 @@ NTSTATUS cm_connect_netlogon(struct winbindd_domain *domain,
        */
 
        result = cli_rpc_pipe_open_schannel_with_key(
-               conn->cli, &ndr_table_netlogon.syntax_id,
+               conn->cli, &ndr_table_netlogon.syntax_id, NCACN_NP,
                PIPE_AUTH_LEVEL_PRIVACY, domain->name, netlogon_pipe->dc,
                &conn->netlogon_pipe);