Date: Wed, 9 Jul 2008 07:51:10 GMT From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 144929 for review Message-ID: <200807090751.m697pAmZ012487@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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); /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200807090751.m697pAmZ012487>