summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_syscalls.c
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1999-01-24 06:28:37 +0000
committerbde <bde@FreeBSD.org>1999-01-24 06:28:37 +0000
commitee544bdf098cac8a8c98e02af63e6ef3d577e873 (patch)
treead35b7837c8cd8738c836c434817eb58483296a4 /sys/kern/vfs_syscalls.c
parente106763b9268a14d32642e0c09e366243a5eda71 (diff)
downloadFreeBSD-src-ee544bdf098cac8a8c98e02af63e6ef3d577e873.zip
FreeBSD-src-ee544bdf098cac8a8c98e02af63e6ef3d577e873.tar.gz
Go back to only supporting revoke() for bdevs and cdevs. It is very
buggy for fifos, and no one seems to have investigated its behaviour on other types of files. It has been broken since the Lite2 merge in rev.1.54. Nagged about by: Brian Feldman (green@unixhelp.org)
Diffstat (limited to 'sys/kern/vfs_syscalls.c')
-rw-r--r--sys/kern/vfs_syscalls.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index 18e39d6..9b444fc 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_syscalls.c 8.13 (Berkeley) 4/15/94
- * $Id: vfs_syscalls.c,v 1.111 1998/12/12 21:07:09 dillon Exp $
+ * $Id: vfs_syscalls.c,v 1.112 1999/01/05 18:49:55 eivind Exp $
*/
/* For 4.3 integer FS ID compatibility */
@@ -2909,6 +2909,10 @@ revoke(p, uap)
if (error = namei(&nd))
return (error);
vp = nd.ni_vp;
+ if (vp->v_type != VCHR && vp->v_type != VBLK) {
+ error = EINVAL;
+ goto out;
+ }
if (error = VOP_GETATTR(vp, &vattr, p->p_ucred, p))
goto out;
if (p->p_ucred->cr_uid != vattr.va_uid &&
OpenPOWER on IntegriCloud