sysvbfs do not support file flags; fail with EOPNOTSUPP.

This commit is contained in:
njoly 2012-03-30 18:27:55 +00:00
parent 8687f711a5
commit 6b7e4e42d8
1 changed files with 5 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: sysvbfs_vnops.c,v 1.42 2012/03/18 02:40:55 christos Exp $ */
/* $NetBSD: sysvbfs_vnops.c,v 1.43 2012/03/30 18:27:55 njoly Exp $ */
/*-
* Copyright (c) 2004 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: sysvbfs_vnops.c,v 1.42 2012/03/18 02:40:55 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: sysvbfs_vnops.c,v 1.43 2012/03/30 18:27:55 njoly Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@ -345,6 +345,9 @@ sysvbfs_setattr(void *arg)
((int)vap->va_bytes != VNOVAL) || (vap->va_gen != VNOVAL))
return EINVAL;
if (vap->va_flags != VNOVAL)
return EOPNOTSUPP;
if (vap->va_uid != (uid_t)VNOVAL || vap->va_gid != (uid_t)VNOVAL) {
uid_t uid =
(vap->va_uid != (uid_t)VNOVAL) ? vap->va_uid : attr->uid;