diff options
author | Ronnie Sahlberg | 2019-03-21 05:59:02 +0100 |
---|---|---|
committer | Greg Kroah-Hartman | 2019-03-27 06:14:40 +0100 |
commit | 14c52acaac86ec7fb99c3a1287227664cfc5eb54 (patch) | |
tree | 218174e59c8369e3606e18f3325741a6b4db8af4 /fs | |
parent | futex: Ensure that futex address is aligned in handle_futex_death() (diff) | |
download | kernel-qcow2-linux-14c52acaac86ec7fb99c3a1287227664cfc5eb54.tar.gz kernel-qcow2-linux-14c52acaac86ec7fb99c3a1287227664cfc5eb54.tar.xz kernel-qcow2-linux-14c52acaac86ec7fb99c3a1287227664cfc5eb54.zip |
cifs: allow guest mounts to work for smb3.11
commit e71ab2aa06f731a944993120b0eef1556c63b81c upstream.
Fix Guest/Anonymous sessions so that they work with SMB 3.11.
The commit noted below tightened the conditions and forced signing for
the SMB2-TreeConnect commands as per MS-SMB2.
However, this should only apply to normal user sessions and not for
Guest/Anonumous sessions.
Fixes: 6188f28bf608 ("Tree connect for SMB3.1.1 must be signed for non-encrypted shares")
Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
CC: Stable <stable@vger.kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/cifs/smb2pdu.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c index a2d701775c49..3d8db0504f5c 100644 --- a/fs/cifs/smb2pdu.c +++ b/fs/cifs/smb2pdu.c @@ -1500,9 +1500,13 @@ SMB2_tcon(const unsigned int xid, struct cifs_ses *ses, const char *tree, iov[1].iov_base = unc_path; iov[1].iov_len = unc_path_len; - /* 3.11 tcon req must be signed if not encrypted. See MS-SMB2 3.2.4.1.1 */ + /* + * 3.11 tcon req must be signed if not encrypted. See MS-SMB2 3.2.4.1.1 + * unless it is guest or anonymous user. See MS-SMB2 3.2.5.3.1 + */ if ((ses->server->dialect == SMB311_PROT_ID) && - !smb3_encryption_required(tcon)) + !smb3_encryption_required(tcon) && + !(ses->session_flags & (SMB2_SESSION_FLAG_IS_GUEST|SMB2_SESSION_FLAG_IS_NULL))) req->sync_hdr.Flags |= SMB2_FLAGS_SIGNED; memset(&rqst, 0, sizeof(struct smb_rqst)); |