1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

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>
This commit is contained in:
Christian Ambach 2013-01-08 17:07:09 +01:00 committed by Andrew Bartlett
parent 16940d8a8e
commit 5388773d4b

View File

@ -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;
}