reject ACLs with DESC_DACL_PROTECTED on GPFS
authorChristian Ambach <christian.ambach@de.ibm.com>
Thu, 9 Jul 2009 12:45:23 +0000 (14:45 +0200)
committerMichael Adam <obnox@samba.org>
Tue, 28 Jul 2009 12:40:03 +0000 (14:40 +0200)
as GPFS does not support the ACE4_FLAG_NO_PROPAGATE NFSv4 flag (which would be the mapping for the DESC_DACL_PROTECTED flag), the status of this flag is currently silently ignored by Samba. That means that if you deselect the "Allow inheritable permissions..." checkbox in Windows' ACL dialog and then apply the ACL, the flag will be back immediately.

To make sure that automatic migration with e.g. robocopy does not lead to ACLs silently (and unintentionally) changed, this patch adds an explicit check for this flag and if set, it will return NT_STATUS_NOT_SUPPORTED so errors are shown up on the Windows side and the Administrator is aware of the ACLs not being settable like intended

Signed-off-by: Christian Ambach <christian.ambach@de.ibm.com>
source/modules/vfs_gpfs.c

index 7c49c8497f586ad46342d821970860cd73af9722..6d1441cb86d0e5f1693b53dcca2527a0a9fb317a 100644 (file)
@@ -445,6 +445,11 @@ static NTSTATUS gpfsacl_set_nt_acl_internal(files_struct *fsp, uint32 security_i
 
        if (acl->acl_version&GPFS_ACL_VERSION_NFS4)
        {
+               if ((psd->type&SEC_DESC_DACL_PROTECTED)) {
+                       DEBUG(2, ("Rejecting unsupported ACL with DACL_PROTECTED bit set\n"));
+                       return NT_STATUS_NOT_SUPPORTED;
+               }
+
                result = smb_set_nt_acl_nfs4(
                        fsp, security_info_sent, psd,
                        gpfsacl_process_smbacl);