summaryrefslogtreecommitdiffstats
path: root/recipes-security/refpolicy/refpolicy/0079-policy-modules-system-systemd-systemd-user-sessions-.patch
blob: 3ea0085f1292fc8f1dbce0b5906466b237a328cd (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
41
From 6e3e1a5f79d6deab2966fc74c64720e90d248f3d Mon Sep 17 00:00:00 2001
From: Yi Zhao <yi.zhao@windriver.com>
Date: Thu, 18 Jun 2020 09:39:23 +0800
Subject: [PATCH] policy/modules/system/systemd: systemd-user-sessions: make
 systemd_sessions_t MLS trusted for reading/writing from files at all levels

Fixes:
avc:  denied  { search } for  pid=229 comm="systemd-user-se"
name="journal" dev="tmpfs" ino=10956
scontext=system_u:system_r:systemd_sessions_t:s0-s15:c0.c1023
tcontext=system_u:object_r:syslogd_runtime_t:s15:c0.c1023 tclass=dir
permissive=0
avc:  denied  { write } for  pid=229 comm="systemd-user-se" name="kmsg"
dev="devtmpfs" ino=10032
scontext=system_u:system_r:systemd_sessions_t:s0-s15:c0.c1023
tcontext=system_u:object_r:kmsg_device_t:s15:c0.c1023 tclass=chr_file
permissive=0

Upstream-Status: Inappropriate [embedded specific]

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

diff --git a/policy/modules/system/systemd.te b/policy/modules/system/systemd.te
index a7390b1cd..f0b0e8b92 100644
--- a/policy/modules/system/systemd.te
+++ b/policy/modules/system/systemd.te
@@ -1261,6 +1261,8 @@ seutil_read_file_contexts(systemd_sessions_t)
 
 systemd_log_parse_environment(systemd_sessions_t)
 
+mls_file_read_to_clearance(systemd_sessions_t)
+mls_file_write_all_levels(systemd_sessions_t)
 
 #########################################
 #
-- 
2.17.1