Gentoo Archives: gentoo-commits

From: Jason Zaman <perfinion@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/hardened-refpolicy:master commit in: policy/modules/system/
Date: Sun, 09 Dec 2018 11:49:04
Message-Id: 1542538607.e90c8ba7ec87789c618bdac926e0af6baf3da89c.perfinion@gentoo
1 commit: e90c8ba7ec87789c618bdac926e0af6baf3da89c
2 Author: Laurent Bigonville <bigon <AT> bigon <DOT> be>
3 AuthorDate: Sun Nov 11 12:33:28 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=e90c8ba7
7
8 Allow sysnet_dns_name_resolve() to use resolved to resolve DNS names
9
10 Also allow unconfined_t to talk with the resolved daemon
11
12 Signed-off-by: Jason Zaman <jason <AT> perfinion.com>
13
14 policy/modules/system/sysnetwork.if | 11 ++++++++---
15 policy/modules/system/unconfined.te | 6 ++++++
16 2 files changed, 14 insertions(+), 3 deletions(-)
17
18 diff --git a/policy/modules/system/sysnetwork.if b/policy/modules/system/sysnetwork.if
19 index f4f17a5d..15fc046c 100644
20 --- a/policy/modules/system/sysnetwork.if
21 +++ b/policy/modules/system/sysnetwork.if
22 @@ -756,9 +756,14 @@ interface(`sysnet_dns_name_resolve',`
23 nscd_use($1)
24 ')
25
26 - # This seems needed when the mymachines NSS module is used
27 - optional_policy(`
28 - systemd_read_machines($1)
29 + ifdef(`init_systemd',`
30 + optional_policy(`
31 + systemd_dbus_chat_resolved($1)
32 + ')
33 + # This seems needed when the mymachines NSS module is used
34 + optional_policy(`
35 + systemd_read_machines($1)
36 + ')
37 ')
38 ')
39
40
41 diff --git a/policy/modules/system/unconfined.te b/policy/modules/system/unconfined.te
42 index d669ff16..b981fa85 100644
43 --- a/policy/modules/system/unconfined.te
44 +++ b/policy/modules/system/unconfined.te
45 @@ -58,6 +58,12 @@ ifdef(`direct_sysadm_daemon',`
46 ')
47 ')
48
49 +ifdef(`init_systemd',`
50 + optional_policy(`
51 + systemd_dbus_chat_resolved(unconfined_t)
52 + ')
53 +')
54 +
55 optional_policy(`
56 ada_domtrans(unconfined_t)
57 ')