summaryrefslogtreecommitdiffstats
path: root/recipes-security/refpolicy/refpolicy/0048-policy-modules-system-logging-fix-auditd-startup-fai.patch
blob: cb5b88d27f6ec7b4878a8ab64385f101740ecb55 (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
From b585008cec90386903e7613a4a22286c0a94be8c Mon Sep 17 00:00:00 2001
From: Wenzong Fan <wenzong.fan@windriver.com>
Date: Tue, 24 Jan 2017 08:45:35 +0000
Subject: [PATCH] policy/modules/system/logging: fix auditd startup failures

Fixes:
  avc: denied { getcap } for pid=849 comm="auditctl" \
  scontext=system_u:system_r:auditctl_t:s0-s15:c0.c1023 \
  tcontext=system_u:system_r:auditctl_t:s0-s15:c0.c1023 \
  tclass=process

  avc: denied { setattr } for pid=848 comm="auditd" \
  name="audit" dev="tmpfs" ino=9569 \
  scontext=system_u:system_r:auditd_t:s15:c0.c1023 \
  tcontext=system_u:object_r:auditd_log_t:s15:c0.c1023 \
  tclass=dir

  avc: denied { search } for pid=731 comm="auditd" \
  name="/" dev="tmpfs" ino=9399 \
  scontext=system_u:system_r:auditd_t:s15:c0.c1023 \
  tcontext=system_u:object_r:tmpfs_t:s0 tclass=dir

Upstream-Status: Inappropriate [embedded specific]

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

diff --git a/policy/modules/system/logging.te b/policy/modules/system/logging.te
index 2d9f65d2d..95309f334 100644
--- a/policy/modules/system/logging.te
+++ b/policy/modules/system/logging.te
@@ -157,6 +157,7 @@ allow auditd_t auditd_etc_t:dir list_dir_perms;
 allow auditd_t auditd_etc_t:file read_file_perms;
 dontaudit auditd_t auditd_etc_t:file map;
 
+manage_dirs_pattern(auditd_t, auditd_log_t, auditd_log_t)
 manage_files_pattern(auditd_t, auditd_log_t, auditd_log_t)
 allow auditd_t auditd_log_t:dir setattr;
 manage_lnk_files_pattern(auditd_t, auditd_log_t, auditd_log_t)
@@ -177,6 +178,7 @@ dev_read_sysfs(auditd_t)
 fs_getattr_all_fs(auditd_t)
 fs_search_auto_mountpoints(auditd_t)
 fs_rw_anon_inodefs_files(auditd_t)
+fs_search_tmpfs(auditd_t)
 
 selinux_search_fs(auditctl_t)
 
-- 
2.17.1