Module Name: src Committed By: simonb Date: Wed Dec 22 14:04:10 UTC 2021
Modified Files: src/external/cddl/osnet/dist/uts/common/fs/zfs: zfs_vnops.c Log Message: In zfs_setattr() don't recheck the auth policy for a "nodump" flags change. zfs_netbsd_setattr() has already checked if this request is authorised, and our secpolicy_xvattr() doesn't check kauth chflags. XXX: Fix this propery when we migrate to openzfs. riastradh@: Seems reasonable. To generate a diff of this commit: cvs rdiff -u -r1.76 -r1.77 \ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.76 src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.77 --- src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.76 Wed Oct 20 03:08:19 2021 +++ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c Wed Dec 22 14:04:10 2021 @@ -3503,7 +3503,17 @@ zfs_setattr(vnode_t *vp, vattr_t *vap, i if (XVA_ISSET_REQ(xvap, XAT_NODUMP)) { if (xoap->xoa_nodump != ((zp->z_pflags & ZFS_NODUMP) != 0)) { +#if 0 + /* + * XXXSB - zfs_netbsd_setattr() + * has already checked if this + * request is authorised, and our + * secpolicy_xvattr() doesn't check + * kauth chflags. Fix this when we + * migrate to openzfs. + */ need_policy = TRUE; +#endif } else { XVA_CLR_REQ(xvap, XAT_NODUMP); XVA_SET_REQ(&tmpxvattr, XAT_NODUMP);