summaryrefslogtreecommitdiff
path: root/source3/modules/nfs4_acls.c
diff options
context:
space:
mode:
authorChristian Ambach <ambi@samba.org>2012-09-25 01:34:04 +0200
committerChristian Ambach <ambi@samba.org>2012-09-27 04:36:52 +0200
commit19631e8e7e7d871261642340ffdcec3f73dccca6 (patch)
tree1655da88051216a5a8a0b570de4e81db2eb3c76e /source3/modules/nfs4_acls.c
parent43606bcbbfe237990ab0b100cf322c0c80e90eb2 (diff)
downloadsamba-19631e8e7e7d871261642340ffdcec3f73dccca6.tar.gz
samba-19631e8e7e7d871261642340ffdcec3f73dccca6.tar.bz2
samba-19631e8e7e7d871261642340ffdcec3f73dccca6.zip
s3:nfs4acls pass down fsp instead of just the filename
Diffstat (limited to 'source3/modules/nfs4_acls.c')
-rw-r--r--source3/modules/nfs4_acls.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source3/modules/nfs4_acls.c b/source3/modules/nfs4_acls.c
index ac56bfb7e1..cc3480c2e1 100644
--- a/source3/modules/nfs4_acls.c
+++ b/source3/modules/nfs4_acls.c
@@ -574,7 +574,7 @@ static SMB_ACE4PROP_T *smbacl4_find_equal_special(
static bool smbacl4_fill_ace4(
TALLOC_CTX *mem_ctx,
- const char *filename,
+ const files_struct *fsp,
smbacl4_vfs_params *params,
uid_t ownerUID,
gid_t ownerGID,
@@ -582,6 +582,7 @@ static bool smbacl4_fill_ace4(
SMB_ACE4PROP_T *ace_v4 /* output */
)
{
+ const char *filename = fsp->fsp_name->base_name;
DEBUG(10, ("got ace for %s\n", sid_string_dbg(&ace_nt->trustee)));
memset(ace_v4, 0, sizeof(SMB_ACE4PROP_T));
@@ -673,7 +674,7 @@ static int smbacl4_MergeIgnoreReject(
}
static SMB4ACL_T *smbacl4_win2nfs4(
- const char *filename,
+ const files_struct *fsp,
const struct security_acl *dacl,
smbacl4_vfs_params *pparams,
uid_t ownerUID,
@@ -683,6 +684,7 @@ static SMB4ACL_T *smbacl4_win2nfs4(
SMB4ACL_T *theacl;
uint32 i;
TALLOC_CTX *mem_ctx = talloc_tos();
+ const char *filename = fsp->fsp_name->base_name;
DEBUG(10, ("smbacl4_win2nfs4 invoked\n"));
@@ -694,7 +696,7 @@ static SMB4ACL_T *smbacl4_win2nfs4(
SMB_ACE4PROP_T ace_v4;
bool addNewACE = True;
- if (!smbacl4_fill_ace4(mem_ctx, filename, pparams,
+ if (!smbacl4_fill_ace4(mem_ctx, fsp, pparams,
ownerUID, ownerGID,
dacl->aces + i, &ace_v4)) {
DEBUG(3, ("Could not fill ace for file %s, SID %s\n",
@@ -791,7 +793,7 @@ NTSTATUS smb_set_nt_acl_nfs4(files_struct *fsp,
return NT_STATUS_OK;
}
- theacl = smbacl4_win2nfs4(fsp->fsp_name->base_name, psd->dacl, &params,
+ theacl = smbacl4_win2nfs4(fsp, psd->dacl, &params,
sbuf.st_ex_uid, sbuf.st_ex_gid);
if (!theacl)
return map_nt_error_from_unix(errno);