1 |
commit: 2ea4214ce55c1f5dfa9a23bd74e6b8bc01db9611 |
2 |
Author: cgzones <cgzones <AT> googlemail <DOT> com> |
3 |
AuthorDate: Mon Feb 20 13:20:00 2017 +0000 |
4 |
Commit: Sven Vermeulen <swift <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Mar 2 10:16:40 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=2ea4214c |
7 |
|
8 |
add corecmd_check_exec_bin_files() |
9 |
|
10 |
useful for monit |
11 |
|
12 |
policy/modules/kernel/corecommands.if | 19 +++++++++++++++++++ |
13 |
1 file changed, 19 insertions(+) |
14 |
|
15 |
diff --git a/policy/modules/kernel/corecommands.if b/policy/modules/kernel/corecommands.if |
16 |
index 60c1feb7..d7ccec3a 100644 |
17 |
--- a/policy/modules/kernel/corecommands.if |
18 |
+++ b/policy/modules/kernel/corecommands.if |
19 |
@@ -218,6 +218,25 @@ interface(`corecmd_dontaudit_getattr_bin_files',` |
20 |
|
21 |
######################################## |
22 |
## <summary> |
23 |
+## Check if files in bin directories are executable (DAC-wise) |
24 |
+## </summary> |
25 |
+## <param name="domain"> |
26 |
+## <summary> |
27 |
+## Domain allowed access. |
28 |
+## </summary> |
29 |
+## </param> |
30 |
+# |
31 |
+interface(`corecmd_check_exec_bin_files',` |
32 |
+ gen_require(` |
33 |
+ type bin_t; |
34 |
+ ') |
35 |
+ |
36 |
+ allow $1 bin_t:dir search_dir_perms; |
37 |
+ allow $1 bin_t:file { execute getattr }; |
38 |
+') |
39 |
+ |
40 |
+######################################## |
41 |
+## <summary> |
42 |
## Read files in bin directories. |
43 |
## </summary> |
44 |
## <param name="domain"> |