From 0fdfef9aa7ee68ddd508aef7c98630cfc054f8d6 Mon Sep 17 00:00:00 2001 From: Steve French Date: Thu, 28 Jun 2018 19:30:23 -0500 Subject: smb3: simplify code by removing CONFIG_CIFS_SMB311 We really, really want to be encouraging use of secure dialects, and SMB3.1.1 offers useful security features, and will soon be the recommended dialect for many use cases. Simplify the code by removing the CONFIG_CIFS_SMB311 ifdef so users don't disable it in the build, and create compatibility and/or security issues with modern servers - many of which have been supporting this dialect for multiple years. Also clarify some of the Kconfig text for cifs.ko about SMB3.1.1 and current supported features in the module. Signed-off-by: Steve French Acked-by: Aurelien Aptel Reviewed-by: Ronnie Sahlberg --- fs/cifs/connect.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'fs/cifs/connect.c') diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 842f45859968..67f91a6313a0 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -303,10 +303,8 @@ static const match_table_t cifs_smb_version_tokens = { { Smb_21, SMB21_VERSION_STRING }, { Smb_30, SMB30_VERSION_STRING }, { Smb_302, SMB302_VERSION_STRING }, -#ifdef CONFIG_CIFS_SMB311 { Smb_311, SMB311_VERSION_STRING }, { Smb_311, ALT_SMB311_VERSION_STRING }, -#endif /* SMB311 */ { Smb_3any, SMB3ANY_VERSION_STRING }, { Smb_default, SMBDEFAULT_VERSION_STRING }, { Smb_version_err, NULL } @@ -1219,12 +1217,10 @@ cifs_parse_smb_version(char *value, struct smb_vol *vol, bool is_smb3) vol->ops = &smb30_operations; /* currently identical with 3.0 */ vol->vals = &smb302_values; break; -#ifdef CONFIG_CIFS_SMB311 case Smb_311: vol->ops = &smb311_operations; vol->vals = &smb311_values; break; -#endif /* SMB311 */ case Smb_3any: vol->ops = &smb30_operations; /* currently identical with 3.0 */ vol->vals = &smb3any_values; @@ -3039,7 +3035,6 @@ cifs_get_tcon(struct cifs_ses *ses, struct smb_vol *volume_info) } } -#ifdef CONFIG_CIFS_SMB311 if (volume_info->linux_ext) { if (ses->server->posix_ext_supported) { tcon->posix_extensions = true; @@ -3051,7 +3046,6 @@ cifs_get_tcon(struct cifs_ses *ses, struct smb_vol *volume_info) goto out_fail; } } -#endif /* 311 */ /* * BB Do we need to wrap session_mutex around this TCon call and Unix @@ -4005,11 +3999,9 @@ try_mount_again: goto remote_path_check; } -#ifdef CONFIG_CIFS_SMB311 /* if new SMB3.11 POSIX extensions are supported do not remap / and \ */ if (tcon->posix_extensions) cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_POSIX_PATHS; -#endif /* SMB3.11 */ /* tell server which Unix caps we support */ if (cap_unix(tcon->ses)) { @@ -4472,11 +4464,10 @@ cifs_construct_tcon(struct cifs_sb_info *cifs_sb, kuid_t fsuid) goto out; } -#ifdef CONFIG_CIFS_SMB311 /* if new SMB3.11 POSIX extensions are supported do not remap / and \ */ if (tcon->posix_extensions) cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_POSIX_PATHS; -#endif /* SMB3.11 */ + if (cap_unix(ses)) reset_cifs_unix_caps(0, tcon, NULL, vol_info); -- cgit v1.2.3-55-g7522