From owner-p4-projects@FreeBSD.ORG Thu Aug 14 15:32:56 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DE2D31065684; Thu, 14 Aug 2008 15:32:55 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A15B71065681 for ; Thu, 14 Aug 2008 15:32:55 +0000 (UTC) (envelope-from trasz@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 93E848FC0C for ; Thu, 14 Aug 2008 15:32:55 +0000 (UTC) (envelope-from trasz@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.2/8.14.2) with ESMTP id m7EFWtvQ097179 for ; Thu, 14 Aug 2008 15:32:55 GMT (envelope-from trasz@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.2/8.14.1/Submit) id m7EFWt2A097177 for perforce@freebsd.org; Thu, 14 Aug 2008 15:32:55 GMT (envelope-from trasz@freebsd.org) Date: Thu, 14 Aug 2008 15:32:55 GMT Message-Id: <200808141532.m7EFWt2A097177@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to trasz@freebsd.org using -f From: Edward Tomasz Napierala To: Perforce Change Reviews Cc: Subject: PERFORCE change 147392 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Aug 2008 15:32:56 -0000 http://perforce.freebsd.org/chv.cgi?CH=147392 Change 147392 by trasz@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);