summaryrefslogtreecommitdiffstats
path: root/fs/cifs/sess.c
diff options
context:
space:
mode:
authorShirish Pargaonkar2010-10-27 01:10:24 +0200
committerSteve French2010-10-27 04:04:30 +0200
commitf7c5445a9deecffea8a4fffc0163bf582411ac8a (patch)
treeefea64611599a034510be60077ca20bed68a48e8 /fs/cifs/sess.c
parentNTLM auth and sign - Use kernel crypto apis to calculate hashes and smb signa... (diff)
downloadkernel-qcow2-linux-f7c5445a9deecffea8a4fffc0163bf582411ac8a.tar.gz
kernel-qcow2-linux-f7c5445a9deecffea8a4fffc0163bf582411ac8a.tar.xz
kernel-qcow2-linux-f7c5445a9deecffea8a4fffc0163bf582411ac8a.zip
NTLM auth and sign - minor error corrections and cleanup
Minor cleanup - Fix spelling mistake, make meaningful (goto) label In function setup_ntlmv2_rsp(), do not return 0 and leak memory, let the tiblob get freed. For function find_domain_name(), pass already available nls table pointer instead of loading and unloading the table again in this function. For ntlmv2, the case sensitive password length is the length of the response, so subtract session key length (16 bytes) from the .len. Signed-off-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/sess.c')
-rw-r--r--fs/cifs/sess.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c
index d998c4f7aae5..e0515a62715d 100644
--- a/fs/cifs/sess.c
+++ b/fs/cifs/sess.c
@@ -738,7 +738,7 @@ ssetup_ntlmssp_authenticate:
* assigned, tilen is 0 otherwise.
*/
pSMB->req_no_secext.CaseSensitivePasswordLength =
- cpu_to_le16(ses->auth_key.len);
+ cpu_to_le16(ses->auth_key.len - CIFS_SESS_KEY_SIZE);
if (ses->capabilities & CAP_UNICODE) {
if (iov[0].iov_len % 2) {