summaryrefslogtreecommitdiff
path: root/fs/cifs/smb1ops.c
diff options
context:
space:
mode:
authorSteve French <smfrench@gmail.com>2014-02-03 05:31:47 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-02-22 21:32:24 (GMT)
commit05cdb9ef5488a3f40868d435b82982ee9a3690fa (patch)
tree3181d550d99a6ef4f47feb79e9994911ab1b917c /fs/cifs/smb1ops.c
parenta792f65c502f3b2028f62afd3f357cb967ab075b (diff)
downloadlinux-fsl-qoriq-05cdb9ef5488a3f40868d435b82982ee9a3690fa.tar.xz
retrieving CIFS ACLs when mounted with SMB2 fails dropping session
commit 83e3bc23ef9ce7c03b7b4e5d3d790246ea59db3e upstream. The get/set ACL xattr support for CIFS ACLs attempts to send old cifs dialect protocol requests even when mounted with SMB2 or later dialects. Sending cifs requests on an smb2 session causes problems - the server drops the session due to the illegal request. This patch makes CIFS ACL operations protocol specific to fix that. Attempting to query/set CIFS ACLs for SMB2 will now return EOPNOTSUPP (until we add worker routines for sending query ACL requests via SMB2) instead of sending invalid (cifs) requests. A separate followon patch will be needed to fix cifs_acl_to_fattr (which takes a cifs specific u16 fid so can't be abstracted to work with SMB2 until that is changed) and will be needed to fix mount problems when "cifsacl" is specified on mount with e.g. vers=2.1 Signed-off-by: Steve French <smfrench@gmail.com> Reviewed-by: Shirish Pargaonkar <spargaonkar@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/cifs/smb1ops.c')
-rw-r--r--fs/cifs/smb1ops.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/cifs/smb1ops.c b/fs/cifs/smb1ops.c
index 2f33474..e6ed0dc 100644
--- a/fs/cifs/smb1ops.c
+++ b/fs/cifs/smb1ops.c
@@ -1007,6 +1007,10 @@ struct smb_version_operations smb1_operations = {
.query_all_EAs = CIFSSMBQAllEAs,
.set_EA = CIFSSMBSetEA,
#endif /* CIFS_XATTR */
+#ifdef CONFIG_CIFS_ACL
+ .get_acl = get_cifs_acl,
+ .set_acl = set_cifs_acl,
+#endif /* CIFS_ACL */
};
struct smb_version_values smb1_values = {