vfs_gpfs: pass smb_fname to gpfsacl_emu_chmod()
authorRalph Boehme <slow@samba.org>
Thu, 30 Apr 2020 09:28:57 +0000 (11:28 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 5 May 2020 19:18:38 +0000 (19:18 +0000)
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/modules/vfs_gpfs.c

index 4014e92ada27d9efd099247315e50152b7c3b191..193b9b502f9aab7d9f0193b217c098f6603c6dd3 100644 (file)
@@ -1410,8 +1410,9 @@ static uint32_t gpfsacl_mask_filter(uint32_t aceType, uint32_t aceMask, uint32_t
 }
 
 static int gpfsacl_emu_chmod(vfs_handle_struct *handle,
-                            const char *path, mode_t mode)
+                            const struct smb_filename *fname, mode_t mode)
 {
+       char *path = fname->base_name;
        struct SMB4ACL_T *pacl = NULL;
        int     result;
        bool    haveAllowEntry[SMB_ACE4_WHO_EVERYONE + 1] = {False, False, False, False};
@@ -1529,7 +1530,7 @@ static int vfs_gpfs_chmod(vfs_handle_struct *handle,
                return 0;
        }
 
-       rc = gpfsacl_emu_chmod(handle, smb_fname->base_name, mode);
+       rc = gpfsacl_emu_chmod(handle, smb_fname, mode);
        if (rc == 1)
                return SMB_VFS_NEXT_CHMOD(handle, smb_fname, mode);
 
@@ -1551,7 +1552,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->base_name,
+                rc = gpfsacl_emu_chmod(handle, fsp->fsp_name,
                                        mode);
                 if (rc == 1)
                         return SMB_VFS_NEXT_FCHMOD(handle, fsp, mode);