summaryrefslogtreecommitdiffstats
path: root/recipes-security/refpolicy/refpolicy/0045-policy-modules-system-systemd-make-systemd-tmpfiles_.patch
blob: c61b40336d68a68dd3e9ed1e28ca75b21313c89a (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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
From ff749bb5ba3786283c348bb2db160794ba74e20c Mon Sep 17 00:00:00 2001
From: Wenzong Fan <wenzong.fan@windriver.com>
Date: Thu, 4 Feb 2016 06:03:19 -0500
Subject: [PATCH] policy/modules/system/systemd: make systemd-tmpfiles_t domain
 MLS trusted for raising/lowering the level of files

Fixes:
  avc: denied { search } for pid=92 comm="systemd-tmpfile" name="1" \
  dev="proc" ino=7987 \
  scontext=system_u:system_r:systemd_tmpfiles_t:s0-s15:c0.c1023 \
  tcontext=system_u:system_r:init_t:s0-s15:c0.c1023 \
  tclass=dir

  avc: denied { search } for pid=92 comm="systemd-tmpfile" \
  name="journal" dev="tmpfs" ino=8226 \
  scontext=system_u:system_r:systemd_tmpfiles_t:s0-s15:c0.c1023 \
  tcontext=system_u:object_r:syslogd_var_run_t:s15:c0.c1023 \
  tclass=dir

  avc: denied { write } for pid=92 comm="systemd-tmpfile" \
  name="kmsg" dev="devtmpfs" ino=7242 \
  scontext=system_u:system_r:systemd_tmpfiles_t:s0-s15:c0.c1023 \
  tcontext=system_u:object_r:kmsg_device_t:s15:c0.c1023 \
  tclass=chr_file

  avc: denied { read } for pid=92 comm="systemd-tmpfile" \
  name="kmod.conf" dev="tmpfs" ino=8660 \
  scontext=system_u:system_r:systemd_tmpfiles_t:s0-s15:c0.c1023 \
  tcontext=system_u:object_r:var_run_t:s0 \
  tclass=file

  avc: denied { search } for pid=92 comm="systemd-tmpfile" \
  name="kernel" dev="proc" ino=8731 \
  scontext=system_u:system_r:systemd_tmpfiles_t:s0-s15:c0.c1023 \
  tcontext=system_u:object_r:sysctl_kernel_t:s0 tclass=dir

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/systemd.te | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/policy/modules/system/systemd.te b/policy/modules/system/systemd.te
index 42520f9f8..7a2041956 100644
--- a/policy/modules/system/systemd.te
+++ b/policy/modules/system/systemd.te
@@ -1813,6 +1813,11 @@ sysnet_relabel_config(systemd_tmpfiles_t)
 
 systemd_log_parse_environment(systemd_tmpfiles_t)
 
+mls_file_write_all_levels(systemd_tmpfiles_t)
+mls_file_read_all_levels(systemd_tmpfiles_t)
+mls_file_downgrade(systemd_tmpfiles_t)
+mls_file_upgrade(systemd_tmpfiles_t)
+
 userdom_manage_user_runtime_root_dirs(systemd_tmpfiles_t)
 userdom_relabel_user_runtime_root_dirs(systemd_tmpfiles_t)
 
-- 
2.25.1