提交 8505c8bf 编写于 作者: S Steve French

smb3: if server does not support posix do not allow posix mount option

If user specifies "posix" on an SMB3.11 mount, then fail the mount
if server does not return the POSIX negotiate context indicating
support for posix.
Signed-off-by: NSteve French <stfrench@microsoft.com>
Reviewed-by: NAurelien Aptel <aaptel@suse.com>
上级 cbedeadf
...@@ -3031,11 +3031,15 @@ cifs_get_tcon(struct cifs_ses *ses, struct smb_vol *volume_info) ...@@ -3031,11 +3031,15 @@ cifs_get_tcon(struct cifs_ses *ses, struct smb_vol *volume_info)
} }
#ifdef CONFIG_CIFS_SMB311 #ifdef CONFIG_CIFS_SMB311
if ((volume_info->linux_ext) && (ses->server->posix_ext_supported)) { if (volume_info->linux_ext) {
if (ses->server->vals->protocol_id == SMB311_PROT_ID) { if (ses->server->posix_ext_supported) {
tcon->posix_extensions = true; tcon->posix_extensions = true;
printk_once(KERN_WARNING printk_once(KERN_WARNING
"SMB3.11 POSIX Extensions are experimental\n"); "SMB3.11 POSIX Extensions are experimental\n");
} else {
cifs_dbg(VFS, "Server does not support mounting with posix SMB3.11 extensions.\n");
rc = -EOPNOTSUPP;
goto out_fail;
} }
} }
#endif /* 311 */ #endif /* 311 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册