1 |
commit: 97e7530c5e79281a24499ac28edcf35daa2349c2 |
2 |
Author: David Sugar <dsugar <AT> tresys <DOT> com> |
3 |
AuthorDate: Sat Nov 17 04:23:43 2018 +0000 |
4 |
Commit: Jason Zaman <perfinion <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Nov 18 10:56:47 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=97e7530c |
7 |
|
8 |
interface to enable/disable systemd_networkd service |
9 |
|
10 |
Signed-off-by: Dave Sugar <dsugar <AT> tresys.com> |
11 |
Signed-off-by: Jason Zaman <jason <AT> perfinion.com> |
12 |
|
13 |
policy/modules/system/systemd.if | 19 +++++++++++++++++++ |
14 |
1 file changed, 19 insertions(+) |
15 |
|
16 |
diff --git a/policy/modules/system/systemd.if b/policy/modules/system/systemd.if |
17 |
index 9247924b..74f0b215 100644 |
18 |
--- a/policy/modules/system/systemd.if |
19 |
+++ b/policy/modules/system/systemd.if |
20 |
@@ -467,6 +467,25 @@ interface(`systemd_manage_networkd_units',` |
21 |
manage_files_pattern($1, systemd_networkd_unit_t, systemd_networkd_unit_t) |
22 |
') |
23 |
|
24 |
+######################################## |
25 |
+## <summary> |
26 |
+## Allow specified domain to enable systemd-networkd units |
27 |
+## </summary> |
28 |
+## <param name="domain"> |
29 |
+## <summary> |
30 |
+## Domain allowed access. |
31 |
+## </summary> |
32 |
+## </param> |
33 |
+# |
34 |
+interface(`systemd_enabledisable_networkd',` |
35 |
+ gen_require(` |
36 |
+ type systemd_networkd_unit_t; |
37 |
+ class service { enable disable }; |
38 |
+ ') |
39 |
+ |
40 |
+ allow $1 systemd_networkd_unit_t:service { enable disable }; |
41 |
+') |
42 |
+ |
43 |
######################################## |
44 |
## <summary> |
45 |
## Allow specified domain to start systemd-networkd units |