summaryrefslogtreecommitdiff
path: root/source3/modules
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2007-12-03 18:31:03 +0100
committerMichael Adam <obnox@samba.org>2007-12-19 23:08:00 +0100
commitaca40f29d5aa96c980fbe010e91be4c0dc608f5f (patch)
treebd7229656cdde0304f4b8136934ced4e18911cef /source3/modules
parentfcee8ccdcdec341f758fb8aa30d5eb432430005d (diff)
downloadsamba-aca40f29d5aa96c980fbe010e91be4c0dc608f5f.tar.gz
samba-aca40f29d5aa96c980fbe010e91be4c0dc608f5f.tar.bz2
samba-aca40f29d5aa96c980fbe010e91be4c0dc608f5f.zip
Prepare the aix2 acl module for the api change in get_nt_acl().
This makes both of aixjfs2_[f]get_nt_acl() more specific, eliminating the need for aixjfs2_get_nt_acl_common(). Michael (This used to be commit 36e2a814ba50feefa34c76353c0f5dec1d7cfff4)
Diffstat (limited to 'source3/modules')
-rw-r--r--source3/modules/vfs_aixacl2.c32
1 files changed, 21 insertions, 11 deletions
diff --git a/source3/modules/vfs_aixacl2.c b/source3/modules/vfs_aixacl2.c
index 289f4af9e6..d28efa55c6 100644
--- a/source3/modules/vfs_aixacl2.c
+++ b/source3/modules/vfs_aixacl2.c
@@ -158,8 +158,9 @@ static bool aixjfs2_get_nfs4_acl(const char *name,
return True;
}
-static NTSTATUS aixjfs2_get_nt_acl_common(files_struct *fsp,
- uint32 security_info, SEC_DESC **ppdesc)
+static NTSTATUS aixjfs2_fget_nt_acl(vfs_handle_struct *handle,
+ files_struct *fsp, int fd, uint32 security_info,
+ SEC_DESC **ppdesc)
{
SMB4ACL_T *pacl = NULL;
bool result;
@@ -178,18 +179,27 @@ static NTSTATUS aixjfs2_get_nt_acl_common(files_struct *fsp,
return smb_fget_nt_acl_nfs4(fsp, security_info, ppdesc, pacl);
}
-NTSTATUS aixjfs2_fget_nt_acl(vfs_handle_struct *handle,
- files_struct *fsp, int fd, uint32 security_info,
- SEC_DESC **ppdesc)
-{
- return aixjfs2_get_nt_acl_common(fsp, security_info, ppdesc);
-}
-
-NTSTATUS aixjfs2_get_nt_acl(vfs_handle_struct *handle,
+static NTSTATUS aixjfs2_get_nt_acl(vfs_handle_struct *handle,
files_struct *fsp, const char *name,
uint32 security_info, SEC_DESC **ppdesc)
{
- return aixjfs2_get_nt_acl_common(fsp, security_info, ppdesc);
+ SMB4ACL_T *pacl = NULL;
+ bool result;
+ bool retryPosix = False;
+
+ *ppdesc = NULL;
+ result = aixjfs2_get_nfs4_acl(name, &pacl, &retryPosix);
+ if (retryPosix)
+ {
+ DEBUG(10, ("retrying with posix acl...\n"));
+ return posix_get_nt_acl(handle->conn, name security_info,
+ ppdesc);
+ }
+ if (result==False)
+ return NT_STATUS_ACCESS_DENIED;
+
+ return smb_get_nt_acl_nfs4(handle->conn, name, security_info, ppdesc,
+ pacl);
}
static SMB_ACL_T aixjfs2_get_posix_acl(const char *path, acl_type_t type)