mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 17:30:02 +00:00
cifs: fix regression in very old smb1 mounts
commit2f6f19c7aa
upstream. BZ: 215375 Fixes:76a3c92ec9
("cifs: remove support for NTLM and weaker authentication algorithms") Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz> Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com> Signed-off-by: Steve French <stfrench@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
96f8666c73
commit
096df60894
1 changed files with 5 additions and 6 deletions
|
@ -3921,12 +3921,11 @@ CIFSTCon(const unsigned int xid, struct cifs_ses *ses,
|
||||||
pSMB->AndXCommand = 0xFF;
|
pSMB->AndXCommand = 0xFF;
|
||||||
pSMB->Flags = cpu_to_le16(TCON_EXTENDED_SECINFO);
|
pSMB->Flags = cpu_to_le16(TCON_EXTENDED_SECINFO);
|
||||||
bcc_ptr = &pSMB->Password[0];
|
bcc_ptr = &pSMB->Password[0];
|
||||||
if (tcon->pipe || (ses->server->sec_mode & SECMODE_USER)) {
|
|
||||||
pSMB->PasswordLength = cpu_to_le16(1); /* minimum */
|
pSMB->PasswordLength = cpu_to_le16(1); /* minimum */
|
||||||
*bcc_ptr = 0; /* password is null byte */
|
*bcc_ptr = 0; /* password is null byte */
|
||||||
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 */
|
||||||
}
|
|
||||||
|
|
||||||
if (ses->server->sign)
|
if (ses->server->sign)
|
||||||
smb_buffer->Flags2 |= SMBFLG2_SECURITY_SIGNATURE;
|
smb_buffer->Flags2 |= SMBFLG2_SECURITY_SIGNATURE;
|
||||||
|
|
Loading…
Reference in a new issue