1 |
commit: 8aeb3323b6470c07f3c0fe5d14e86385ff1ab722 |
2 |
Author: Kenton Groombridge <concord <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jan 27 01:02:21 2021 +0000 |
4 |
Commit: Kenton Groombridge <concord <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jun 6 15:14:39 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=8aeb3323 |
7 |
|
8 |
iptables: add file context for saved rules |
9 |
|
10 |
Bug: https://bugs.gentoo.org/840230 |
11 |
Signed-off-by: Kenton Groombridge <concord <AT> gentoo.org> |
12 |
|
13 |
policy/modules/system/init.fc | 1 - |
14 |
policy/modules/system/iptables.fc | 5 +++++ |
15 |
2 files changed, 5 insertions(+), 1 deletion(-) |
16 |
|
17 |
diff --git a/policy/modules/system/init.fc b/policy/modules/system/init.fc |
18 |
index fe661d5d..4a7c0e00 100644 |
19 |
--- a/policy/modules/system/init.fc |
20 |
+++ b/policy/modules/system/init.fc |
21 |
@@ -82,7 +82,6 @@ ifdef(`distro_debian',` |
22 |
|
23 |
ifdef(`distro_gentoo', ` |
24 |
/var/lib/init\.d(/.*)? gen_context(system_u:object_r:initrc_state_t,s0) |
25 |
-/var/lib/ip6?tables(/.*)? gen_context(system_u:object_r:initrc_tmp_t,s0) |
26 |
|
27 |
/run/openrc(/.*)? gen_context(system_u:object_r:initrc_state_t,s0) |
28 |
/run/svscan\.pid -- gen_context(system_u:object_r:initrc_runtime_t,s0) |
29 |
|
30 |
diff --git a/policy/modules/system/iptables.fc b/policy/modules/system/iptables.fc |
31 |
index ba65e811..6157f313 100644 |
32 |
--- a/policy/modules/system/iptables.fc |
33 |
+++ b/policy/modules/system/iptables.fc |
34 |
@@ -45,3 +45,8 @@ |
35 |
/usr/sbin/xtables-legacy-multi -- gen_context(system_u:object_r:iptables_exec_t,s0) |
36 |
/usr/sbin/xtables-multi -- gen_context(system_u:object_r:iptables_exec_t,s0) |
37 |
/usr/sbin/xtables-nft-multi -- gen_context(system_u:object_r:iptables_exec_t,s0) |
38 |
+ |
39 |
+ifdef(`distro_gentoo', ` |
40 |
+/var/lib/ip6?tables(/.*)? gen_context(system_u:object_r:iptables_conf_t,s0) |
41 |
+/var/lib/nftables(/.*)? gen_context(system_u:object_r:iptables_conf_t,s0) |
42 |
+') |