From 832ccaf549d0b508e6228d6f6aed127196763958 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Tue, 8 Apr 1997 22:46:51 +0000 Subject: chflags not permitted --- sys/nfs/nfs_vnops.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sys/nfs/nfs_vnops.c b/sys/nfs/nfs_vnops.c index a657655ac38..23ace0411ba 100644 --- a/sys/nfs/nfs_vnops.c +++ b/sys/nfs/nfs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_vnops.c,v 1.13 1997/01/31 10:33:46 deraadt Exp $ */ +/* $OpenBSD: nfs_vnops.c,v 1.14 1997/04/08 22:46:50 deraadt Exp $ */ /* $NetBSD: nfs_vnops.c,v 1.62.4.1 1996/07/08 20:26:52 jtc Exp $ */ /* @@ -581,10 +581,16 @@ nfs_setattr(v) int error = 0; u_quad_t tsize = 0; + /* + * Setting of flags is not supported. + */ + if (vap->va_flags != VNOVAL) + return (EOPNOTSUPP); + /* * Disallow write attempts if the filesystem is mounted read-only. */ - if ((vap->va_flags != VNOVAL || vap->va_uid != (uid_t)VNOVAL || + if ((vap->va_uid != (uid_t)VNOVAL || vap->va_gid != (gid_t)VNOVAL || vap->va_atime.tv_sec != VNOVAL || vap->va_mtime.tv_sec != VNOVAL || vap->va_mode != (mode_t)VNOVAL) && (vp->v_mount->mnt_flag & MNT_RDONLY)) -- cgit v1.2.3