summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2001-11-03 00:20:31 +0000
committerAndrew Bartlett <abartlet@samba.org>2001-11-03 00:20:31 +0000
commitb3014b1840d6a1b5d8dc595c2f9b9dd64909f83e (patch)
tree1c0def8ee703999ad6b5576f793e3fe96891dad2
parentfdc03603c1535fc03bcc53ee3f45c85692a00c82 (diff)
downloadsamba-b3014b1840d6a1b5d8dc595c2f9b9dd64909f83e.tar.gz
samba-b3014b1840d6a1b5d8dc595c2f9b9dd64909f83e.tar.bz2
samba-b3014b1840d6a1b5d8dc595c2f9b9dd64909f83e.zip
Minor cleanups/fixes in the NTLMv2 code
(This used to be commit 253790f6d71653b572c0174113b8559820de6bdd)
-rw-r--r--source3/auth/auth_sam.c8
-rw-r--r--source3/smbd/auth_smbpasswd.c8
2 files changed, 4 insertions, 12 deletions
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 |"));
diff --git a/source3/smbd/auth_smbpasswd.c b/source3/smbd/auth_smbpasswd.c
index d4283429ce..63c22f50b9 100644
--- a/source3/smbd/auth_smbpasswd.c
+++ b/source3/smbd/auth_smbpasswd.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 |"));