svn commit: samba r13466 - in branches/SAMBA_4_0/source/libcli/auth: .

abartlet at samba.org abartlet at samba.org
Sun Feb 12 12:04:41 GMT 2006


Author: abartlet
Date: 2006-02-12 12:04:41 +0000 (Sun, 12 Feb 2006)
New Revision: 13466

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13466

Log:
Make it easier to understand what this function actually does.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/libcli/auth/smbencrypt.c


Changeset:
Modified: branches/SAMBA_4_0/source/libcli/auth/smbencrypt.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/auth/smbencrypt.c	2006-02-12 09:55:28 UTC (rev 13465)
+++ branches/SAMBA_4_0/source/libcli/auth/smbencrypt.c	2006-02-12 12:04:41 UTC (rev 13466)
@@ -270,13 +270,13 @@
 	/* Calculate the LM session key (effective length 40 bits,
 	   but changes with each session) */
 	uint8_t p24[24];
-	uint8_t p21[21];
+	uint8_t partial_lm_hash[14];
  
-	memset(p21,'\0',21);
-	memcpy(p21, lm_hash, 8);    
-	memset(p21 + 8, 0xbd, 8);
+	memcpy(partial_lm_hash, lm_hash, 8);    
+	memset(partial_lm_hash + 8, 0xbd, 6);
 
-	E_P24(p21, lm_resp, p24);
+	des_crypt56(p24,   lm_resp, partial_lm_hash,     1);
+	des_crypt56(p24+8, lm_resp, partial_lm_hash + 7, 1);
 
 	memcpy(sess_key, p24, 16);
 



More information about the samba-cvs mailing list