1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

vfs_gpfs: pass fsp to gpfsacl_emu_chmod()

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 ad06d80683)
This commit is contained in:
Ralph Boehme 2022-05-17 15:17:34 +02:00 committed by Jule Anger
parent ea39a8894a
commit 2a50ba5ae1

View File

@ -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, 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; struct SMB4ACL_T *pacl = NULL;
int result; int result;
bool haveAllowEntry[SMB_ACE4_WHO_EVERYONE + 1] = {False, False, False, False}; 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; return 0;
} }
rc = gpfsacl_emu_chmod(handle, fsp->fsp_name, rc = gpfsacl_emu_chmod(handle, fsp, mode);
mode);
if (rc == 1) { if (rc == 1) {
return SMB_VFS_NEXT_FCHMOD(handle, fsp, mode); return SMB_VFS_NEXT_FCHMOD(handle, fsp, mode);
} }