PERFORCE change 146809 for review
Edward Tomasz Napierala
trasz at FreeBSD.org
Thu Aug 7 00:00:28 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=146809
Change 146809 by trasz at trasz_traszkan on 2008/08/07 00:00:01
Fix a bug where mkdir in a directory that has immutable flag set
would succeed.
This was happening, because with granularity support, permission
checked during mkdir is VAPPEND, not VWRITE.
With this fix, UFS passes fstest again.
Affected files ...
.. //depot/projects/soc2008/trasz_nfs4acl/sys/ufs/ufs/ufs_vnops.c#9 edit
Differences ...
==== //depot/projects/soc2008/trasz_nfs4acl/sys/ufs/ufs/ufs_vnops.c#9 (text+ko) ====
@@ -320,7 +320,7 @@
* unless the file is a socket, fifo, or a block or
* character device resident on the filesystem.
*/
- if (mode & VWRITE) {
+ if (mode & (VWRITE | VAPPEND)) {
switch (vp->v_type) {
case VDIR:
case VLNK:
@@ -334,7 +334,7 @@
}
/* If immutable bit set, nobody gets to write it. */
- if ((mode & VWRITE) && (ip->i_flags & (IMMUTABLE | SF_SNAPSHOT)))
+ if ((mode & (VWRITE | VAPPEND)) && (ip->i_flags & (IMMUTABLE | SF_SNAPSHOT)))
return (EPERM);
#ifdef UFS_ACL
More information about the p4-projects
mailing list