From 78022953e7911a9ca7e71788b0b033b4d858126f Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 12 May 2008 23:35:27 +0200 Subject: [PATCH] rpccli_schannel_bind_data only needs the schannel key (This used to be commit be5d54a363a57113e494202a2d22dd9bbcf13b41) --- source3/include/proto.h | 2 +- source3/rpc_client/cli_pipe.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/source3/include/proto.h b/source3/include/proto.h index a0354a39206..2b07b256525 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -7053,7 +7053,7 @@ NTSTATUS rpccli_ntlmssp_bind_data(TALLOC_CTX *mem_ctx, struct cli_pipe_auth_data **presult); NTSTATUS rpccli_schannel_bind_data(TALLOC_CTX *mem_ctx, const char *domain, enum pipe_auth_level auth_level, - const struct dcinfo *pdc, + const uint8_t sess_key[16], struct cli_pipe_auth_data **presult); NTSTATUS rpccli_kerberos_bind_data(TALLOC_CTX *mem_ctx, enum pipe_auth_level auth_level, diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c index b415a39a51b..03deaf60c73 100644 --- a/source3/rpc_client/cli_pipe.c +++ b/source3/rpc_client/cli_pipe.c @@ -2383,7 +2383,7 @@ NTSTATUS rpccli_ntlmssp_bind_data(TALLOC_CTX *mem_ctx, NTSTATUS rpccli_schannel_bind_data(TALLOC_CTX *mem_ctx, const char *domain, enum pipe_auth_level auth_level, - const struct dcinfo *pdc, + const uint8_t sess_key[16], struct cli_pipe_auth_data **presult) { struct cli_pipe_auth_data *result; @@ -2408,7 +2408,8 @@ NTSTATUS rpccli_schannel_bind_data(TALLOC_CTX *mem_ctx, const char *domain, goto fail; } - memcpy(result->a_u.schannel_auth->sess_key, pdc->sess_key, 16); + memcpy(result->a_u.schannel_auth->sess_key, sess_key, + sizeof(result->a_u.schannel_auth->sess_key)); result->a_u.schannel_auth->seq_num = 0; *presult = result; @@ -2880,7 +2881,7 @@ struct rpc_pipe_client *cli_rpc_pipe_open_schannel_with_key(struct cli_state *cl } *perr = rpccli_schannel_bind_data(result, domain, auth_level, - pdc, &auth); + pdc->sess_key, &auth); if (!NT_STATUS_IS_OK(*perr)) { DEBUG(0, ("rpccli_schannel_bind_data returned %s\n", nt_errstr(*perr))); -- 2.34.1