summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-01-13 23:23:09 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:06:07 -0500
commit5f4a895cdde15ada0f4155a431cad5ea610740d9 (patch)
treeea82047cb83d33a5a958fe7c48c3477cffc280c4 /source3/libsmb
parent005c88054f526d9a14d748b665cd6b4853e60a35 (diff)
downloadsamba-5f4a895cdde15ada0f4155a431cad5ea610740d9.tar.gz
samba-5f4a895cdde15ada0f4155a431cad5ea610740d9.tar.bz2
samba-5f4a895cdde15ada0f4155a431cad5ea610740d9.zip
r12920: Fix for #3401 from Andrew Bartlett. Original fix from
Yau Lam Yiu <yiuext@cs.ust.hk>. Jeremy. (This used to be commit 4776101107923e425a153fe0457dbf61f4c99935)
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/ntlmssp.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/libsmb/ntlmssp.c b/source3/libsmb/ntlmssp.c
index 0becc7fdee..6dd623047a 100644
--- a/source3/libsmb/ntlmssp.c
+++ b/source3/libsmb/ntlmssp.c
@@ -384,6 +384,11 @@ static void ntlmssp_handle_neg_flags(struct ntlmssp_state *ntlmssp_state,
void ntlmssp_weaken_keys(NTLMSSP_STATE *ntlmssp_state)
{
+ /* Nothing to weaken. We certainly don't want to 'extend' the length... */
+ if (!ntlmssp_state->session_key.length < 8) {
+ return;
+ }
+
/* Key weakening not performed on the master key for NTLM2
and does not occour for NTLM1. Therefore we only need
to do this for the LM_KEY.