diff options
author | Guido Trentalancia <guido@trentalancia.com> | 2010-02-03 16:40:20 +0100 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2010-02-04 09:06:36 +1100 |
commit | 0719aaf5ead7555b7b7a4a080ebf2826a871384e (patch) | |
tree | 19c0b16b1013d84a8b8092737d38e60f3dd7e939 /security/selinux/ss/mls_types.h | |
parent | selinux: load the initial SIDs upon every policy load (diff) | |
download | linux-dev-0719aaf5ead7555b7b7a4a080ebf2826a871384e.tar.xz linux-dev-0719aaf5ead7555b7b7a4a080ebf2826a871384e.zip |
selinux: allow MLS->non-MLS and vice versa upon policy reload
Allow runtime switching between different policy types (e.g. from a MLS/MCS
policy to a non-MLS/non-MCS policy or viceversa).
Signed-off-by: Guido Trentalancia <guido@trentalancia.com>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security/selinux/ss/mls_types.h')
-rw-r--r-- | security/selinux/ss/mls_types.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/security/selinux/ss/mls_types.h b/security/selinux/ss/mls_types.h index b6e943a21061..03bed52a8052 100644 --- a/security/selinux/ss/mls_types.h +++ b/security/selinux/ss/mls_types.h @@ -15,6 +15,7 @@ #define _SS_MLS_TYPES_H_ #include "security.h" +#include "ebitmap.h" struct mls_level { u32 sens; /* sensitivity */ @@ -27,18 +28,12 @@ struct mls_range { static inline int mls_level_eq(struct mls_level *l1, struct mls_level *l2) { - if (!selinux_mls_enabled) - return 1; - return ((l1->sens == l2->sens) && ebitmap_cmp(&l1->cat, &l2->cat)); } static inline int mls_level_dom(struct mls_level *l1, struct mls_level *l2) { - if (!selinux_mls_enabled) - return 1; - return ((l1->sens >= l2->sens) && ebitmap_contains(&l1->cat, &l2->cat)); } |