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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
Subject: [PATCH] add rules for the symlink of /tmp
/tmp is a symlink in poky, so we need allow rules for files to read
lnk_file while doing search/list/delete/rw.. in /tmp/ directory.
Upstream-Status: Inappropriate [only for Poky]
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
---
policy/modules/kernel/files.fc | 1 +
policy/modules/kernel/files.if | 8 ++++++++
2 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/policy/modules/kernel/files.fc b/policy/modules/kernel/files.fc
index 8796ca3..a0db748 100644
--- a/policy/modules/kernel/files.fc
+++ b/policy/modules/kernel/files.fc
@@ -185,6 +185,7 @@ ifdef(`distro_debian',`
# /tmp
#
/tmp -d gen_context(system_u:object_r:tmp_t,s0-mls_systemhigh)
+/tmp -l gen_context(system_u:object_r:tmp_t,s0-mls_systemhigh)
/tmp/.* <<none>>
/tmp/\.journal <<none>>
diff --git a/policy/modules/kernel/files.if b/policy/modules/kernel/files.if
index e1e814d..a7384b0 100644
--- a/policy/modules/kernel/files.if
+++ b/policy/modules/kernel/files.if
@@ -4199,6 +4199,7 @@ interface(`files_search_tmp',`
')
allow $1 tmp_t:dir search_dir_perms;
+ allow $1 tmp_t:lnk_file read_lnk_file_perms;
')
########################################
@@ -4235,6 +4236,7 @@ interface(`files_list_tmp',`
')
allow $1 tmp_t:dir list_dir_perms;
+ allow $1 tmp_t:lnk_file read_lnk_file_perms;
')
########################################
@@ -4271,6 +4273,7 @@ interface(`files_delete_tmp_dir_entry',`
')
allow $1 tmp_t:dir del_entry_dir_perms;
+ allow $1 tmp_t:lnk_file read_lnk_file_perms;
')
########################################
@@ -4289,6 +4292,7 @@ interface(`files_read_generic_tmp_files',`
')
read_files_pattern($1, tmp_t, tmp_t)
+ allow $1 tmp_t:lnk_file read_lnk_file_perms;
')
########################################
@@ -4307,6 +4311,7 @@ interface(`files_manage_generic_tmp_dirs',`
')
manage_dirs_pattern($1, tmp_t, tmp_t)
+ allow $1 tmp_t:lnk_file read_lnk_file_perms;
')
########################################
@@ -4325,6 +4330,7 @@ interface(`files_manage_generic_tmp_files',`
')
manage_files_pattern($1, tmp_t, tmp_t)
+ allow $1 tmp_t:lnk_file read_lnk_file_perms;
')
########################################
@@ -4361,6 +4367,7 @@ interface(`files_rw_generic_tmp_sockets',`
')
rw_sock_files_pattern($1, tmp_t, tmp_t)
+ allow $1 tmp_t:lnk_file read_lnk_file_perms;
')
########################################
@@ -4550,6 +4557,7 @@ interface(`files_tmp_filetrans',`
')
filetrans_pattern($1, tmp_t, $2, $3, $4)
+ allow $1 tmp_t:lnk_file read_lnk_file_perms;
')
########################################
--
1.7.5.4
|