From 5f4a895cdde15ada0f4155a431cad5ea610740d9 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 13 Jan 2006 23:23:09 +0000 Subject: r12920: Fix for #3401 from Andrew Bartlett. Original fix from Yau Lam Yiu . Jeremy. (This used to be commit 4776101107923e425a153fe0457dbf61f4c99935) --- source3/libsmb/ntlmssp.c | 5 +++++ 1 file changed, 5 insertions(+) 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. -- cgit