diff options
author | peter <peter@FreeBSD.org> | 1998-05-31 19:24:19 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1998-05-31 19:24:19 +0000 |
commit | da4830ce17965e90430dd7dbe60701d837b6e94c (patch) | |
tree | e62e03e0b1cd3ff4072659a2a4b1a8d1b4671548 /sys | |
parent | a378822d22742ffbdef2635478f8e52adb387b80 (diff) | |
download | FreeBSD-src-da4830ce17965e90430dd7dbe60701d837b6e94c.zip FreeBSD-src-da4830ce17965e90430dd7dbe60701d837b6e94c.tar.gz |
Don't silently fail to set file flags.
Obtained from: NetBSD
Diffstat (limited to 'sys')
-rw-r--r-- | sys/nfs/nfs_vnops.c | 9 | ||||
-rw-r--r-- | sys/nfsclient/nfs_vnops.c | 9 |
2 files changed, 16 insertions, 2 deletions
diff --git a/sys/nfs/nfs_vnops.c b/sys/nfs/nfs_vnops.c index 60f516a..2acfb31 100644 --- a/sys/nfs/nfs_vnops.c +++ b/sys/nfs/nfs_vnops.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_vnops.c 8.16 (Berkeley) 5/27/95 - * $Id: nfs_vnops.c,v 1.98 1998/05/31 18:30:42 peter Exp $ + * $Id: nfs_vnops.c,v 1.99 1998/05/31 19:00:18 peter Exp $ */ @@ -583,6 +583,13 @@ nfs_setattr(ap) #ifndef nolint tsize = (u_quad_t)0; #endif + + /* + * Setting of flags is not supported. + */ + if (vap->va_flags != VNOVAL) + return (EOPNOTSUPP); + /* * Disallow write attempts if the filesystem is mounted read-only. */ diff --git a/sys/nfsclient/nfs_vnops.c b/sys/nfsclient/nfs_vnops.c index 60f516a..2acfb31 100644 --- a/sys/nfsclient/nfs_vnops.c +++ b/sys/nfsclient/nfs_vnops.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_vnops.c 8.16 (Berkeley) 5/27/95 - * $Id: nfs_vnops.c,v 1.98 1998/05/31 18:30:42 peter Exp $ + * $Id: nfs_vnops.c,v 1.99 1998/05/31 19:00:18 peter Exp $ */ @@ -583,6 +583,13 @@ nfs_setattr(ap) #ifndef nolint tsize = (u_quad_t)0; #endif + + /* + * Setting of flags is not supported. + */ + if (vap->va_flags != VNOVAL) + return (EOPNOTSUPP); + /* * Disallow write attempts if the filesystem is mounted read-only. */ |