]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
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)
committerKarolin Seeger <kseeger@samba.org>
Fri, 28 Aug 2009 12:17:44 +0000 (14:17 +0200)
This makes sure we don't truncate the session key to 8 bytes
Fixes bug #6664.

metze

source/rpc_client/cli_netlogon.c
source/rpc_server/srv_netlog_nt.c

index 23618efd9fc9482a4a5037ed23176976e5fcc461..f2a260c3d176c4b2158a9d33864c9bcb22936977 100644 (file)
@@ -601,9 +601,9 @@ NTSTATUS rpccli_netlogon_set_trust_password(struct rpc_pipe_client *cli,
 
                struct samr_Password new_password;
 
-               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 dd490961d3a83cf5ea7ea9c0d42096d3151198d1..0c76c8e9e48ec7bf4d1f71f3833fefe4cb7a4ea2 100644 (file)
@@ -669,8 +669,7 @@ NTSTATUS _netr_ServerPasswordSet(pipes_struct *p,
                return NT_STATUS_ACCOUNT_DISABLED;
        }
 
-       /* 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++)