Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/vfs_syscalls.c
Show First 20 Lines • Show All 4,191 Lines • ▼ Show 20 Lines | #endif | ||||
error = VOP_GETATTR(vp, &vattr, td->td_ucred); | error = VOP_GETATTR(vp, &vattr, td->td_ucred); | ||||
if (error != 0) | if (error != 0) | ||||
goto out; | goto out; | ||||
if (td->td_ucred->cr_uid != vattr.va_uid) { | if (td->td_ucred->cr_uid != vattr.va_uid) { | ||||
error = priv_check(td, PRIV_VFS_ADMIN); | error = priv_check(td, PRIV_VFS_ADMIN); | ||||
if (error != 0) | if (error != 0) | ||||
goto out; | goto out; | ||||
} | } | ||||
if (vp->v_usecount > 1 || vcount(vp) > 1) | if (vcount(vp) > 0) | ||||
mjg: this should be > 0 | |||||
VOP_REVOKE(vp, REVOKEALL); | VOP_REVOKE(vp, REVOKEALL); | ||||
out: | out: | ||||
vput(vp); | vput(vp); | ||||
return (error); | return (error); | ||||
} | } | ||||
/* | /* | ||||
* Convert a user file descriptor to a kernel file entry and check that, if it | * Convert a user file descriptor to a kernel file entry and check that, if it | ||||
▲ Show 20 Lines • Show All 684 Lines • Show Last 20 Lines |
this should be > 0