Skip to content

Commit

Permalink
vfs_gpfs: pass fsp to gpfs_getacl_with_capability()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
slowfranklin authored and jrasamba committed Jun 3, 2022
1 parent ac45864 commit 1b2c70f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions source3/modules/vfs_gpfs.c
Expand Up @@ -423,7 +423,9 @@ static void gpfs_dumpacl(int level, struct gpfs_acl *gacl)
}
}

static int gpfs_getacl_with_capability(const char *fname, int flags, void *buf)
static int gpfs_getacl_with_capability(struct files_struct *fsp,
int flags,
void *buf)
{
int ret, saved_errno;

Expand Down Expand Up @@ -488,13 +490,13 @@ static void *vfs_gpfs_getacl(TALLOC_CTX *mem_ctx,
*len = size;

if (use_capability) {
ret = gpfs_getacl_with_capability(fname, flags, aclbuf);
ret = gpfs_getacl_with_capability(fsp, flags, aclbuf);
} else {
ret = gpfswrap_getacl(fname, flags, aclbuf);
if ((ret != 0) && (errno == EACCES)) {
DBG_DEBUG("Retry with DAC capability for %s\n", fname);
use_capability = true;
ret = gpfs_getacl_with_capability(fname, flags, aclbuf);
ret = gpfs_getacl_with_capability(fsp, flags, aclbuf);
}
}

Expand Down

0 comments on commit 1b2c70f

Please sign in to comment.