diff options
author | peter <peter@FreeBSD.org> | 1998-06-10 06:34:57 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1998-06-10 06:34:57 +0000 |
commit | e18ee5bdc0d95e2db3db25d25b61f68e157f5d54 (patch) | |
tree | f735f51659acec8cea05a07776bdcce0ba47a58a /sys/fs | |
parent | f7008b4ff185d43e52f4fc9aea783c2334c302aa (diff) | |
download | FreeBSD-src-e18ee5bdc0d95e2db3db25d25b61f68e157f5d54.zip FreeBSD-src-e18ee5bdc0d95e2db3db25d25b61f68e157f5d54.tar.gz |
Don't silently accept attempts to change flags where they are not
supported.
Diffstat (limited to 'sys/fs')
-rw-r--r-- | sys/fs/fdescfs/fdesc_vnops.c | 10 | ||||
-rw-r--r-- | sys/fs/nullfs/null_vnops.c | 6 | ||||
-rw-r--r-- | sys/fs/portalfs/portal_vnops.c | 5 | ||||
-rw-r--r-- | sys/fs/procfs/procfs_vnops.c | 6 |
4 files changed, 21 insertions, 6 deletions
diff --git a/sys/fs/fdescfs/fdesc_vnops.c b/sys/fs/fdescfs/fdesc_vnops.c index 2cbe479..6765012 100644 --- a/sys/fs/fdescfs/fdesc_vnops.c +++ b/sys/fs/fdescfs/fdesc_vnops.c @@ -35,7 +35,7 @@ * * @(#)fdesc_vnops.c 8.9 (Berkeley) 1/21/94 * - * $Id: fdesc_vnops.c,v 1.33 1997/10/27 13:33:38 bde Exp $ + * $Id: fdesc_vnops.c,v 1.34 1998/02/09 06:09:42 eivind Exp $ */ /* @@ -512,6 +512,8 @@ fdesc_setattr(ap) break; case Fctty: + if (vap->va_flags != VNOVAL) + return (EOPNOTSUPP); return (0); default: @@ -528,12 +530,16 @@ fdesc_setattr(ap) */ 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: - error = 0; + if (vap->va_flags != VNOVAL) + error = ENOPNOTSUPP; + else + error = 0; break; default: diff --git a/sys/fs/nullfs/null_vnops.c b/sys/fs/nullfs/null_vnops.c index 877fc37..a299e27 100644 --- a/sys/fs/nullfs/null_vnops.c +++ b/sys/fs/nullfs/null_vnops.c @@ -37,11 +37,11 @@ * * Ancestors: * @(#)lofs_vnops.c 1.2 (Berkeley) 6/18/92 - * $Id: null_vnops.c,v 1.26 1998/01/31 07:23:13 eivind Exp $ + * $Id: null_vnops.c,v 1.27 1998/04/17 22:36:54 des Exp $ * ...and... * @(#)null_vnodeops.c 1.20 92/07/07 UCLA Ficus project * - * $Id: null_vnops.c,v 1.26 1998/01/31 07:23:13 eivind Exp $ + * $Id: null_vnops.c,v 1.27 1998/04/17 22:36:54 des Exp $ */ /* @@ -421,6 +421,8 @@ null_setattr(ap) case VBLK: case VSOCK: case VFIFO: + if (vap->va_flags != VNOVAL) + return (EOPNOTSUPP); return (0); case VREG: case VLNK: diff --git a/sys/fs/portalfs/portal_vnops.c b/sys/fs/portalfs/portal_vnops.c index 12cd6b1..46c5847 100644 --- a/sys/fs/portalfs/portal_vnops.c +++ b/sys/fs/portalfs/portal_vnops.c @@ -35,7 +35,7 @@ * * @(#)portal_vnops.c 8.14 (Berkeley) 5/21/95 * - * $Id: portal_vnops.c,v 1.30 1998/03/26 20:52:31 phk Exp $ + * $Id: portal_vnops.c,v 1.31 1998/05/17 09:37:39 sos Exp $ */ /* @@ -497,6 +497,9 @@ portal_setattr(ap) if (ap->a_vp->v_flag & VROOT) return (EACCES); + if (vap->va_flags != VNOVAL) + return (EOPNOTSUPP); + return (0); } diff --git a/sys/fs/procfs/procfs_vnops.c b/sys/fs/procfs/procfs_vnops.c index 54893ad..74ef09d 100644 --- a/sys/fs/procfs/procfs_vnops.c +++ b/sys/fs/procfs/procfs_vnops.c @@ -36,7 +36,7 @@ * * @(#)procfs_vnops.c 8.18 (Berkeley) 5/21/95 * - * $Id: procfs_vnops.c,v 1.56 1998/03/26 20:52:42 phk Exp $ + * $Id: procfs_vnops.c,v 1.57 1998/05/19 00:00:14 tegge Exp $ */ /* @@ -594,6 +594,10 @@ procfs_setattr(ap) struct proc *a_p; } */ *ap; { + + if (ap->a_vap->va_flags != VNOVAL) + return (EOPNOTSUPP); + /* * just fake out attribute setting * it's not good to generate an error |