summaryrefslogtreecommitdiffstats
path: root/recipes-security/refpolicy/refpolicy/0079-policy-modules-services-ntp-make-nptd_t-MLS-trusted-.patch
blob: b939c37b29a1fbdd14361e1369b9f0bd437ddcb8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
From cb455496193d01761175f35297038f7cf468ebed Mon Sep 17 00:00:00 2001
From: Yi Zhao <yi.zhao@windriver.com>
Date: Thu, 18 Jun 2020 10:21:04 +0800
Subject: [PATCH] policy/modules/services/ntp: make nptd_t MLS trusted for
 reading from files at all levels

Fixes:
avc:  denied  { search } for  pid=193 comm="systemd-timesyn"
name="journal" dev="tmpfs" ino=10956
scontext=system_u:system_r:ntpd_t:s0-s15:c0.c1023
tcontext=system_u:object_r:syslogd_runtime_t:s15:c0.c1023 tclass=dir
permissive=0
avc:  denied  { read } for  pid=193 comm="systemd-timesyn" name="dbus"
dev="tmpfs" ino=13971 scontext=system_u:system_r:ntpd_t:s0-s15:c0.c1023
tcontext=system_u:object_r:system_dbusd_runtime_t:s0 tclass=dir
permissive=0

Upstream-Status: Inappropriate [embedded specific]

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
 policy/modules/services/ntp.te | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/policy/modules/services/ntp.te b/policy/modules/services/ntp.te
index 75603e16b..8886cb3bf 100644
--- a/policy/modules/services/ntp.te
+++ b/policy/modules/services/ntp.te
@@ -138,6 +138,8 @@ miscfiles_read_localization(ntpd_t)
 userdom_dontaudit_use_unpriv_user_fds(ntpd_t)
 userdom_list_user_home_dirs(ntpd_t)
 
+mls_file_read_all_levels(ntpd_t)
+
 ifdef(`init_systemd',`
 	allow ntpd_t ntpd_unit_t:file read_file_perms;
 
-- 
2.17.1