From 6180d3185daee3c2d4906df85b50fa67abaafeb4 Mon Sep 17 00:00:00 2001 From: Edward Tomasz Napierala Date: Sun, 29 Mar 2009 17:45:48 +0000 Subject: Get rid of VSTAT and replace it with VSTAT_PERMS, which is somewhat better defined. Approved by: rwatson (mentor) --- sys/security/mac_biba/mac_biba.c | 4 ++-- sys/security/mac_bsdextended/mac_bsdextended.c | 4 ++-- sys/security/mac_mls/mac_mls.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'sys/security') diff --git a/sys/security/mac_biba/mac_biba.c b/sys/security/mac_biba/mac_biba.c index 41c1eea3ef46..97c3cbe72cd0 100644 --- a/sys/security/mac_biba/mac_biba.c +++ b/sys/security/mac_biba/mac_biba.c @@ -2892,11 +2892,11 @@ biba_vnode_check_open(struct ucred *cred, struct vnode *vp, obj = SLOT(vplabel); /* XXX privilege override for admin? */ - if (accmode & (VREAD | VEXEC | VSTAT)) { + if (accmode & (VREAD | VEXEC | VSTAT_PERMS)) { if (!biba_dominate_effective(obj, subj)) return (EACCES); } - if (accmode & (VWRITE | VAPPEND | VADMIN)) { + if (accmode & VMODIFY_PERMS) { if (!biba_dominate_effective(subj, obj)) return (EACCES); } diff --git a/sys/security/mac_bsdextended/mac_bsdextended.c b/sys/security/mac_bsdextended/mac_bsdextended.c index ee72df40393e..cc3685156dea 100644 --- a/sys/security/mac_bsdextended/mac_bsdextended.c +++ b/sys/security/mac_bsdextended/mac_bsdextended.c @@ -478,9 +478,9 @@ ugidfw_accmode2mbi(accmode_t accmode) mbi |= MBI_WRITE; if (accmode & VREAD) mbi |= MBI_READ; - if (accmode & VADMIN) + if (accmode & VADMIN_PERMS) mbi |= MBI_ADMIN; - if (accmode & VSTAT) + if (accmode & VSTAT_PERMS) mbi |= MBI_STAT; if (accmode & VAPPEND) mbi |= MBI_APPEND; diff --git a/sys/security/mac_mls/mac_mls.c b/sys/security/mac_mls/mac_mls.c index 81030d7adcf1..6d13505c19d4 100644 --- a/sys/security/mac_mls/mac_mls.c +++ b/sys/security/mac_mls/mac_mls.c @@ -2515,11 +2515,11 @@ mls_vnode_check_open(struct ucred *cred, struct vnode *vp, obj = SLOT(vplabel); /* XXX privilege override for admin? */ - if (accmode & (VREAD | VEXEC | VSTAT)) { + if (accmode & (VREAD | VEXEC | VSTAT_PERMS)) { if (!mls_dominate_effective(subj, obj)) return (EACCES); } - if (accmode & (VWRITE | VAPPEND | VADMIN)) { + if (accmode & VMODIFY_PERMS) { if (!mls_dominate_effective(obj, subj)) return (EACCES); } -- cgit v1.3