summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2006-02-12 12:04:41 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:51:53 -0500
commit93d6990dd41e1509fb55a7077e3a10834117f244 (patch)
treee334fc41e99ae3651ec1a2e30f9ac1f1dcba8ed2 /source4
parentdebf1c9a926cf91cde577b9f4f31109899757a8e (diff)
downloadsamba-93d6990dd41e1509fb55a7077e3a10834117f244.tar.gz
samba-93d6990dd41e1509fb55a7077e3a10834117f244.tar.bz2
samba-93d6990dd41e1509fb55a7077e3a10834117f244.zip
r13466: Make it easier to understand what this function actually does.
Andrew Bartlett (This used to be commit f075497926f3b8131bf8427ee3a3d5c9e5ee77d7)
Diffstat (limited to 'source4')
-rw-r--r--source4/libcli/auth/smbencrypt.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source4/libcli/auth/smbencrypt.c b/source4/libcli/auth/smbencrypt.c
index 6bc9de2f2b..12c5d2dfb6 100644
--- a/source4/libcli/auth/smbencrypt.c
+++ b/source4/libcli/auth/smbencrypt.c
@@ -270,13 +270,13 @@ void SMBsesskeygen_lm_sess_key(const uint8_t lm_hash[16],
/* 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);