aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/smb2pdu.c
diff options
context:
space:
mode:
authorSteve French <smfrench@gmail.com>2017-08-31 21:34:24 -0500
committerSteve French <smfrench@gmail.com>2017-09-01 00:18:44 -0500
commit7e682f766f289887c5cbf7c0a1e4970103f01ac4 (patch)
tree108f320f469ede330410f57b2c534bcbe583bbce /fs/cifs/smb2pdu.c
parentMerge tag 'cifs-fixes-for-4.13-rc7-and-stable' of git://git.samba.org/sfrench/cifs-2.6 (diff)
downloadlinux-dev-7e682f766f289887c5cbf7c0a1e4970103f01ac4.tar.xz
linux-dev-7e682f766f289887c5cbf7c0a1e4970103f01ac4.zip
Fix warning messages when mounting to older servers
When mounting to older servers, such as Windows XP (or even Windows 7), the limited error messages that can be passed back to user space can get confusing since the default dialect has changed from SMB1 (CIFS) to more secure SMB3 dialect. Log additional information when the user chooses to use the default dialects and when the server does not support the dialect requested. Signed-off-by: Steve French <smfrench@gmail.com> Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com> Acked-by: Pavel Shilovsky <pshilov@microsoft.com>
Diffstat (limited to '')
-rw-r--r--fs/cifs/smb2pdu.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
index 97edb4d376cd..7aa67206f6da 100644
--- a/fs/cifs/smb2pdu.c
+++ b/fs/cifs/smb2pdu.c
@@ -514,7 +514,12 @@ SMB2_negotiate(const unsigned int xid, struct cifs_ses *ses)
* No tcon so can't do
* cifs_stats_inc(&tcon->stats.smb2_stats.smb2_com_fail[SMB2...]);
*/
- if (rc != 0)
+ if (rc == -EOPNOTSUPP) {
+ cifs_dbg(VFS, "Dialect not supported by server. Consider "
+ "specifying vers=1.0 or vers=2.1 on mount for accessing"
+ " older servers\n");
+ goto neg_exit;
+ } else if (rc != 0)
goto neg_exit;
cifs_dbg(FYI, "mode 0x%x\n", rsp->SecurityMode);