Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 May 2019 15:20:18 +0000 (UTC)
From:      Alan Somers <asomers@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r347184 - projects/fuse2/sys/fs/fuse
Message-ID:  <201905061520.x46FKIUH077726@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: asomers
Date: Mon May  6 15:20:18 2019
New Revision: 347184
URL: https://svnweb.freebsd.org/changeset/base/347184

Log:
  fusefs: don't allow truncating irregular files on an read-only mount
  
  The readonly mount check had a special case allowing the sizes of files to
  be changed if they weren't regular files.  I don't know why.  Neither UFS,
  ZFS, nor ext2 have such a special case, and I don't know when you would ever
  change the size of a non-regular file anyway.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  projects/fuse2/sys/fs/fuse/fuse_vnops.c

Modified: projects/fuse2/sys/fs/fuse/fuse_vnops.c
==============================================================================
--- projects/fuse2/sys/fs/fuse/fuse_vnops.c	Mon May  6 09:48:34 2019	(r347183)
+++ projects/fuse2/sys/fs/fuse/fuse_vnops.c	Mon May  6 15:20:18 2019	(r347184)
@@ -1625,7 +1625,7 @@ fuse_vnop_setattr(struct vop_setattr_args *ap)
 		err = EISDIR;
 		goto out;
 	}
-	if (vfs_isrdonly(vnode_mount(vp)) && (fsai->valid & ~FATTR_SIZE || vtyp == VREG)) {
+	if (vfs_isrdonly(vnode_mount(vp))) {
 		err = EROFS;
 		goto out;
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905061520.x46FKIUH077726>