When trying to fetch the DOS attributes xattr via SMB_VFS_GETXATTR(), if the filesystem does'n grant read access to the file the xattr read request fails with EACCESS. But according to MS-FSA 2.1.5.1.2.1 "Algorithm to Check Access to an Existing File" FILE_LIST_DIRECTORY on a directory implies FILE_READ_ATTRIBUTES for directory entries. So if the user can open the parent directory for reading this implies FILE_LIST_DIRECTORY and, for the default VFS implementation with "dos attributes = yes", reading the attributes from an xattr we should call SMB_VFS_GETXATTR() as root. In VFS modules that make use of DAC, like vfs_gpfs, we should add the corresponding DAC override. Have patch, need bugnumber.
Created attachment 13455 [details] Patch for 4.5 backported from master
Created attachment 13456 [details] Patch for 4.6 backported from master
Created attachment 13457 [details] Patch for 4.7 cherry-picked from master
Reassigning to Karolin for inclusion in 4.5, 4.6 and 4.7.
Pushed to autobuild-v4-{7,6,5}-test.
(In reply to Karolin Seeger from comment #5) Pushed to all branches. Closing out bug report. Thanks!