1 |
commit: 3622f0211f17555747da2bf7acb6d8aba7785d1e |
2 |
Author: Sven Vermeulen <sven.vermeulen <AT> siphos <DOT> be> |
3 |
AuthorDate: Thu May 1 20:19:15 2014 +0000 |
4 |
Commit: Sven Vermeulen <swift <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu May 1 20:19:35 2014 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-refpolicy.git;a=commit;h=3622f021 |
7 |
|
8 |
emerge-webrsync updates |
9 |
|
10 |
Two small changes for emerge-webrsync. |
11 |
|
12 |
The first one is that portage_fetch_t must be able to execute |
13 |
portage_fetch_tmp_t. This is because portage_fetch_t calls portageq, |
14 |
which (as a Python app) creates a temporary executable file to parse. |
15 |
|
16 |
The second change allows portage_fetch_t to read user content (when an |
17 |
overlay is in /home) optionally through the portage_read_user_content |
18 |
boolean. |
19 |
|
20 |
--- |
21 |
policy/modules/contrib/portage.te | 18 +++++++++++++++++- |
22 |
1 file changed, 17 insertions(+), 1 deletion(-) |
23 |
|
24 |
diff --git a/policy/modules/contrib/portage.te b/policy/modules/contrib/portage.te |
25 |
index d5b29d6..443460b 100644 |
26 |
--- a/policy/modules/contrib/portage.te |
27 |
+++ b/policy/modules/contrib/portage.te |
28 |
@@ -13,6 +13,14 @@ policy_module(portage, 1.14.0) |
29 |
## </desc> |
30 |
gen_tunable(portage_use_nfs, false) |
31 |
|
32 |
+## <desc> |
33 |
+## <p> |
34 |
+## Determine whether portage domains can read user content. |
35 |
+## This is for non-portage_t domains as portage_t can manage the entire file system. |
36 |
+## </p> |
37 |
+## </desc> |
38 |
+gen_tunable(portage_read_user_content, false) |
39 |
+ |
40 |
attribute_role gcc_config_roles; |
41 |
attribute_role portage_roles; |
42 |
attribute_role portage_fetch_roles; |
43 |
@@ -262,6 +270,8 @@ manage_files_pattern(portage_fetch_t, portage_ebuild_t, portage_ebuild_t) |
44 |
manage_dirs_pattern(portage_fetch_t, portage_fetch_tmp_t, portage_fetch_tmp_t) |
45 |
manage_files_pattern(portage_fetch_t, portage_fetch_tmp_t, portage_fetch_tmp_t) |
46 |
files_tmp_filetrans(portage_fetch_t, portage_fetch_tmp_t, { file dir }) |
47 |
+# Needed as otherwise we get large Python tracebacks when using emerge-webrsync (portageq failure) |
48 |
+can_exec(portage_fetch_t, portage_fetch_tmp_t) |
49 |
|
50 |
kernel_read_system_state(portage_fetch_t) |
51 |
kernel_read_kernel_sysctls(portage_fetch_t) |
52 |
@@ -307,7 +317,6 @@ miscfiles_read_generic_certs(portage_fetch_t) |
53 |
miscfiles_read_localization(portage_fetch_t) |
54 |
|
55 |
userdom_use_user_terminals(portage_fetch_t) |
56 |
-userdom_dontaudit_read_user_home_content_files(portage_fetch_t) |
57 |
|
58 |
rsync_exec(portage_fetch_t) |
59 |
|
60 |
@@ -322,6 +331,13 @@ tunable_policy(`portage_use_nfs',` |
61 |
fs_manage_nfs_symlinks(portage_fetch_t) |
62 |
') |
63 |
|
64 |
+tunable_policy(`portage_read_user_content',` |
65 |
+ userdom_read_user_home_content_files(portage_fetch_t) |
66 |
+ userdom_list_user_home_content(portage_fetch_t) |
67 |
+',` |
68 |
+ userdom_dontaudit_read_user_home_content_files(portage_fetch_t) |
69 |
+') |
70 |
+ |
71 |
optional_policy(` |
72 |
gpg_exec(portage_fetch_t) |
73 |
') |