From 49b2200f11cec66b97ff0d5c6d39cdd885a209f8 Mon Sep 17 00:00:00 2001 From: Christof Schmitt Date: Wed, 27 Apr 2022 15:37:18 -0700 Subject: [PATCH] vfs_gpfs: Ignore pathref fds for gpfs:recalls check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Setting gpfs:recalls=no should prevent data access to offline files. Since Samba 4.14, the VFS openat function is also called with O_PATH to get a reference to the path. These accesses should not be blocked, otherwise this would prevent offline files from being included in directory listings. Fix this by skipping the check for pathref fds. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15055 Signed-off-by: Christof Schmitt Reviewed-by: Ralph Boehme Autobuild-User(master): Ralph Böhme Autobuild-Date(master): Thu Apr 28 07:59:47 UTC 2022 on sn-devel-184 (cherry picked from commit 03d0dd2651c9e6552d6c3d9513810e581339ac08) --- source3/modules/vfs_gpfs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index 7642c647afb..e6b2a5d142b 100644 --- a/source3/modules/vfs_gpfs.c +++ b/source3/modules/vfs_gpfs.c @@ -2370,6 +2370,7 @@ static int vfs_gpfs_openat(struct vfs_handle_struct *handle, return -1); if (config->hsm && !config->recalls && + !fsp->fsp_flags.is_pathref && vfs_gpfs_fsp_is_offline(handle, fsp)) { DBG_DEBUG("Refusing access to offline file %s\n", -- 2.27.0