summaryrefslogtreecommitdiffstats
path: root/sys/miscfs
diff options
context:
space:
mode:
authorchris <chris@FreeBSD.org>2000-06-06 00:35:39 +0000
committerchris <chris@FreeBSD.org>2000-06-06 00:35:39 +0000
commit5895c7a8d40fb28fa99795d5e817fe570813b1d6 (patch)
tree8dfa31ef7c00d3ebb632e4d2ca9426f7f3d6648d /sys/miscfs
parent7d22f1b9d19743991f90279da10783ae4849d502 (diff)
downloadFreeBSD-src-5895c7a8d40fb28fa99795d5e817fe570813b1d6.zip
FreeBSD-src-5895c7a8d40fb28fa99795d5e817fe570813b1d6.tar.gz
Instead of completely disallowing VOP_SETATTR, just do it where there is
an underlying vnode. Suggested by: bde
Diffstat (limited to 'sys/miscfs')
-rw-r--r--sys/miscfs/fdesc/fdesc_vnops.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/miscfs/fdesc/fdesc_vnops.c b/sys/miscfs/fdesc/fdesc_vnops.c
index edfe105..4397337 100644
--- a/sys/miscfs/fdesc/fdesc_vnops.c
+++ b/sys/miscfs/fdesc/fdesc_vnops.c
@@ -401,13 +401,17 @@ fdesc_setattr(ap)
return (EBADF);
/*
- * Do not allow anybody to actually setattr anything.
+ * Allow setattr where there is an underlying vnode.
*/
switch (fp->f_type) {
case DTYPE_FIFO:
- case DTYPE_PIPE:
case DTYPE_VNODE:
+ error = VOP_SETATTR((struct vnode *) fp->f_data, ap->a_vap,
+ ap->a_cred, ap->a_p);
+ break;
+
case DTYPE_SOCKET:
+ case DTYPE_PIPE:
case DTYPE_KQUEUE:
if (vap->va_flags != VNOVAL)
error = EOPNOTSUPP;
OpenPOWER on IntegriCloud