summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2022-05-17 16:02:10 +0200
committerJule Anger <janger@samba.org>2022-06-09 08:53:10 +0000
commit3b2cdf5dcdf26f3c64bbb4814ab19442da78d352 (patch)
tree940e4fe9895ecb509b43f133834c6a372f380ad7
parent4d21f10b32d009e66e318837ebf47294dc324681 (diff)
downloadsamba-3b2cdf5dcdf26f3c64bbb4814ab19442da78d352.tar.gz
vfs_gpfs: finally: use gpfswrap_fgetacl() instead of gpfswrap_getacl()
Replaces path based gpfswrap_getacl() with handle based version gpfswrap_fgetacl(). When dealing with files in snapshots fsp->fsp_name points to the active dataset, which will cause ENOENT failures if files are deleted there any only present in the snapshot: [2022/05/06 11:32:55.233435, 4, pid=12962, effective(1460548, 273710), real(1460548, 0)] calling open_file with flags=0x0 flags2=0x800 mode=0644, access_mask = 0x80, open_access_mask = 0x80 [2022/05/06 11:32:55.233460, 10, pid=12962, effective(1460548, 273710), real(1460548, 0), class=vfs] gpfs_get_nfs4_acl invoked for dir/subdir/file.txt [2022/05/06 11:32:55.233495, 5, pid=12962, effective(1460548, 273710), real(1460548, 0), class=vfs] smbd_gpfs_getacl failed with No such file or directory [2022/05/06 11:32:55.233521, 9, pid=12962, effective(1460548, 273710), real(1460548, 0), class=vfs] gpfs_getacl failed for dir/subdir/file.txt with No such file or directory [2022/05/06 11:32:55.233546, 10, pid=12962, effective(1460548, 273710), real(1460548, 0)] smbd_check_access_rights_fsp: Could not get acl on dir/subdir/file.txt {@GMT-2022.05.04-11.58.53}: NT_STATUS_OBJECT_NAME_NOT_FOUND BUG: https://bugzilla.samba.org/show_bug.cgi?id=15069 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org> (cherry picked from commit a0dc4c9026519c949070dc001e7addad7c7d35ce)
-rw-r--r--source3/modules/vfs_gpfs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c
index 33fe1f801e0..8f6a44d1fef 100644
--- a/source3/modules/vfs_gpfs.c
+++ b/source3/modules/vfs_gpfs.c
@@ -425,7 +425,7 @@ static int gpfs_getacl_with_capability(struct files_struct *fsp,
set_effective_capability(DAC_OVERRIDE_CAPABILITY);
- ret = gpfswrap_getacl(fname, flags, buf);
+ ret = gpfswrap_fgetacl(fsp_get_pathref_fd(fsp), flags, buf);
saved_errno = errno;
drop_effective_capability(DAC_OVERRIDE_CAPABILITY);
@@ -486,7 +486,7 @@ again:
if (use_capability) {
ret = gpfs_getacl_with_capability(fsp, flags, aclbuf);
} else {
- ret = gpfswrap_getacl(fname, flags, aclbuf);
+ ret = gpfswrap_fgetacl(fsp_get_pathref_fd(fsp), flags, aclbuf);
if ((ret != 0) && (errno == EACCES)) {
DBG_DEBUG("Retry with DAC capability for %s\n", fname);
use_capability = true;