Author: imp Date: Sat Aug 2 05:05:10 2014 New Revision: 269421 URL: http://svnweb.freebsd.org/changeset/base/269421
Log: Follow the ufs practice for disallowing permission changes as well as writes to files for read-only file systems. Since there are already checks in nandfs_setattr that return an error, this moves detection of the error earlier. Modified: head/sys/fs/nandfs/nandfs_vnops.c Modified: head/sys/fs/nandfs/nandfs_vnops.c ============================================================================== --- head/sys/fs/nandfs/nandfs_vnops.c Sat Aug 2 05:05:05 2014 (r269420) +++ head/sys/fs/nandfs/nandfs_vnops.c Sat Aug 2 05:05:10 2014 (r269421) @@ -987,7 +987,7 @@ nandfs_check_possible(struct vnode *vp, * Normal nodes: check if we're on a read-only mounted * filingsystem and bomb out if we're trying to write. */ - if ((mode & VWRITE) && (vp->v_mount->mnt_flag & MNT_RDONLY)) + if ((mode & VMODIFY_PERMS) && (vp->v_mount->mnt_flag & MNT_RDONLY)) return (EROFS); break; case VBLK: _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"