diff options
author | Ronnie Sahlberg <lsahlber@redhat.com> | 2022-10-12 09:12:07 +1000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-11-10 18:15:42 +0100 |
commit | cfa8a89af9f22ae9641ced992b4fe3ec4e6f4f09 (patch) | |
tree | 21b388a0bc194d32eebaa33a71b3aa6bbb6342a4 | |
parent | 3189de0ac310c3ca6e8576e46f2ff7539e1ffc33 (diff) | |
download | linux-stable-cfa8a89af9f22ae9641ced992b4fe3ec4e6f4f09.tar.gz linux-stable-cfa8a89af9f22ae9641ced992b4fe3ec4e6f4f09.tar.bz2 linux-stable-cfa8a89af9f22ae9641ced992b4fe3ec4e6f4f09.zip |
cifs: fix regression in very old smb1 mounts
commit 2f6f19c7aaad5005dc75298a413eb0243c5d312d upstream.
BZ: 215375
Fixes: 76a3c92ec9e0 ("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>
-rw-r--r-- | fs/cifs/connect.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 278634a63895..ad5c935f7f06 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -3711,12 +3711,11 @@ CIFSTCon(const unsigned int xid, struct cifs_ses *ses, pSMB->AndXCommand = 0xFF; pSMB->Flags = cpu_to_le16(TCON_EXTENDED_SECINFO); bcc_ptr = &pSMB->Password[0]; - if (tcon->pipe || (ses->server->sec_mode & SECMODE_USER)) { - pSMB->PasswordLength = cpu_to_le16(1); /* minimum */ - *bcc_ptr = 0; /* password is null byte */ - bcc_ptr++; /* skip password */ - /* already aligned so no need to do it below */ - } + + pSMB->PasswordLength = cpu_to_le16(1); /* minimum */ + *bcc_ptr = 0; /* password is null byte */ + bcc_ptr++; /* skip password */ + /* already aligned so no need to do it below */ if (ses->server->sign) smb_buffer->Flags2 |= SMBFLG2_SECURITY_SIGNATURE; |