From b3014b1840d6a1b5d8dc595c2f9b9dd64909f83e Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 3 Nov 2001 00:20:31 +0000 Subject: Minor cleanups/fixes in the NTLMv2 code (This used to be commit 253790f6d71653b572c0174113b8559820de6bdd) --- source3/auth/auth_sam.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'source3/auth') diff --git a/source3/auth/auth_sam.c b/source3/auth/auth_sam.c index d4283429ce..63c22f50b9 100644 --- a/source3/auth/auth_sam.c +++ b/source3/auth/auth_sam.c @@ -102,11 +102,7 @@ static BOOL smb_pwd_check_ntlmv2(const DATA_BLOB ntv2_response, } client_key_data = data_blob(ntv2_response.data+16, ntv2_response.length-16); - memcpy(client_response, ntv2_response.data, ntv2_response.length); - - if (!client_key_data.data) { - return False; - } + memcpy(client_response, ntv2_response.data, sizeof(client_response)); ntv2_owf_gen(part_passwd, user, domain, kr); SMBOWFencrypt_ntv2(kr, sec_blob, client_key_data, (char *)value_from_encryption); @@ -121,7 +117,7 @@ static BOOL smb_pwd_check_ntlmv2(const DATA_BLOB ntv2_response, DEBUG(100,("Password from client was |")); dump_data(100, ntv2_response.data, ntv2_response.length); DEBUG(100,("Variable data from client was |")); - dump_data(100, ntv2_response.data, ntv2_response.length); + dump_data(100, client_key_data.data, client_key_data.length); DEBUG(100,("Given challenge was |")); dump_data(100, sec_blob.data, sec_blob.length); DEBUG(100,("Value from encryption was |")); -- cgit