PERFORCE change 144929 for review
Edward Tomasz Napierala
trasz at FreeBSD.org
Wed Jul 9 07:51:11 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=144929
Change 144929 by trasz at 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);
/*
More information about the p4-projects
mailing list