aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShirish Pargaonkar <shirishpargaonkar@gmail.com>2011-01-18 23:33:54 -0500
committerSteve French <sfrench@us.ibm.com>2011-01-19 13:11:18 -0500
commit540b2e377797d8715469d408b887baa9310c5f3e (patch)
tree50f37a5ffc2bd27d70f59a9b592ba0d29e22bfda
parent1cd3508d5eab6a88fa643119cedd34b04215cffe (diff)
cifs: Fix regression during share-level security mounts (Repost)
NTLM response length was changed to 16 bytes instead of 24 bytes that are sent in Tree Connection Request during share-level security share mounts. Revert it back to 24 bytes. Reported-and-Tested-by: Grzegorz Ozanski <grzegorz.ozanski@intel.com> Acked-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com> Acked-by: Suresh Jayaraman <sjayaraman@suse.de> Cc: stable@kernel.org Signed-off-by: Steve French <sfrench@us.ibm.com>
-rw-r--r--fs/cifs/connect.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 465ecad6d7cc..5c7f8450dbe0 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -2927,7 +2927,7 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses,
2927 bcc_ptr++; /* skip password */ 2927 bcc_ptr++; /* skip password */
2928 /* already aligned so no need to do it below */ 2928 /* already aligned so no need to do it below */
2929 } else { 2929 } else {
2930 pSMB->PasswordLength = cpu_to_le16(CIFS_SESS_KEY_SIZE); 2930 pSMB->PasswordLength = cpu_to_le16(CIFS_AUTH_RESP_SIZE);
2931 /* BB FIXME add code to fail this if NTLMv2 or Kerberos 2931 /* BB FIXME add code to fail this if NTLMv2 or Kerberos
2932 specified as required (when that support is added to 2932 specified as required (when that support is added to
2933 the vfs in the future) as only NTLM or the much 2933 the vfs in the future) as only NTLM or the much
@@ -2945,7 +2945,7 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses,
2945#endif /* CIFS_WEAK_PW_HASH */ 2945#endif /* CIFS_WEAK_PW_HASH */
2946 SMBNTencrypt(tcon->password, ses->server->cryptkey, bcc_ptr); 2946 SMBNTencrypt(tcon->password, ses->server->cryptkey, bcc_ptr);
2947 2947
2948 bcc_ptr += CIFS_SESS_KEY_SIZE; 2948 bcc_ptr += CIFS_AUTH_RESP_SIZE;
2949 if (ses->capabilities & CAP_UNICODE) { 2949 if (ses->capabilities & CAP_UNICODE) {
2950 /* must align unicode strings */ 2950 /* must align unicode strings */
2951 *bcc_ptr = 0; /* null byte password */ 2951 *bcc_ptr = 0; /* null byte password */