vfs_gpfs: pass fsp to gpfsacl_get_posix_acl()
authorRalph Boehme <slow@samba.org>
Tue, 17 May 2022 13:32:24 +0000 (15:32 +0200)
committerJeremy Allison <jra@samba.org>
Fri, 3 Jun 2022 20:56:35 +0000 (20:56 +0000)
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>
source3/modules/vfs_gpfs.c

index c690561f3e1624cbd9e24256befa2879404ec85c..41eace799b2c35758d97bd1abcc8711cb889cef8 100644 (file)
@@ -950,9 +950,11 @@ static SMB_ACL_T gpfs2smb_acl(const struct gpfs_acl *pacl, TALLOC_CTX *mem_ctx)
        return result;
 }
 
-static SMB_ACL_T gpfsacl_get_posix_acl(const char *path, gpfs_aclType_t type,
+static SMB_ACL_T gpfsacl_get_posix_acl(struct files_struct *fsp,
+                                      gpfs_aclType_t type,
                                       TALLOC_CTX *mem_ctx)
 {
+       const char *path = fsp->fsp_name->base_name;
        struct gpfs_acl *pacl;
        SMB_ACL_T result = NULL;
 
@@ -1021,8 +1023,7 @@ static SMB_ACL_T gpfsacl_sys_acl_get_fd(vfs_handle_struct *handle,
                DEBUG(0, ("Got invalid type: %d\n", type));
                smb_panic("exiting");
        }
-       return gpfsacl_get_posix_acl(fsp->fsp_name->base_name,
-                                    gpfs_type, mem_ctx);
+       return gpfsacl_get_posix_acl(fsp, gpfs_type, mem_ctx);
 }
 
 static int gpfsacl_sys_acl_blob_get_fd(vfs_handle_struct *handle,