s3-rpc_client: add dcerpc_transport_t to cli_rpc_pipe_open_schannel().
authorGünther Deschner <gd@samba.org>
Thu, 10 Sep 2009 20:32:34 +0000 (22:32 +0200)
committerGünther Deschner <gd@samba.org>
Fri, 11 Sep 2009 07:59:04 +0000 (09:59 +0200)
Guenther

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 6aca443fe79198037524f52c276181a0d6cc7624..85210e6f7017043c4041cb0c9e4cfd439629c3f6 100644 (file)
@@ -176,7 +176,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 297d3fb05d5db835c6535eff4ba2a01ec58f7496..abc76e8e029fbc4864d5adb8aa077c96088ef1aa 100644 (file)
@@ -5337,12 +5337,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,
                                             struct netlogon_creds_CredentialState **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,
@@ -5350,6 +5352,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 6967ae9c8d3c3c6102126a87312ce95d815a8249..7794e0367af22f987ae3b3ec9119bb619e6dce83 100644 (file)
@@ -1135,7 +1135,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 fbf5c9a7812d43fc22a339e39653c87e97b7cf80..ab9b5fee335ddd4c211fea0c40ef268b3db5e5a7 100644 (file)
@@ -3888,6 +3888,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,
                                             struct netlogon_creds_CredentialState **pdc,
@@ -3897,7 +3898,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;
        }
@@ -3983,6 +3984,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,
@@ -4004,7 +4006,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. */
@@ -4023,6 +4025,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)
@@ -4042,7 +4045,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 60fda23a1997137b08beae8c79ea4d2bce698820..64adfa2d8e40e8adb90ac9daa84e49cb40276a6b 100644 (file)
@@ -670,6 +670,7 @@ static NTSTATUS do_cmd(struct cli_state *cli,
                        case PIPE_AUTH_TYPE_SCHANNEL:
                                ntresult = cli_rpc_pipe_open_schannel(
                                        cli, cmd_entry->interface,
+                                       default_transport,
                                        pipe_default_auth_level,
                                        lp_workgroup(),
                                        &cmd_entry->rpc_pipe);
index 1513cf561ffc0774bdeaf5a388ad5f3d76c7ea27..549539298f0ed26fd8d9d83dab5f4d1cbef0a826 100644 (file)
@@ -158,7 +158,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 f55f8f104782afd9c3443c67e8eda143a0996863..dbe77355c83f097fb561b8156d1290ead518260e 100644 (file)
@@ -101,7 +101,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)) {
@@ -418,7 +419,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 fd35e20b654f98dda344a1e5ecc615a2cb54d7dd..3418022c624caef440992ef24cc11fea3201b8e1 100644 (file)
@@ -2099,7 +2099,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_creds, &conn->samr_pipe);
 
        if (!NT_STATUS_IS_OK(result)) {
@@ -2235,7 +2236,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_creds, &conn->lsa_pipe);
 
@@ -2382,7 +2383,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);