s3:netlogon: replace cred_hash3 by des_crypt112_16
authorStefan Metzmacher <metze@samba.org>
Thu, 27 Aug 2009 11:16:15 +0000 (13:16 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 4 Mar 2010 13:11:25 +0000 (14:11 +0100)
This makes sure we don't truncate the session key to 8 bytes
Fixes bug #6664.

metze
(similar to commit 570a8cf5bb6924905b3ad20353d1e7b0ca087748)

source/libsmb/trusts_util.c
source/rpc_server/srv_netlog_nt.c

index 0535d1b521ed91727c35a09fbfffd2a3ba6b455a..687cf8417284a6c95d93002c969223c7816ae387 100644 (file)
@@ -90,9 +90,9 @@ static NTSTATUS just_change_the_password(struct rpc_pipe_client *cli, TALLOC_CTX
 
                netlogon_creds_client_step(cli->dc, &clnt_creds);
 
-               cred_hash3(new_password.hash,
-                          new_trust_passwd_hash,
-                          cli->dc->sess_key, 1);
+               des_crypt112_16(new_password.hash,
+                               new_trust_passwd_hash,
+                               cli->dc->sess_key, 1);
 
                result = rpccli_netr_ServerPasswordSet(cli, mem_ctx,
                                                       cli->dc->remote_machine,
index 7ea845df82e8f79f0dbc6e96d1dd6d1cdb34080c..ca4c5b8222d2754fda0c0547b0c87acc444ff5fb 100644 (file)
@@ -660,7 +660,7 @@ NTSTATUS _netr_ServerPasswordSet(pipes_struct *p,
        }
 
        /* Woah - what does this to to the credential chain ? JRA */
-       cred_hash3(pwd, r->in.new_password->hash, p->dc->sess_key, 0);
+       des_crypt112_16(pwd, r->in.new_password->hash, p->dc->sess_key, 0);
 
        DEBUG(100,("_netr_ServerPasswordSet: new given value was :\n"));
        for(i = 0; i < sizeof(pwd); i++)