replace cred_hash3 by des_crypt112_16
authorStefan Metzmacher <metze@samba.org>
Thu, 27 Aug 2009 12:17:24 +0000 (14:17 +0200)
committerStefan Metzmacher <metze@samba.org>
Sat, 7 Nov 2009 08:45:26 +0000 (09:45 +0100)
This makes sure we don't truncate the session key to 8 bytes

metze

source/rpc_parse/parse_net.c
source/rpc_server/srv_netlog_nt.c

index b078a409e290dae450b6594f14f80ac35f4ffd61..3dea390618ab41ccf83dbbb7ad39c670cf3c9d37 100644 (file)
@@ -942,7 +942,7 @@ void init_q_srv_pwset(NET_Q_SRV_PWSET *q_s,
        DEBUG(5,("init_q_srv_pwset\n"));
        
        /* Process the new password. */
-       cred_hash3( nt_cypher, hashed_mach_pwd, (const unsigned char *)sess_key, 1);
+       des_crypt112_16(nt_cypher, hashed_mach_pwd, (const unsigned char *)sess_key, 1);
 
        init_clnt_info(&q_s->clnt_id, logon_srv, acct_name, sec_chan, comp_name, cred);
 
index 5b2a26433c8a33ffb63a811bec81018e8c20a438..a6e9983c6e93687bd43816523a494910318bdb53 100644 (file)
@@ -647,8 +647,7 @@ NTSTATUS _net_srv_pwset(pipes_struct *p, NET_Q_SRV_PWSET *q_u, NET_R_SRV_PWSET *
                return NT_STATUS_ACCOUNT_DISABLED;
        }
 
-       /* Woah - what does this to to the credential chain ? JRA */
-       cred_hash3( pwd, q_u->pwd, p->dc->sess_key, 0);
+       des_crypt112_16(pwd, q_u->pwd, p->dc->sess_key, 0);
 
        DEBUG(100,("Server password set : new given value was :\n"));
        for(i = 0; i < sizeof(pwd); i++)