Checking file access on size change is bogus. The checks are done earlier by
VFS where we know if this is truncate(2) or ftruncate(2). If this is the latter we should depend on the mode the file was opened and not on the current permission. PR: standards/154873 Reported by: Mark Martinec <Mark.Martinec@ijs.si> Discussed with: Eric Schrock <eric.schrock@delphix.com> Discussed with: Mark Maybee <Mark.Maybee@Oracle.COM> MFC after: 1 month
This commit is contained in:
parent
f9db2550b2
commit
65612637e8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=219973
@ -2962,11 +2962,6 @@ zfs_setattr(vnode_t *vp, vattr_t *vap, int flags, cred_t *cr,
|
||||
*/
|
||||
|
||||
if (mask & AT_SIZE) {
|
||||
err = zfs_zaccess(zp, ACE_WRITE_DATA, 0, skipaclchk, cr);
|
||||
if (err) {
|
||||
ZFS_EXIT(zfsvfs);
|
||||
return (err);
|
||||
}
|
||||
/*
|
||||
* XXX - Note, we are not providing any open
|
||||
* mode flags here (like FNDELAY), so we may
|
||||
|
Loading…
Reference in New Issue
Block a user