summaryrefslogtreecommitdiffstats
path: root/recipes-security/refpolicy/refpolicy/0057-policy-modules-system-logging-fix-systemd-journald-s.patch
blob: d28387934b36138a57b1ee5b219b8d50492068f5 (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
42
43
44
45
46
47
From 5973dc3824b395ce9f6620e3ae432664cc357b66 Mon Sep 17 00:00:00 2001
From: Wenzong Fan <wenzong.fan@windriver.com>
Date: Thu, 4 Feb 2016 02:10:15 -0500
Subject: [PATCH] policy/modules/system/logging: fix systemd-journald startup
 failures

Fixes:
avc:  denied  { audit_control } for  pid=109 comm="systemd-journal"
capability=30  scontext=system_u:system_r:syslogd_t
tcontext=system_u:system_r:syslogd_t tclass=capability permissive=0

avc:  denied  { search } for  pid=233 comm="systemd-journal" name="/"
dev="tmpfs" ino=12398 scontext=system_u:system_r:syslogd_t
tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=0

Upstream-Status: Inappropriate [embedded specific]

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
 policy/modules/system/logging.te | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/policy/modules/system/logging.te b/policy/modules/system/logging.te
index bdd97631c..62caa7a56 100644
--- a/policy/modules/system/logging.te
+++ b/policy/modules/system/logging.te
@@ -492,6 +492,7 @@ files_var_lib_filetrans(syslogd_t, syslogd_var_lib_t, { file dir })
 
 fs_getattr_all_fs(syslogd_t)
 fs_search_auto_mountpoints(syslogd_t)
+fs_search_tmpfs(syslogd_t)
 
 mls_file_write_all_levels(syslogd_t) # Need to be able to write to /var/run/ and /var/log directories
 
@@ -552,6 +553,8 @@ ifdef(`init_systemd',`
 	# needed for systemd-initrd case when syslog socket is unlabelled
 	logging_send_syslog_msg(syslogd_t)
 
+	logging_set_loginuid(syslogd_t)
+
 	systemd_manage_journal_files(syslogd_t)
 
 	udev_read_runtime_files(syslogd_t)
-- 
2.17.1