s3:modules fix Bug 8330 NFSv4 ACL merging logic is broken
authorChristian Ambach <ambi@samba.org>
Wed, 27 Jul 2011 12:46:00 +0000 (14:46 +0200)
committerChristian Ambach <ambi@samba.org>
Wed, 27 Jul 2011 14:03:51 +0000 (16:03 +0200)
we should not merge ACEs with different flags (e.g. CI/OI/I/)
Otherwise ACLs get wrong entries and thus wrong semantics

Example:
ACL:BUILTIN\Users:ALLOWED/0x0/FULL
ACL:BUILTIN\Users:ALLOWED/I/READ
got merged to
ACL:BUILTIN\Users:ALLOWED/I/FULL

This is not the same and also leads to wrong displays
in the Windows ACL dialog

Autobuild-User: Christian Ambach <ambi@samba.org>
Autobuild-Date: Wed Jul 27 16:03:51 CEST 2011 on sn-devel-104

source3/modules/nfs4_acls.c

index 09ef522b41923e531064a35d656110a831366c15..f1c2904c9e3f10ef42ae5a234b27a0df9326da96 100644 (file)
@@ -519,8 +519,7 @@ static SMB_ACE4PROP_T *smbacl4_find_equal_special(
 
                if (ace->flags == aceNew->flags &&
                        ace->aceType==aceNew->aceType &&
-                       ((ace->aceFlags&SMB_ACE4_INHERIT_ONLY_ACE)==
-                        (aceNew->aceFlags&SMB_ACE4_INHERIT_ONLY_ACE)) &&
+                       ace->aceFlags==aceNew->aceFlags &&
                        (ace->aceFlags&SMB_ACE4_IDENTIFIER_GROUP)==
                        (aceNew->aceFlags&SMB_ACE4_IDENTIFIER_GROUP)
                ) {