1 |
commit: deaf780119c0ddf2fd11107cbefeeb2112e6b65f |
2 |
Author: Jason Zaman <jason <AT> perfinion <DOT> com> |
3 |
AuthorDate: Fri Feb 10 16:26:10 2017 +0000 |
4 |
Commit: Jason Zaman <perfinion <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Feb 27 11:32:41 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=deaf7801 |
7 |
|
8 |
mls mcs: Add constraints for key class |
9 |
|
10 |
Taken from fedoras policy |
11 |
https://github.com/fedora-selinux/selinux-policy/blob/rawhide-base/policy/mls |
12 |
https://github.com/fedora-selinux/selinux-policy/blob/rawhide-base/policy/mcs |
13 |
|
14 |
policy/mcs | 3 +++ |
15 |
policy/mls | 8 ++++++++ |
16 |
2 files changed, 11 insertions(+) |
17 |
|
18 |
diff --git a/policy/mcs b/policy/mcs |
19 |
index 4d030112..94319570 100644 |
20 |
--- a/policy/mcs |
21 |
+++ b/policy/mcs |
22 |
@@ -123,6 +123,9 @@ mlsconstrain process { signal } |
23 |
mlsconstrain { tcp_socket udp_socket rawip_socket } node_bind |
24 |
(( h1 dom h2 ) or ( t1 != mcs_constrained_type )); |
25 |
|
26 |
+mlsconstrain key { create link read search setattr view write } |
27 |
+ (( h1 dom h2 ) or ( t1 != mcs_constrained_type )); |
28 |
+ |
29 |
# |
30 |
# MCS policy for SELinux-enabled databases |
31 |
# |
32 |
|
33 |
diff --git a/policy/mls b/policy/mls |
34 |
index 69ca7263..c9be3125 100644 |
35 |
--- a/policy/mls |
36 |
+++ b/policy/mls |
37 |
@@ -281,6 +281,14 @@ mlsconstrain msg send |
38 |
# { ipc sem msgq shm } associate |
39 |
|
40 |
|
41 |
+# |
42 |
+# MLS policy for the key class |
43 |
+# |
44 |
+ |
45 |
+mlsconstrain key { create link read search setattr view write } |
46 |
+ (( l1 eq l2 ) or |
47 |
+ (( t1 == mlsprocwritetoclr ) and ( h1 dom l2 ) and ( l1 domby l2 )) or |
48 |
+ ( t1 == mlsprocwrite )); |
49 |
|
50 |
|
51 |
# |