diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-06-11 16:34:26 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-06-11 16:34:26 +0000 |
commit | 86c773a4dc4933c3cd0e78aa525859c8d82c952b (patch) | |
tree | 589fd3dd175bd415609518c99fd35cfbc1d365ef /sys/miscfs/fdesc | |
parent | a4fc5b388b5d5b095e47db4f5e2719d777bc4d05 (diff) |
return EOPNOTSUPP for chflags() changes; peter@freebsd
Diffstat (limited to 'sys/miscfs/fdesc')
-rw-r--r-- | sys/miscfs/fdesc/fdesc_vnops.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/miscfs/fdesc/fdesc_vnops.c b/sys/miscfs/fdesc/fdesc_vnops.c index 0522be7820e..decb05b8883 100644 --- a/sys/miscfs/fdesc/fdesc_vnops.c +++ b/sys/miscfs/fdesc/fdesc_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fdesc_vnops.c,v 1.10 1997/11/06 05:58:33 csapuntz Exp $ */ +/* $OpenBSD: fdesc_vnops.c,v 1.11 1998/06/11 16:34:21 deraadt Exp $ */ /* $NetBSD: fdesc_vnops.c,v 1.32 1996/04/11 11:24:29 mrg Exp $ */ /* @@ -617,6 +617,7 @@ fdesc_setattr(v) struct proc *a_p; } */ *ap = v; struct filedesc *fdp = ap->a_p->p_fd; + struct vattr *vap = ap->a_vap; struct file *fp; unsigned fd; int error; @@ -629,6 +630,8 @@ fdesc_setattr(v) break; case Fctty: + if (vap->va_flags != VNOVAL) + return (EOPNOTSUPP); return (0); default: @@ -644,13 +647,16 @@ fdesc_setattr(v) * Can setattr the underlying vnode, but not sockets! */ switch (fp->f_type) { + 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: - error = 0; + if (vap->va_flags != VNOVAL) + error = EOPNOTSUPP; + else + error = 0; break; default: |