PERFORCE change 147392 for review

Edward Tomasz Napierala trasz at FreeBSD.org
Thu Aug 14 15:32:56 UTC 2008


http://perforce.freebsd.org/chv.cgi?CH=147392

Change 147392 by trasz at trasz_traszkan on 2008/08/14 15:32:00

	Tweak computing mode from ACL and computing inherited ACL
	to match ZFS.

Affected files ...

.. //depot/projects/soc2008/trasz_nfs4acl/sys/kern/subr_acl_nfs4.c#24 edit

Differences ...

==== //depot/projects/soc2008/trasz_nfs4acl/sys/kern/subr_acl_nfs4.c#24 (text+ko) ====

@@ -686,8 +686,10 @@
 		    entry->ae_extended != ACL_EXTENDED_DENY)
 			continue;
 
+#ifdef SunOS_doesnt_do_that
 		if (entry->ae_flags & ACL_ENTRY_ONLY_INHERIT)
 			continue;
+#endif
 
 		if (entry->ae_tag == ACL_USER_OBJ) {
 			if ((entry->ae_perm & ACL_READ_DATA) &&
@@ -857,6 +859,14 @@
 			ACL_ENTRY_ONLY_INHERIT);
 
 			/*
+			 * This is not in the specification, but SunOS
+			 * apparently does that.
+			 */
+			if (entry->ae_extended == ACL_EXTENDED_ALLOW)
+				entry->ae_perm &= ~(ACL_WRITE_ACL |
+				    ACL_WRITE_OWNER);
+
+			/*
 			 * Continue on to the next ACE.
 			 */
 			continue;
@@ -880,7 +890,7 @@
 		}
 
 		/*
-		 * 2.C. If the type of hte ACE is neither ALLOW nor deny,
+		 * 2.C. If the type of the ACE is neither ALLOW nor deny,
 		 *      then continue.
 		 */
 		if (entry->ae_extended != ACL_EXTENDED_ALLOW &&
@@ -912,9 +922,6 @@
 		 *      an implementation MAY clear the following
 		 *      mask bits: ACL_WRITE_ACL, ACL_WRITE_OWNER.
 		 */
-		/*
-		 * XXX: MAY?
-		 */
 		if (copy->ae_extended == ACL_EXTENDED_ALLOW)
 			copy->ae_perm &= ~(ACL_WRITE_ACL | ACL_WRITE_OWNER);
 


More information about the p4-projects mailing list