diff options
author | Shirish Pargaonkar <shirishpargaonkar@gmail.com> | 2010-10-26 19:10:24 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2010-10-26 22:04:30 -0400 |
commit | f7c5445a9deecffea8a4fffc0163bf582411ac8a (patch) | |
tree | efea64611599a034510be60077ca20bed68a48e8 /fs/cifs/connect.c | |
parent | 307fbd31b61623ad1b5388b452118f8aea99f9d0 (diff) |
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.c | 8 |
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) | |||
1631 | tcp_ses->hostname = extract_hostname(volume_info->UNC); | 1631 | tcp_ses->hostname = extract_hostname(volume_info->UNC); |
1632 | if (IS_ERR(tcp_ses->hostname)) { | 1632 | if (IS_ERR(tcp_ses->hostname)) { |
1633 | rc = PTR_ERR(tcp_ses->hostname); | 1633 | rc = PTR_ERR(tcp_ses->hostname); |
1634 | goto out_err2; | 1634 | goto out_err_crypto_release; |
1635 | } | 1635 | } |
1636 | 1636 | ||
1637 | tcp_ses->noblocksnd = volume_info->noblocksnd; | 1637 | tcp_ses->noblocksnd = volume_info->noblocksnd; |
@@ -1675,7 +1675,7 @@ cifs_get_tcp_session(struct smb_vol *volume_info) | |||
1675 | } | 1675 | } |
1676 | if (rc < 0) { | 1676 | if (rc < 0) { |
1677 | cERROR(1, "Error connecting to socket. Aborting operation"); | 1677 | cERROR(1, "Error connecting to socket. Aborting operation"); |
1678 | goto out_err2; | 1678 | goto out_err_crypto_release; |
1679 | } | 1679 | } |
1680 | 1680 | ||
1681 | /* | 1681 | /* |
@@ -1689,7 +1689,7 @@ cifs_get_tcp_session(struct smb_vol *volume_info) | |||
1689 | rc = PTR_ERR(tcp_ses->tsk); | 1689 | rc = PTR_ERR(tcp_ses->tsk); |
1690 | cERROR(1, "error %d create cifsd thread", rc); | 1690 | cERROR(1, "error %d create cifsd thread", rc); |
1691 | module_put(THIS_MODULE); | 1691 | module_put(THIS_MODULE); |
1692 | goto out_err2; | 1692 | goto out_err_crypto_release; |
1693 | } | 1693 | } |
1694 | 1694 | ||
1695 | /* thread spawned, put it on the list */ | 1695 | /* thread spawned, put it on the list */ |
@@ -1701,7 +1701,7 @@ cifs_get_tcp_session(struct smb_vol *volume_info) | |||
1701 | 1701 | ||
1702 | return tcp_ses; | 1702 | return tcp_ses; |
1703 | 1703 | ||
1704 | out_err2: | 1704 | out_err_crypto_release: |
1705 | cifs_crypto_shash_release(tcp_ses); | 1705 | cifs_crypto_shash_release(tcp_ses); |
1706 | 1706 | ||
1707 | out_err: | 1707 | out_err: |