vfs_gpfs: Use O_PATH for opening dirfd for stat with CAP_DAC_OVERRIDE
commitb317622a8fed0ee195ffe40129eb5bcad28dd985
authorChristof Schmitt <cs@samba.org>
Thu, 26 Oct 2023 21:37:15 +0000 (26 14:37 -0700)
committerRalph Boehme <slow@samba.org>
Wed, 8 Nov 2023 17:40:37 +0000 (8 17:40 +0000)
treeb5fa33cd260bac3d1ab25c1374adb9c7b4de03af
parent091af82f75960c0c6abb04908b96051d9f53659d
vfs_gpfs: Use O_PATH for opening dirfd for stat with CAP_DAC_OVERRIDE

Use O_PATH when available; this avoids the need for READ/LIST access on
that directory. Keep using O_RDONLY if the system does not have O_PATH.

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

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/modules/vfs_gpfs.c