diff options
author | Günther Deschner <gd@samba.org> | 2013-09-18 18:33:14 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2013-09-19 11:09:36 +0200 |
commit | 89d0b89b5d58ceef13bc10036d396b10f8a102ae (patch) | |
tree | 7263f9fb2478cea733e7317f31ace049bb258d65 | |
parent | 090671aca5234f47f390054de771198e3c177060 (diff) | |
download | samba-89d0b89b5d58ceef13bc10036d396b10f8a102ae.tar.gz samba-89d0b89b5d58ceef13bc10036d396b10f8a102ae.tar.bz2 samba-89d0b89b5d58ceef13bc10036d396b10f8a102ae.zip |
s3-rpc_cli: use gensec for schannel bind.
Guenther
Signed-off-by: Günther Deschner <gd@samba.org>
Pair-Programmed-With: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
-rw-r--r-- | source3/rpc_client/cli_pipe.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c index fa0509b419..556a63e342 100644 --- a/source3/rpc_client/cli_pipe.c +++ b/source3/rpc_client/cli_pipe.c @@ -1096,12 +1096,6 @@ static NTSTATUS create_rpc_bind_req(TALLOC_CTX *mem_ctx, switch (auth->auth_type) { case DCERPC_AUTH_TYPE_SCHANNEL: - ret = create_schannel_auth_rpc_bind_req(cli, &auth_token); - if (!NT_STATUS_IS_OK(ret)) { - return ret; - } - break; - case DCERPC_AUTH_TYPE_NTLMSSP: case DCERPC_AUTH_TYPE_KRB5: case DCERPC_AUTH_TYPE_SPNEGO: @@ -2856,16 +2850,26 @@ NTSTATUS cli_rpc_pipe_open_schannel_with_key(struct cli_state *cli, struct netr_Authenticator auth; struct netr_Authenticator return_auth; union netr_Capabilities capabilities; + const char *target_service = table->authservices->names[0]; status = cli_rpc_pipe_open(cli, transport, table, &rpccli); if (!NT_STATUS_IS_OK(status)) { return status; } - status = rpccli_schannel_bind_data(rpccli, domain, auth_level, - *pdc, &rpcauth); + status = rpccli_generic_bind_data(rpccli, + DCERPC_AUTH_TYPE_SCHANNEL, + auth_level, + NULL, + target_service, + domain, + (*pdc)->computer_name, + NULL, + CRED_AUTO_USE_KERBEROS, + *pdc, + &rpcauth); if (!NT_STATUS_IS_OK(status)) { - DEBUG(0, ("rpccli_schannel_bind_data returned %s\n", + DEBUG(0, ("rpccli_generic_bind_data returned %s\n", nt_errstr(status))); TALLOC_FREE(rpccli); return status; |