Index: security/mac_bsdextended/mac_bsdextended.c =================================================================== --- security/mac_bsdextended/mac_bsdextended.c (revision 190481) +++ security/mac_bsdextended/mac_bsdextended.c (working copy) @@ -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; Index: security/mac_mls/mac_mls.c =================================================================== --- security/mac_mls/mac_mls.c (revision 190481) +++ security/mac_mls/mac_mls.c (working copy) @@ -2515,11 +2515,11 @@ mls_vnode_check_open(struct ucred *cred, struct vn 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); } Index: security/mac_biba/mac_biba.c =================================================================== --- security/mac_biba/mac_biba.c (revision 190481) +++ security/mac_biba/mac_biba.c (working copy) @@ -2892,11 +2892,11 @@ biba_vnode_check_open(struct ucred *cred, struct v 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); } Index: sys/vnode.h =================================================================== --- sys/vnode.h (revision 190481) +++ sys/vnode.h (working copy) @@ -314,7 +314,6 @@ struct vattr { #define VWRITE 000000000200 /* write permission */ #define VREAD 000000000400 /* read permission */ #define VADMIN 000000010000 /* being the file owner */ -#define VSTAT 000000020000 /* permission to retrieve attrs */ #define VAPPEND 000000040000 /* permission to write/append */ /* * VEXPLICIT_DENY makes VOP_ACCESS(9) return EPERM or EACCES only @@ -344,7 +343,7 @@ struct vattr { /* * Permissions that were traditionally granted to everyone. */ -#define VSTAT_PERMS (VSTAT | VREAD_ATTRIBUTES | VREAD_ACL | VSYNCHRONIZE) +#define VSTAT_PERMS (VREAD_ATTRIBUTES | VREAD_ACL) /* * Permissions that allow to change the state of the file in any way.