diff options
author | Eric Paris <eparis@redhat.com> | 2008-03-30 21:17:33 -0400 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2008-04-18 06:26:11 -0400 |
commit | 64dbf07474d011540ca479a2e87fe998f570d6e3 (patch) | |
tree | 364ae3f3a29f06246dd2097674586fe508c4445f /security/selinux/include | |
parent | 0356357c5158c71d4cbf20196b2f784435dd916c (diff) |
selinux: introduce permissive types
Introduce the concept of a permissive type. A new ebitmap is introduced to
the policy database which indicates if a given type has the permissive bit
set or not. This bit is tested for the scontext of any denial. The bit is
meaningless on types which only appear as the target of a decision and never
the source. A domain running with a permissive type will be allowed to
perform any action similarly to when the system is globally set permissive.
Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security/selinux/include')
-rw-r--r-- | security/selinux/include/security.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/security/selinux/include/security.h b/security/selinux/include/security.h index 315b4ec1e12a..dd70aa084637 100644 --- a/security/selinux/include/security.h +++ b/security/selinux/include/security.h | |||
@@ -26,13 +26,14 @@ | |||
26 | #define POLICYDB_VERSION_AVTAB 20 | 26 | #define POLICYDB_VERSION_AVTAB 20 |
27 | #define POLICYDB_VERSION_RANGETRANS 21 | 27 | #define POLICYDB_VERSION_RANGETRANS 21 |
28 | #define POLICYDB_VERSION_POLCAP 22 | 28 | #define POLICYDB_VERSION_POLCAP 22 |
29 | #define POLICYDB_VERSION_PERMISSIVE 23 | ||
29 | 30 | ||
30 | /* Range of policy versions we understand*/ | 31 | /* Range of policy versions we understand*/ |
31 | #define POLICYDB_VERSION_MIN POLICYDB_VERSION_BASE | 32 | #define POLICYDB_VERSION_MIN POLICYDB_VERSION_BASE |
32 | #ifdef CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX | 33 | #ifdef CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX |
33 | #define POLICYDB_VERSION_MAX CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX_VALUE | 34 | #define POLICYDB_VERSION_MAX CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX_VALUE |
34 | #else | 35 | #else |
35 | #define POLICYDB_VERSION_MAX POLICYDB_VERSION_POLCAP | 36 | #define POLICYDB_VERSION_MAX POLICYDB_VERSION_PERMISSIVE |
36 | #endif | 37 | #endif |
37 | 38 | ||
38 | #define CONTEXT_MNT 0x01 | 39 | #define CONTEXT_MNT 0x01 |
@@ -69,6 +70,8 @@ struct av_decision { | |||
69 | u32 seqno; | 70 | u32 seqno; |
70 | }; | 71 | }; |
71 | 72 | ||
73 | int security_permissive_sid(u32 sid); | ||
74 | |||
72 | int security_compute_av(u32 ssid, u32 tsid, | 75 | int security_compute_av(u32 ssid, u32 tsid, |
73 | u16 tclass, u32 requested, | 76 | u16 tclass, u32 requested, |
74 | struct av_decision *avd); | 77 | struct av_decision *avd); |