aboutsummaryrefslogtreecommitdiff
path: root/sys/security/mac_mls
diff options
context:
space:
mode:
authorEdward Tomasz Napierala <trasz@FreeBSD.org>2008-10-28 13:44:11 +0000
committerEdward Tomasz Napierala <trasz@FreeBSD.org>2008-10-28 13:44:11 +0000
commit15bc6b2bd8d8c56ad74e57675dde8501bc7f53e1 (patch)
treecb5d9bbe34cd6eae2c3dd212bdfdfd85569424dd /sys/security/mac_mls
parent9215889d21ffb366dda6fcbd62483657769367f2 (diff)
downloadsrc-15bc6b2bd8d8c56ad74e57675dde8501bc7f53e1.tar.gz
src-15bc6b2bd8d8c56ad74e57675dde8501bc7f53e1.zip
Introduce accmode_t. This is required for NFSv4 ACLs - it will be neccessary
to add more V* constants, and the variables changed by this patch were often being assigned to mode_t variables, which is 16 bit. Approved by: rwatson (mentor)
Notes
Notes: svn path=/head/; revision=184413
Diffstat (limited to 'sys/security/mac_mls')
-rw-r--r--sys/security/mac_mls/mac_mls.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/security/mac_mls/mac_mls.c b/sys/security/mac_mls/mac_mls.c
index 84b8c9949b13..217fa5f44e4b 100644
--- a/sys/security/mac_mls/mac_mls.c
+++ b/sys/security/mac_mls/mac_mls.c
@@ -2505,7 +2505,7 @@ mls_vnode_check_mmap(struct ucred *cred, struct vnode *vp,
static int
mls_vnode_check_open(struct ucred *cred, struct vnode *vp,
- struct label *vplabel, int acc_mode)
+ struct label *vplabel, accmode_t accmode)
{
struct mac_mls *subj, *obj;
@@ -2516,11 +2516,11 @@ mls_vnode_check_open(struct ucred *cred, struct vnode *vp,
obj = SLOT(vplabel);
/* XXX privilege override for admin? */
- if (acc_mode & (VREAD | VEXEC | VSTAT)) {
+ if (accmode & (VREAD | VEXEC | VSTAT)) {
if (!mls_dominate_effective(subj, obj))
return (EACCES);
}
- if (acc_mode & (VWRITE | VAPPEND | VADMIN)) {
+ if (accmode & (VWRITE | VAPPEND | VADMIN)) {
if (!mls_dominate_effective(obj, subj))
return (EACCES);
}