Commit 97a3d0d9 authored by Shirish Pargaonkar's avatar Shirish Pargaonkar Committed by Greg Kroah-Hartman

cifs: Fix regression during share-level security mounts (Repost)

commit 540b2e37 upstream.

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: default avatarGrzegorz Ozanski <grzegorz.ozanski@intel.com>
Acked-by: default avatarJeff Layton <jlayton@redhat.com>
Signed-off-by: default avatarShirish Pargaonkar <shirishpargaonkar@gmail.com>
Acked-by: default avatarSuresh Jayaraman <sjayaraman@suse.de>
Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent c4eb47bc
...@@ -2999,7 +2999,7 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses, ...@@ -2999,7 +2999,7 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses,
bcc_ptr++; /* skip password */ bcc_ptr++; /* skip password */
/* already aligned so no need to do it below */ /* already aligned so no need to do it below */
} else { } else {
pSMB->PasswordLength = cpu_to_le16(CIFS_SESS_KEY_SIZE); pSMB->PasswordLength = cpu_to_le16(CIFS_AUTH_RESP_SIZE);
/* BB FIXME add code to fail this if NTLMv2 or Kerberos /* BB FIXME add code to fail this if NTLMv2 or Kerberos
specified as required (when that support is added to specified as required (when that support is added to
the vfs in the future) as only NTLM or the much the vfs in the future) as only NTLM or the much
...@@ -3017,7 +3017,7 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses, ...@@ -3017,7 +3017,7 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses,
#endif /* CIFS_WEAK_PW_HASH */ #endif /* CIFS_WEAK_PW_HASH */
SMBNTencrypt(tcon->password, ses->server->cryptkey, bcc_ptr); SMBNTencrypt(tcon->password, ses->server->cryptkey, bcc_ptr);
bcc_ptr += CIFS_SESS_KEY_SIZE; bcc_ptr += CIFS_AUTH_RESP_SIZE;
if (ses->capabilities & CAP_UNICODE) { if (ses->capabilities & CAP_UNICODE) {
/* must align unicode strings */ /* must align unicode strings */
*bcc_ptr = 0; /* null byte password */ *bcc_ptr = 0; /* null byte password */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment