summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2022-05-17 15:35:26 +0200
committerJule Anger <janger@samba.org>2022-06-09 08:54:16 +0000
commitbce1de5580ffd07287741543c62aa13c68646ffb (patch)
treeb158c6cf9592415fb1bcc3585a9e2aa12752b7d1
parenta039780c01cb505958ab10a08eb6fbed9493c3ed (diff)
downloadsamba-bce1de5580ffd07287741543c62aa13c68646ffb.tar.gz
vfs_gpfs: pass fsp to vfs_gpfs_getacl()
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 ac458648aa3f557b7f137f7efa88806f7cb0da71)
-rw-r--r--source3/modules/vfs_gpfs.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c
index df6edf52cf5..8d112b8f4a7 100644
--- a/source3/modules/vfs_gpfs.c
+++ b/source3/modules/vfs_gpfs.c
@@ -438,11 +438,11 @@ static int gpfs_getacl_with_capability(const char *fname, int flags, void *buf)
*
*/
static void *vfs_gpfs_getacl(TALLOC_CTX *mem_ctx,
- const char *fname,
+ struct files_struct *fsp,
const bool raw,
const gpfs_aclType_t type)
{
-
+ const char *fname = fsp->fsp_name->base_name;
void *aclbuf;
size_t size = 512;
int ret, flags;
@@ -529,7 +529,7 @@ static int gpfs_get_nfs4_acl(TALLOC_CTX *mem_ctx,
DEBUG(10, ("gpfs_get_nfs4_acl invoked for %s\n", fname));
/* Get the ACL */
- gacl = (struct gpfs_acl*) vfs_gpfs_getacl(talloc_tos(), fname,
+ gacl = (struct gpfs_acl*) vfs_gpfs_getacl(talloc_tos(), fsp,
false, 0);
if (gacl == NULL) {
DEBUG(9, ("gpfs_getacl failed for %s with %s\n",
@@ -821,7 +821,7 @@ static NTSTATUS gpfsacl_set_nt_acl_internal(vfs_handle_struct *handle, files_str
NTSTATUS result = NT_STATUS_ACCESS_DENIED;
acl = (struct gpfs_acl*) vfs_gpfs_getacl(talloc_tos(),
- fsp->fsp_name->base_name,
+ fsp,
false, 0);
if (acl == NULL) {
return map_nt_error_from_unix(errno);
@@ -944,11 +944,10 @@ 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;
- pacl = vfs_gpfs_getacl(talloc_tos(), path, false, type);
+ pacl = vfs_gpfs_getacl(talloc_tos(), fsp, false, type);
if (pacl == NULL) {
DBG_DEBUG("vfs_gpfs_getacl failed for %s with %s\n",
@@ -1038,7 +1037,7 @@ static int gpfsacl_sys_acl_blob_get_fd(vfs_handle_struct *handle,
errno = 0;
acl = (struct gpfs_opaque_acl *) vfs_gpfs_getacl(mem_ctx,
- fsp->fsp_name->base_name,
+ fsp,
true,
GPFS_ACL_TYPE_NFS4);