1 |
commit: b92a94a5433397a83d36847cbd4b8ce677e1e607 |
2 |
Author: Kenton Groombridge <me <AT> concord <DOT> sh> |
3 |
AuthorDate: Sat Nov 13 21:17:53 2021 +0000 |
4 |
Commit: Jason Zaman <perfinion <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Mar 31 02:40:53 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=b92a94a5 |
7 |
|
8 |
systemd: add support for systemd-resolved stubs |
9 |
|
10 |
When using systemd-resolved, the recommended configuration is to symlink |
11 |
/etc/resolv.conf to one of the stub files in /run/systemd/resolve. To |
12 |
support this, daemons that can read net_conf_t must be able to search |
13 |
the init runtime and read etc_t symlinks. Allow this access if systemd |
14 |
is enabled. |
15 |
|
16 |
Signed-off-by: Kenton Groombridge <me <AT> concord.sh> |
17 |
Signed-off-by: Jason Zaman <perfinion <AT> gentoo.org> |
18 |
|
19 |
policy/modules/system/systemd.if | 4 ++++ |
20 |
1 file changed, 4 insertions(+) |
21 |
|
22 |
diff --git a/policy/modules/system/systemd.if b/policy/modules/system/systemd.if |
23 |
index e68a9b44..fc000ef9 100644 |
24 |
--- a/policy/modules/system/systemd.if |
25 |
+++ b/policy/modules/system/systemd.if |
26 |
@@ -2164,6 +2164,10 @@ interface(`systemd_read_resolved_runtime',` |
27 |
type systemd_resolved_runtime_t; |
28 |
') |
29 |
|
30 |
+ # to read the systemd-resolved stub |
31 |
+ files_read_etc_symlinks($1) |
32 |
+ |
33 |
+ init_search_runtime($1) |
34 |
read_files_pattern($1, systemd_resolved_runtime_t, systemd_resolved_runtime_t) |
35 |
') |