summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShrikant Bobade <shrikant_bobade@mentor.com>2016-08-29 19:08:57 +0530
committerJoe MacDonald <joe_macdonald@mentor.com>2016-09-01 14:30:47 -0400
commitb72d0a06a88ae0549826390d12c4c70eb86a3b34 (patch)
treefa89cd3c29ba2b67f14e2ad158a92c85d6523e76
parent6a93c5045a06d7437539820ef2510493c81f5673 (diff)
downloadmeta-selinux-b72d0a06a88ae0549826390d12c4c70eb86a3b34.tar.gz
refpolicy-minimum: systemd: fix for syslog
syslog & getty related allow rules required to fix the syslog mixup with boot log, while using systemd as init manager. Signed-off-by: Shrikant Bobade <shrikant_bobade@mentor.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
-rw-r--r--recipes-security/refpolicy/refpolicy-minimum/0009-refpolicy-minimum-systemd-fix-for-syslog.patch69
-rw-r--r--recipes-security/refpolicy/refpolicy-minimum_2.20151208.bb1
2 files changed, 70 insertions, 0 deletions
diff --git a/recipes-security/refpolicy/refpolicy-minimum/0009-refpolicy-minimum-systemd-fix-for-syslog.patch b/recipes-security/refpolicy/refpolicy-minimum/0009-refpolicy-minimum-systemd-fix-for-syslog.patch
new file mode 100644
index 0000000..b01947d
--- /dev/null
+++ b/recipes-security/refpolicy/refpolicy-minimum/0009-refpolicy-minimum-systemd-fix-for-syslog.patch
@@ -0,0 +1,69 @@
1From 9476fb0aad7caa725014e72cd009b78389ba66d5 Mon Sep 17 00:00:00 2001
2From: Shrikant Bobade <shrikant_bobade@mentor.com>
3Date: Fri, 26 Aug 2016 17:54:29 +0530
4Subject: [PATCH 9/9] refpolicy-minimum: systemd: fix for syslog
5
6syslog & getty related allow rules required to fix the syslog mixup with
7boot log, while using systemd as init manager.
8
9without this change we are getting these avc denials:
10
11audit: avc: denied { search } for pid=484 comm="syslogd" name="/"
12dev="tmpfs" ino=7269 scontext=system_u:system_r:syslogd_t:s0 tcontext=
13system_u:object_r:tmpfs_t:s0 tclass=dir permissive=0
14
15audit: avc: denied { write } for pid=372 comm="syslogd" name="log" dev=
16"tmpfs" ino=954 scontext=system_u:system_r:syslogd_t:s0 tcontext=system_u:
17object_r:tmpfs_t:s0 tclass=dir permissive=0
18
19audit: avc: denied { add_name } for pid=390 comm="syslogd" name=
20"messages" scontext=system_u:system_r:syslogd_t:s0 tcontext=system_u:object_r
21:tmpfs_t:s0 tclass=dir permissive=0
22
23audit: avc: denied { sendto } for pid=558 comm="agetty" path="/run/systemd
24/journal/dev-log" scontext=system_u:system_r:getty_t:s0 tcontext=system_u:
25system_r:initrc_t:s0 tclass=unix_dgram_socket permissive=0
26
27audit: avc: denied { create } for pid=374 comm="syslogd" name="messages"
28scontext=system_u:system_r:syslogd_t:s0 tcontext=system_u:object_r:tmpfs_t:
29s0 tclass=file permissive=0
30
31audit: avc: denied { append } for pid=423 comm="syslogd" name="messages"
32dev="tmpfs" ino=7995 scontext=system_u:system_r:syslogd_t:s0 tcontext=
33system_u:object_r:tmpfs_t:s0 tclass=file permissive=0
34
35audit: avc: denied { getattr } for pid=425 comm="syslogd" path="/var/
36volatile/log/messages" dev="tmpfs" ino=8857 scontext=system_u:system_r:
37syslogd_t:s0 tcontext=system_u:object_r:tmpfs_t:s0 tclass=file permissive=0
38
39Upstream-Status: Pending
40
41Signed-off-by: Shrikant Bobade <shrikant_bobade@mentor.com>
42---
43 policy/modules/system/getty.te | 1 +
44 policy/modules/system/logging.te | 3 ++-
45 2 files changed, 3 insertions(+), 1 deletion(-)
46
47diff --git a/policy/modules/system/getty.te b/policy/modules/system/getty.te
48index 84eaf77..2e53daf 100644
49--- a/policy/modules/system/getty.te
50+++ b/policy/modules/system/getty.te
51@@ -142,3 +142,4 @@ optional_policy(`
52
53 allow getty_t tmpfs_t:dir search;
54 allow getty_t tmpfs_t:file { open write lock };
55+allow getty_t initrc_t:unix_dgram_socket sendto;
56diff --git a/policy/modules/system/logging.te b/policy/modules/system/logging.te
57index 107db03..95de86d 100644
58--- a/policy/modules/system/logging.te
59+++ b/policy/modules/system/logging.te
60@@ -581,4 +581,5 @@ allow klogd_t initrc_t:unix_dgram_socket sendto;
61 allow syslogd_t self:shm create;
62 allow syslogd_t self:sem { create read unix_write write };
63 allow syslogd_t self:shm { read unix_read unix_write write };
64-allow syslogd_t tmpfs_t:file { read write };
65+allow syslogd_t tmpfs_t:file { read write create getattr append open };
66+allow syslogd_t tmpfs_t:dir { search write add_name };
67--
681.9.1
69
diff --git a/recipes-security/refpolicy/refpolicy-minimum_2.20151208.bb b/recipes-security/refpolicy/refpolicy-minimum_2.20151208.bb
index 9f01492..da6626e 100644
--- a/recipes-security/refpolicy/refpolicy-minimum_2.20151208.bb
+++ b/recipes-security/refpolicy/refpolicy-minimum_2.20151208.bb
@@ -80,4 +80,5 @@ SYSTEMD_REFPOLICY_PATCHES = " \
80 file://0006-refpolicy-minimum-systemd-mount-enable-requiried-ref.patch \ 80 file://0006-refpolicy-minimum-systemd-mount-enable-requiried-ref.patch \
81 file://0007-refpolicy-minimum-systemd-fix-for-login-journal-serv.patch \ 81 file://0007-refpolicy-minimum-systemd-fix-for-login-journal-serv.patch \
82 file://0008-refpolicy-minimum-systemd-fix-for-systemd-tmp-files-.patch \ 82 file://0008-refpolicy-minimum-systemd-fix-for-systemd-tmp-files-.patch \
83 file://0009-refpolicy-minimum-systemd-fix-for-syslog.patch \
83 " 84 "