Date: Thu, 7 Aug 2008 00:00:27 GMT From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 146809 for review Message-ID: <200808070000.m7700ReL022341@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=146809 Change 146809 by trasz@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200808070000.m7700ReL022341>