retrieving CIFS ACLs when mounted with SMB2 fails dropping session
authorSteve French <smfrench@gmail.com>
Mon, 3 Feb 2014 05:31:47 +0000 (23:31 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 22 Feb 2014 20:41:26 +0000 (12:41 -0800)
commit6bd8c8508282b9db05b9bb5a9f76e051f247a618
tree3d3765d1eb38258c41134148a4b655171c426aa8
parent367d96446cc94044d4bb7858d9cadabb69cf3030
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>
fs/cifs/cifsacl.c
fs/cifs/cifsglob.h
fs/cifs/smb1ops.c
fs/cifs/xattr.c