summaryrefslogtreecommitdiffstats
path: root/recipes-security/refpolicy/refpolicy-git/0001-refpolicy-minimum-audit-logging-getty-audit-related-.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-security/refpolicy/refpolicy-git/0001-refpolicy-minimum-audit-logging-getty-audit-related-.patch')
-rw-r--r--recipes-security/refpolicy/refpolicy-git/0001-refpolicy-minimum-audit-logging-getty-audit-related-.patch68
1 files changed, 0 insertions, 68 deletions
diff --git a/recipes-security/refpolicy/refpolicy-git/0001-refpolicy-minimum-audit-logging-getty-audit-related-.patch b/recipes-security/refpolicy/refpolicy-git/0001-refpolicy-minimum-audit-logging-getty-audit-related-.patch
deleted file mode 100644
index 3cc5395..0000000
--- a/recipes-security/refpolicy/refpolicy-git/0001-refpolicy-minimum-audit-logging-getty-audit-related-.patch
+++ /dev/null
@@ -1,68 +0,0 @@
1From 0f25b7c345d516eccd1c02c93f752ce073b84865 Mon Sep 17 00:00:00 2001
2From: Shrikant Bobade <shrikant_bobade@mentor.com>
3Date: Fri, 26 Aug 2016 17:51:44 +0530
4Subject: [PATCH 1/9] refpolicy-minimum: audit: logging: getty: audit related
5 allow rules
6
7add allow rules for audit.log file & resolve dependent avc denials.
8
9without this change we are getting audit avc denials mixed into bootlog &
10audit other avc denials.
11
12audit: type=1400 audit(): avc: denied { getattr } for pid=217 comm="mount"
13name="/" dev="proc" ino=1 scontext=system_u:system_r:mount_t:s0 tcontext=system_0
14audit: type=1400 audit(): avc: denied { sendto } for pid=310 comm="klogd"
15path="/run/systemd/journal/dev-log" scontext=sy0
16audit: type=1400 audit(): avc: denied { sendto } for pid=310 comm="klogd"
17path="/run/systemd/journal/dev-log" scontext=system_u:system_r:klogd_t:s0
18audit(): avc: denied { open } for pid=540 comm="agetty" path="/var/
19volatile/log/wtmp" dev="tmpfs" ino=9536 scontext=system_u:system_r:getty_t
20:s0 tcontext=system_u:object_r:tmpfs_t:s0 tclass=file permissive=0
21
22Upstream-Status: Pending
23
24Signed-off-by: Shrikant Bobade <shrikant_bobade@mentor.com>
25Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
26---
27 policy/modules/system/getty.te | 3 +++
28 policy/modules/system/logging.te | 8 ++++++++
29 2 files changed, 11 insertions(+)
30
31diff --git a/policy/modules/system/getty.te b/policy/modules/system/getty.te
32index 6d3c4284..423db0cc 100644
33--- a/policy/modules/system/getty.te
34+++ b/policy/modules/system/getty.te
35@@ -129,3 +129,6 @@ optional_policy(`
36 optional_policy(`
37 udev_read_db(getty_t)
38 ')
39+
40+allow getty_t tmpfs_t:dir search;
41+allow getty_t tmpfs_t:file { open write lock };
42diff --git a/policy/modules/system/logging.te b/policy/modules/system/logging.te
43index e6221a02..4cc73327 100644
44--- a/policy/modules/system/logging.te
45+++ b/policy/modules/system/logging.te
46@@ -249,6 +249,7 @@ allow audisp_t self:unix_stream_socket create_stream_socket_perms;
47 allow audisp_t self:unix_dgram_socket create_socket_perms;
48
49 allow audisp_t auditd_t:unix_stream_socket rw_socket_perms;
50+allow audisp_t initrc_t:unix_dgram_socket sendto;
51
52 manage_sock_files_pattern(audisp_t, audisp_var_run_t, audisp_var_run_t)
53 files_pid_filetrans(audisp_t, audisp_var_run_t, sock_file)
54@@ -620,3 +621,10 @@ optional_policy(`
55 # log to the xconsole
56 xserver_rw_console(syslogd_t)
57 ')
58+
59+
60+allow auditd_t tmpfs_t:file { getattr setattr create open read append };
61+allow auditd_t tmpfs_t:dir { open read search add_name write getattr search };
62+allow auditd_t initrc_t:unix_dgram_socket sendto;
63+
64+allow klogd_t initrc_t:unix_dgram_socket sendto;
65\ No newline at end of file
66--
672.19.1
68