vfs_gpfs: handle EACCES when fetching DOS attributes from xattr
authorRalph Boehme <slow@samba.org>
Thu, 8 Jun 2017 17:18:36 +0000 (19:18 +0200)
committerRalph Boehme <slow@samba.org>
Tue, 8 Aug 2017 23:21:13 +0000 (01:21 +0200)
commit62d73f5b936550d623ef4f31c7438ac3c90105b9
tree2d5d4f64d48eff5218aa1701abd58163a540ff54
parentc54fcb7cbd0de244eed4134e877da6e9c16e7aab
vfs_gpfs: handle EACCES when fetching DOS attributes from xattr

When trying to fetch the DOS attributes via gpfswrap_get_winattrs_path()
if the filesystem doesn't grant READ_ATTR to the file the function 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 we can safely call gpfswrap_get_winattrs_path()
with DAC_OVERRIDE_CAPABILITY.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12944

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Wed Aug  9 01:21:14 CEST 2017 on sn-devel-144
source3/modules/vfs_gpfs.c