1 |
commit: aea1a2c1e811cffff5f00eaff151aa39d275dc91 |
2 |
Author: Sven Vermeulen <swift <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jan 31 16:19:24 2016 +0000 |
4 |
Commit: Sven Vermeulen <swift <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jan 31 16:19:24 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=aea1a2c1 |
7 |
|
8 |
Allow sesearch to find default policy |
9 |
|
10 |
Utilities that want to find the default policy in /etc/selinux/*/policy |
11 |
will need read privileges on policy_config_t as they list the contents |
12 |
of the policy/ folder. |
13 |
|
14 |
Example is the sesearch command. |
15 |
|
16 |
policy/modules/system/selinuxutil.if | 6 ++++++ |
17 |
1 file changed, 6 insertions(+) |
18 |
|
19 |
diff --git a/policy/modules/system/selinuxutil.if b/policy/modules/system/selinuxutil.if |
20 |
index 55d2429..b4c70a3 100644 |
21 |
--- a/policy/modules/system/selinuxutil.if |
22 |
+++ b/policy/modules/system/selinuxutil.if |
23 |
@@ -941,6 +941,12 @@ interface(`seutil_read_bin_policy',` |
24 |
files_search_etc($1) |
25 |
allow $1 selinux_config_t:dir search_dir_perms; |
26 |
read_files_pattern($1, policy_config_t, policy_config_t) |
27 |
+ |
28 |
+ ifdef(`distro_gentoo',` |
29 |
+ # Allow sesearch to read /etc/selinux/.../policy |
30 |
+ # Otherwise it returns "No default policy found" |
31 |
+ allow $1 policy_config_t:dir list_dir_perms; |
32 |
+ ') |
33 |
') |
34 |
|
35 |
######################################## |