summaryrefslogtreecommitdiffstats
path: root/fs/cifs/connect.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/connect.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/connect.c')
-rw-r--r--fs/cifs/connect.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 04239a7ff320..469c3ddba463 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -1631,7 +1631,7 @@ cifs_get_tcp_session(struct smb_vol *volume_info)
tcp_ses->hostname = extract_hostname(volume_info->UNC);
if (IS_ERR(tcp_ses->hostname)) {
rc = PTR_ERR(tcp_ses->hostname);
- goto out_err2;
+ goto out_err_crypto_release;
}
tcp_ses->noblocksnd = volume_info->noblocksnd;
@@ -1675,7 +1675,7 @@ cifs_get_tcp_session(struct smb_vol *volume_info)
}
if (rc < 0) {
cERROR(1, "Error connecting to socket. Aborting operation");
- goto out_err2;
+ goto out_err_crypto_release;
}
/*
@@ -1689,7 +1689,7 @@ cifs_get_tcp_session(struct smb_vol *volume_info)
rc = PTR_ERR(tcp_ses->tsk);
cERROR(1, "error %d create cifsd thread", rc);
module_put(THIS_MODULE);
- goto out_err2;
+ goto out_err_crypto_release;
}
/* thread spawned, put it on the list */
@@ -1701,7 +1701,7 @@ cifs_get_tcp_session(struct smb_vol *volume_info)
return tcp_ses;
-out_err2:
+out_err_crypto_release:
cifs_crypto_shash_release(tcp_ses);
out_err: