1 |
commit: 4fb568ad47d81809ce9b3820fbfa8489d7a2f47c |
2 |
Author: Sven Vermeulen <sven.vermeulen <AT> siphos <DOT> be> |
3 |
AuthorDate: Sat Nov 30 14:59:35 2013 +0000 |
4 |
Commit: Sven Vermeulen <swift <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Nov 30 14:59:35 2013 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-refpolicy.git;a=commit;h=4fb568ad |
7 |
|
8 |
Add permissions for new portage features |
9 |
|
10 |
Portage 2.2 introduces the new features "cgroup", "ipc-sandbox" and |
11 |
"network-sandbox" for better sandboxing of the build phase. |
12 |
|
13 |
Signed-off-by: Luis Ressel <aranea <AT> aixah.de> |
14 |
|
15 |
--- |
16 |
policy/modules/contrib/portage.te | 8 ++++++++ |
17 |
1 file changed, 8 insertions(+) |
18 |
|
19 |
diff --git a/policy/modules/contrib/portage.te b/policy/modules/contrib/portage.te |
20 |
index 5230679..5a161e5 100644 |
21 |
--- a/policy/modules/contrib/portage.te |
22 |
+++ b/policy/modules/contrib/portage.te |
23 |
@@ -393,6 +393,10 @@ ifdef(`distro_gentoo',` |
24 |
# |
25 |
# Portage local policy |
26 |
# |
27 |
+ |
28 |
+ # Support ipc-sandbox and network-sandbox FEATURES |
29 |
+ allow portage_t self:capability { net_admin sys_admin }; |
30 |
+ |
31 |
allow portage_t self:capability2 block_suspend; |
32 |
|
33 |
# Support self-update of Portage |
34 |
@@ -410,6 +414,10 @@ ifdef(`distro_gentoo',` |
35 |
|
36 |
auth_use_nsswitch(portage_t) |
37 |
|
38 |
+ # Support cgroup FEATURES |
39 |
+ fs_mount_cgroup(portage_t) |
40 |
+ fs_mounton_cgroup(portage_t) |
41 |
+ |
42 |
libs_generic_etc_filetrans_ld_so_cache(portage_t, file, "ld.so.cache~") |
43 |
# Support self-update of Portage |
44 |
libs_relabel_lib_dirs(portage_t) |