From owner-p4-projects@FreeBSD.ORG Sat Oct 25 07:52:45 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C477B16A4C0; Sat, 25 Oct 2003 07:52:44 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 92CD116A4B3 for ; Sat, 25 Oct 2003 07:52:44 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E399543FAF for ; Sat, 25 Oct 2003 07:52:43 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h9PEqhXJ007879 for ; Sat, 25 Oct 2003 07:52:43 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h9PEqhok007876 for perforce@freebsd.org; Sat, 25 Oct 2003 07:52:43 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Sat, 25 Oct 2003 07:52:43 -0700 (PDT) Message-Id: <200310251452.h9PEqhok007876@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Subject: PERFORCE change 40479 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Oct 2003 14:52:45 -0000 http://perforce.freebsd.org/chv.cgi?CH=40479 Change 40479 by rwatson@rwatson_paprika on 2003/10/25 07:52:06 Submit some WIP pieces related to pushing cmask processing into per-filesystem code. This is required to implement Solaris/ Linux semantics for default ACL masks. Affected files ... .. //depot/projects/trustedbsd/acl/sys/kern/kern_acl.c#7 edit .. //depot/projects/trustedbsd/acl/sys/sys/acl.h#5 edit .. //depot/projects/trustedbsd/acl/sys/ufs/ufs/ufs_vnops.c#5 edit Differences ... ==== //depot/projects/trustedbsd/acl/sys/kern/kern_acl.c#7 (text+ko) ==== @@ -620,12 +620,10 @@ /* * Given a requested mode for a new object, and a default ACL, combine * the two to produce a new mode. Be careful not to clear any bits that - * aren't intended to be affected by the POSIX.1e ACL. Eventually, - * this might also take the cmask as an argument, if we push that down - * into per-filesystem-code. + * aren't intended to be affected by the POSIX.1e ACL. */ mode_t -acl_posix1e_newfilemode(mode_t cmode, struct acl *dacl) +acl_posix1e_newfilemode(mode_t cmode, int cmask, struct acl *dacl) { mode_t mode; ==== //depot/projects/trustedbsd/acl/sys/sys/acl.h#5 (text+ko) ==== @@ -144,7 +144,7 @@ struct acl_entry *acl_group_obj_entry, struct acl_entry *acl_other_entry); mode_t acl_posix1e_acl_to_mode(struct acl *acl); -mode_t acl_posix1e_newfilemode(mode_t cmode, +mode_t acl_posix1e_newfilemode(mode_t cmode, int cmask, struct acl *dacl); /* ==== //depot/projects/trustedbsd/acl/sys/ufs/ufs/ufs_vnops.c#5 (text+ko) ==== @@ -1356,6 +1356,7 @@ struct vnode **a_vpp; struct componentname *a_cnp; struct vattr *a_vap; + int a_cmask; } */ *ap; { struct vnode *dvp = ap->a_dvp; @@ -1474,7 +1475,8 @@ * the "not defined or available" case. */ if (acl->acl_cnt != 0) { - dmode = acl_posix1e_newfilemode(dmode, acl); + dmode = acl_posix1e_newfilemode(dmode, + ap->a_cmask, acl); ip->i_mode = dmode; DIP(ip, i_mode) = dmode; *dacl = *acl; @@ -1772,6 +1774,7 @@ struct componentname *a_cnp; struct vattr *a_vap; char *a_target; + int a_cmask; } */ *ap; { struct vnode *vp, **vpp = ap->a_vpp;