diff options
author | Günther Deschner <gd@samba.org> | 2009-09-10 22:23:21 +0200 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2009-10-08 14:50:02 +0200 |
commit | 82d6e70904d6e79f2625b770f3d40a92daefd85a (patch) | |
tree | a92fe90180ba7be96c686a19290a1a3327a37f37 | |
parent | 13d914182965b31bf6a099bba2681e16403cc29e (diff) | |
download | samba-82d6e70904d6e79f2625b770f3d40a92daefd85a.tar.gz |
s3-rpc_client: add dcerpc_transport_t to cli_rpc_pipe_open_schannel().
Guenther
(cherry picked from commit bea8e5fa6038d5abd2ec1e12f9005c4a04abb79f)
(cherry picked from commit 864c0b58aec55e37cf304b28c762a5259fc0ec67)
-rw-r--r-- | source/auth/auth_domain.c | 2 | ||||
-rw-r--r-- | source/include/proto.h | 3 | ||||
-rw-r--r-- | source/libnet/libnet_join.c | 3 | ||||
-rw-r--r-- | source/rpc_client/cli_pipe.c | 9 | ||||
-rw-r--r-- | source/rpcclient/rpcclient.c | 1 | ||||
-rw-r--r-- | source/utils/net_rpc.c | 2 | ||||
-rw-r--r-- | source/utils/net_rpc_join.c | 5 | ||||
-rw-r--r-- | source/winbindd/winbindd_cm.c | 7 |
8 files changed, 21 insertions, 11 deletions
diff --git a/source/auth/auth_domain.c b/source/auth/auth_domain.c index f11dbe60ee1..45150ab1425 100644 --- a/source/auth/auth_domain.c +++ b/source/auth/auth_domain.c @@ -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( diff --git a/source/include/proto.h b/source/include/proto.h index b8a4edaa7d1..312b130f78a 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -7014,12 +7014,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, @@ -7027,6 +7029,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); diff --git a/source/libnet/libnet_join.c b/source/libnet/libnet_join.c index 9029d616e91..915c66bd27e 100644 --- a/source/libnet/libnet_join.c +++ b/source/libnet/libnet_join.c @@ -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); diff --git a/source/rpc_client/cli_pipe.c b/source/rpc_client/cli_pipe.c index 04bb87f6ecd..8049d0678db 100644 --- a/source/rpc_client/cli_pipe.c +++ b/source/rpc_client/cli_pipe.c @@ -3218,6 +3218,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, @@ -3227,7 +3228,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; } @@ -3313,6 +3314,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, @@ -3334,7 +3336,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. */ @@ -3353,6 +3355,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) @@ -3372,7 +3375,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. */ diff --git a/source/rpcclient/rpcclient.c b/source/rpcclient/rpcclient.c index 0db9a792243..780ad71aef1 100644 --- a/source/rpcclient/rpcclient.c +++ b/source/rpcclient/rpcclient.c @@ -607,6 +607,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); diff --git a/source/utils/net_rpc.c b/source/utils/net_rpc.c index 220c8256281..60de1cb8a8d 100644 --- a/source/utils/net_rpc.c +++ b/source/utils/net_rpc.c @@ -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)) { diff --git a/source/utils/net_rpc_join.c b/source/utils/net_rpc_join.c index e663cc89e3f..0198ff6def0 100644 --- a/source/utils/net_rpc_join.c +++ b/source/utils/net_rpc_join.c @@ -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)) { @@ -419,7 +420,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); diff --git a/source/winbindd/winbindd_cm.c b/source/winbindd/winbindd_cm.c index 8bbe8611a71..176104abce6 100644 --- a/source/winbindd/winbindd_cm.c +++ b/source/winbindd/winbindd_cm.c @@ -2082,7 +2082,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)) { @@ -2220,7 +2221,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); @@ -2367,7 +2368,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); |