Gentoo Archives: gentoo-commits

From: Jason Zaman <perfinion@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/hardened-refpolicy:next commit in: policy/
Date: Sun, 10 Sep 2017 14:04:04
Message-Id: 1505051610.409546eda11ca6d9d54367516c725b3ba5d890c2.perfinion@gentoo
1 commit: 409546eda11ca6d9d54367516c725b3ba5d890c2
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: Sun Sep 10 13:53:30 2017 +0000
6 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=409546ed
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 #