vfs_fruit: fix fruit_check_access()
authorRalph Boehme <slow@samba.org>
Thu, 8 Dec 2016 10:08:53 +0000 (11:08 +0100)
committerUri Simchoni <uri@samba.org>
Wed, 1 Mar 2017 23:32:22 +0000 (00:32 +0100)
commit41a2b2f5cdf751e17bde60e5cfbe395450e67485
tree6cfd2c730eb3a1d0eca883db362f55fb40f19943
parentb1223520e3d35f59e0f77648e0afdf049e1c9de3
vfs_fruit: fix fruit_check_access()

Applying fcntl read locks requires an fd opened for reading. This means
we have to check the open flags of an fd and if the fd is not opened for
reading, we can't use it to set shared fctnl locks.

Iow we won't be applying interop locks with Netatalk for files openend
write-only.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
source3/modules/vfs_fruit.c