summaryrefslogtreecommitdiffstats
path: root/sys/security
diff options
context:
space:
mode:
authortrasz <trasz@FreeBSD.org>2009-03-29 17:45:48 +0000
committertrasz <trasz@FreeBSD.org>2009-03-29 17:45:48 +0000
commit048abafaf9a435fb875b6c78ab52eb109811be96 (patch)
treed03c097b86131679060f8443a42eaab9f8d3456d /sys/security
parentaa09259c5bcc6d45a8e5cab2cb09d667d8d3c78e (diff)
downloadFreeBSD-src-048abafaf9a435fb875b6c78ab52eb109811be96.zip
FreeBSD-src-048abafaf9a435fb875b6c78ab52eb109811be96.tar.gz
Get rid of VSTAT and replace it with VSTAT_PERMS, which is somewhat
better defined. Approved by: rwatson (mentor)
Diffstat (limited to 'sys/security')
-rw-r--r--sys/security/mac_biba/mac_biba.c4
-rw-r--r--sys/security/mac_bsdextended/mac_bsdextended.c4
-rw-r--r--sys/security/mac_mls/mac_mls.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/sys/security/mac_biba/mac_biba.c b/sys/security/mac_biba/mac_biba.c
index 41c1eea..97c3cbe 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 ee72df4..cc36851 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 81030d7..6d13505 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);
}
OpenPOWER on IntegriCloud