summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorChristian Ambach <ambi@samba.org>2013-01-08 17:07:09 +0100
committerAndrew Bartlett <abartlet@samba.org>2013-02-04 12:19:30 +0100
commit5388773d4baf902d8dd70d046cacc5a15fa790d7 (patch)
tree9db3d0832753fa699617a7bca2cfba376235d574 /source3
parent16940d8a8ecb46a6de9cf5c83da7d2f54030777b (diff)
downloadsamba-5388773d4baf902d8dd70d046cacc5a15fa790d7.tar.gz
samba-5388773d4baf902d8dd70d046cacc5a15fa790d7.tar.bz2
samba-5388773d4baf902d8dd70d046cacc5a15fa790d7.zip
s3:modules use vfs_gpfs_getacl in gpfsacl_set_nt_acl_internal
as preparation to remove gpfs_getacl_alloc() Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/modules/vfs_gpfs.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c
index 8417a6c153..b017c661d4 100644
--- a/source3/modules/vfs_gpfs.c
+++ b/source3/modules/vfs_gpfs.c
@@ -600,16 +600,19 @@ static NTSTATUS gpfsacl_set_nt_acl_internal(files_struct *fsp, uint32 security_i
struct gpfs_acl *acl;
NTSTATUS result = NT_STATUS_ACCESS_DENIED;
- acl = gpfs_getacl_alloc(fsp->fsp_name->base_name, 0);
- if (acl == NULL)
- return result;
+ acl = (struct gpfs_acl*) vfs_gpfs_getacl(talloc_tos(),
+ fsp->fsp_name->base_name,
+ false, 0);
+ if (acl == NULL) {
+ return map_nt_error_from_unix(errno);
+ }
- if (acl->acl_version&GPFS_ACL_VERSION_NFS4)
- {
+ if (acl->acl_version == GPFS_ACL_VERSION_NFS4) {
if (lp_parm_bool(fsp->conn->params->service, "gpfs",
"refuse_dacl_protected", false)
&& (psd->type&SEC_DESC_DACL_PROTECTED)) {
DEBUG(2, ("Rejecting unsupported ACL with DACL_PROTECTED bit set\n"));
+ talloc_free(acl);
return NT_STATUS_NOT_SUPPORTED;
}
@@ -620,6 +623,7 @@ static NTSTATUS gpfsacl_set_nt_acl_internal(files_struct *fsp, uint32 security_i
result = set_nt_acl(fsp, security_info_sent, psd);
}
+ talloc_free(acl);
return result;
}