Changeset View
Changeset View
Standalone View
Standalone View
sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c
Show First 20 Lines • Show All 1,341 Lines • ▼ Show 20 Lines | if (!(vfsp->vfs_flag & MS_REMOUNT)) { | ||||
/* | /* | ||||
* Make sure user is the owner of the mount point | * Make sure user is the owner of the mount point | ||||
* or has sufficient privileges. | * or has sufficient privileges. | ||||
*/ | */ | ||||
vattr.va_mask = AT_UID; | vattr.va_mask = AT_UID; | ||||
vn_lock(mvp, LK_SHARED | LK_RETRY); | vn_lock(mvp, LK_SHARED | LK_RETRY); | ||||
if (VOP_GETATTR(mvp, &vattr, cr)) { | if (VOP_GETATTR(mvp, 0, &vattr, cr)) { | ||||
VOP_UNLOCK(mvp); | VOP_UNLOCK(mvp); | ||||
goto out; | goto out; | ||||
} | } | ||||
if (secpolicy_vnode_owner(mvp, cr, vattr.va_uid) != 0 && | if (secpolicy_vnode_owner(mvp, cr, vattr.va_uid) != 0 && | ||||
VOP_ACCESS(mvp, VWRITE, cr, td) != 0) { | VOP_ACCESS(mvp, VWRITE, cr, td) != 0) { | ||||
VOP_UNLOCK(mvp); | VOP_UNLOCK(mvp); | ||||
goto out; | goto out; | ||||
▲ Show 20 Lines • Show All 1,170 Lines • Show Last 20 Lines |