]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
rpccli_schannel_bind_data only needs the schannel key
authorVolker Lendecke <vl@samba.org>
Mon, 12 May 2008 21:35:27 +0000 (23:35 +0200)
committerMichael Adam <obnox@samba.org>
Wed, 21 May 2008 21:35:25 +0000 (23:35 +0200)
source/include/proto.h
source/rpc_client/cli_pipe.c

index a0354a392060dc86a7b7c3d6fabd646fa45f36b9..2b07b256525e2aa39d6ca8504277ea958a4cd78e 100644 (file)
@@ -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,
index b415a39a51bb3000d8231a6b294cd8fd84dbfc1f..03deaf60c737dbaccd4437f7c3e36c7ad3659395 100644 (file)
@@ -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)));