summaryrefslogtreecommitdiffstats
path: root/recipes-security/refpolicy/refpolicy/0032-policy-modules-kernel-terminal-don-t-audit-tty_devic.patch
blob: 9648dfd53264b12fc3d5ddddfdbda70bc7c12c6f (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
From a23028f17d5e56e20ed3930b3075ba2d1c211b16 Mon Sep 17 00:00:00 2001
From: Xin Ouyang <Xin.Ouyang@windriver.com>
Date: Thu, 22 Aug 2013 13:37:23 +0800
Subject: [PATCH] policy/modules/kernel/terminal: don't audit tty_device_t in
 term_dontaudit_use_console

We should also not audit terminal to rw tty_device_t and fds in
term_dontaudit_use_console.

Upstream-Status: Inappropriate [embedded specific]

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
 policy/modules/kernel/terminal.if | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/policy/modules/kernel/terminal.if b/policy/modules/kernel/terminal.if
index e5645c7c5..6e9f654ac 100644
--- a/policy/modules/kernel/terminal.if
+++ b/policy/modules/kernel/terminal.if
@@ -335,9 +335,12 @@ interface(`term_use_console',`
 interface(`term_dontaudit_use_console',`
 	gen_require(`
 		type console_device_t;
+		type tty_device_t;
 	')
 
+	init_dontaudit_use_fds($1)
 	dontaudit $1 console_device_t:chr_file rw_chr_file_perms;
+	dontaudit $1 tty_device_t:chr_file rw_chr_file_perms;
 ')
 
 ########################################
-- 
2.25.1