diff options
| author | plunky <plunky@NetBSD.org> | 2013-03-18 19:35:35 +0000 |
|---|---|---|
| committer | plunky <plunky@NetBSD.org> | 2013-03-18 19:35:35 +0000 |
| commit | e5c652ae7a4abd2ebad85482f3b8115d5d2ff12e (patch) | |
| tree | ef6ed47cc69a2063bd79584a14deeb4b227628cf /sys/fs/tmpfs | |
| parent | f46d5379cf303bfa36adf59b8d8e0a6dd9fefa04 (diff) | |
C99 section 6.7.2.3 (Tags) Note 3 states that:
A type specifier of the form
enum identifier
without an enumerator list shall only appear after the type it
specifies is complete.
which means that we cannot pass an "enum vtype" argument to
kauth_access_action() without fully specifying the type first.
Unfortunately there is a complicated include file loop which
makes that difficult, so convert this minimal function into a
macro (and capitalize it).
(ok elad@)
Diffstat (limited to 'sys/fs/tmpfs')
| -rw-r--r-- | sys/fs/tmpfs/tmpfs_vnops.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/fs/tmpfs/tmpfs_vnops.c b/sys/fs/tmpfs/tmpfs_vnops.c index 83c98b2b2a1..b3b650e4c09 100644 --- a/sys/fs/tmpfs/tmpfs_vnops.c +++ b/sys/fs/tmpfs/tmpfs_vnops.c @@ -1,4 +1,4 @@ -/* $NetBSD: tmpfs_vnops.c,v 1.100 2012/11/05 17:27:39 dholland Exp $ */ +/* $NetBSD: tmpfs_vnops.c,v 1.101 2013/03/18 19:35:40 plunky Exp $ */ /* * Copyright (c) 2005, 2006, 2007 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: tmpfs_vnops.c,v 1.100 2012/11/05 17:27:39 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tmpfs_vnops.c,v 1.101 2013/03/18 19:35:40 plunky Exp $"); #include <sys/param.h> #include <sys/dirent.h> @@ -422,7 +422,7 @@ tmpfs_access(void *v) return EPERM; } - return kauth_authorize_vnode(cred, kauth_access_action(mode, + return kauth_authorize_vnode(cred, KAUTH_ACCESS_ACTION(mode, vp->v_type, node->tn_mode), vp, NULL, genfs_can_access(vp->v_type, node->tn_mode, node->tn_uid, node->tn_gid, mode, cred)); } |
