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
This commit is contained in:
parent
e5ff3a7e28
commit
ac0a68e9cd
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user