diff options
| author | Ronnie Sahlberg <lsahlber@redhat.com> | 2019-03-21 00:59:02 -0400 |
|---|---|---|
| committer | Steve French <stfrench@microsoft.com> | 2019-03-22 23:36:54 -0400 |
| commit | e71ab2aa06f731a944993120b0eef1556c63b81c (patch) | |
| tree | 58ad2f5f9c30a629f5f9cc67c9a9081eddc65063 | |
| parent | 85f9987b236cf46e06ffdb5c225cf1f3c0acb789 (diff) | |
cifs: allow guest mounts to work for smb3.11
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>
| -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 c399e09b76e6..8e4a1da95418 100644 --- a/fs/cifs/smb2pdu.c +++ b/fs/cifs/smb2pdu.c | |||
| @@ -1628,9 +1628,13 @@ SMB2_tcon(const unsigned int xid, struct cifs_ses *ses, const char *tree, | |||
| 1628 | iov[1].iov_base = unc_path; | 1628 | iov[1].iov_base = unc_path; |
| 1629 | iov[1].iov_len = unc_path_len; | 1629 | iov[1].iov_len = unc_path_len; |
| 1630 | 1630 | ||
| 1631 | /* 3.11 tcon req must be signed if not encrypted. See MS-SMB2 3.2.4.1.1 */ | 1631 | /* |
| 1632 | * 3.11 tcon req must be signed if not encrypted. See MS-SMB2 3.2.4.1.1 | ||
| 1633 | * unless it is guest or anonymous user. See MS-SMB2 3.2.5.3.1 | ||
| 1634 | */ | ||
| 1632 | if ((ses->server->dialect == SMB311_PROT_ID) && | 1635 | if ((ses->server->dialect == SMB311_PROT_ID) && |
| 1633 | !smb3_encryption_required(tcon)) | 1636 | !smb3_encryption_required(tcon) && |
| 1637 | !(ses->session_flags & (SMB2_SESSION_FLAG_IS_GUEST|SMB2_SESSION_FLAG_IS_NULL))) | ||
| 1634 | req->sync_hdr.Flags |= SMB2_FLAGS_SIGNED; | 1638 | req->sync_hdr.Flags |= SMB2_FLAGS_SIGNED; |
| 1635 | 1639 | ||
| 1636 | memset(&rqst, 0, sizeof(struct smb_rqst)); | 1640 | memset(&rqst, 0, sizeof(struct smb_rqst)); |
