From 2a50ba5ae191081c6341b49ef31391cd8759277b Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Tue, 17 May 2022 15:17:34 +0200 Subject: [PATCH] vfs_gpfs: pass fsp to gpfsacl_emu_chmod() BUG: https://bugzilla.samba.org/show_bug.cgi?id=15069 Signed-off-by: Ralph Boehme Reviewed-by: Christof Schmitt (cherry picked from commit ad06d806831c80a1169468d18b3e59b239a5ba77) --- source3/modules/vfs_gpfs.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index fa85c0b65a0..a389edde716 100644 --- a/source3/modules/vfs_gpfs.c +++ b/source3/modules/vfs_gpfs.c @@ -1253,9 +1253,11 @@ static uint32_t gpfsacl_mask_filter(uint32_t aceType, uint32_t aceMask, uint32_t } static int gpfsacl_emu_chmod(vfs_handle_struct *handle, - const struct smb_filename *fname, mode_t mode) + struct files_struct *fsp, + mode_t mode) { - char *path = fname->base_name; + struct smb_filename *fname = fsp->fsp_name; + char *path = fsp->fsp_name->base_name; struct SMB4ACL_T *pacl = NULL; int result; bool haveAllowEntry[SMB_ACE4_WHO_EVERYONE + 1] = {False, False, False, False}; @@ -1368,8 +1370,7 @@ static int vfs_gpfs_fchmod(vfs_handle_struct *handle, files_struct *fsp, mode_t return 0; } - rc = gpfsacl_emu_chmod(handle, fsp->fsp_name, - mode); + rc = gpfsacl_emu_chmod(handle, fsp, mode); if (rc == 1) { return SMB_VFS_NEXT_FCHMOD(handle, fsp, mode); }