From owner-p4-projects@FreeBSD.ORG Wed Jul 9 07:51:11 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0EFA01065677; Wed, 9 Jul 2008 07:51:11 +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 C74631065673 for ; Wed, 9 Jul 2008 07:51:10 +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 B774D8FC29 for ; Wed, 9 Jul 2008 07:51:10 +0000 (UTC) (envelope-from trasz@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m697pAid012489 for ; Wed, 9 Jul 2008 07:51:10 GMT (envelope-from trasz@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.2/8.14.1/Submit) id m697pAmZ012487 for perforce@freebsd.org; Wed, 9 Jul 2008 07:51:10 GMT (envelope-from trasz@freebsd.org) Date: Wed, 9 Jul 2008 07:51:10 GMT Message-Id: <200807090751.m697pAmZ012487@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 144929 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: Wed, 09 Jul 2008 07:51:11 -0000 http://perforce.freebsd.org/chv.cgi?CH=144929 Change 144929 by trasz@trasz_traszkan on 2008/07/09 07:50:25 Make ACL_WRITE_DATA and ACL_APPEND_DATA work wrt creating files and directories. For writing and appending to ordinary files, these flags worked already before this commit. Affected files ... .. //depot/projects/soc2008/trasz_nfs4acl/TODO#10 edit .. //depot/projects/soc2008/trasz_nfs4acl/sys/ufs/ufs/ufs_lookup.c#3 edit Differences ... ==== //depot/projects/soc2008/trasz_nfs4acl/TODO#10 (text+ko) ==== @@ -29,6 +29,8 @@ - Make access control more granular. The following are done: ACL_READ_DATA + ACL_WRITE_DATA + ACL_APPEND_DATA ACL_EXECUTE ACL_READ_ATTRIBUTES ACL_WRITE_ATTRIBUTES @@ -41,8 +43,6 @@ The following are left: - ACL_WRITE_DATA - ACL_APPEND_DATA ACL_DELETE_CHILD ACL_DELETE ==== //depot/projects/soc2008/trasz_nfs4acl/sys/ufs/ufs/ufs_lookup.c#3 (text+ko) ==== @@ -407,8 +407,13 @@ /* * Access for write is interpreted as allowing * creation of files in the directory. + * + * XXX: Fix the comment above. */ - error = VOP_ACCESS(vdp, VWRITE, cred, cnp->cn_thread); + if (flags & WILLBEDIR) + error = VOP_GRANULAR(vdp, VWRITE, ACL_APPEND_DATA, cred, cnp->cn_thread); + else + error = VOP_GRANULAR(vdp, VWRITE, ACL_WRITE_DATA, cred, cnp->cn_thread); if (error) return (error); /*