diff options
Diffstat (limited to 'recipes-security/refpolicy/refpolicy/0031-policy-modules-kernel-files-add-rules-for-the-symlin.patch')
-rw-r--r-- | recipes-security/refpolicy/refpolicy/0031-policy-modules-kernel-files-add-rules-for-the-symlin.patch | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/recipes-security/refpolicy/refpolicy/0031-policy-modules-kernel-files-add-rules-for-the-symlin.patch b/recipes-security/refpolicy/refpolicy/0031-policy-modules-kernel-files-add-rules-for-the-symlin.patch new file mode 100644 index 0000000..ffa78ac --- /dev/null +++ b/recipes-security/refpolicy/refpolicy/0031-policy-modules-kernel-files-add-rules-for-the-symlin.patch | |||
@@ -0,0 +1,102 @@ | |||
1 | From fd55f9f292617c7475c62c07ed6c478b4bd9eda5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Xin Ouyang <Xin.Ouyang@windriver.com> | ||
3 | Date: Thu, 22 Aug 2013 13:37:23 +0800 | ||
4 | Subject: [PATCH] policy/modules/kernel/files: add rules for the symlink of | ||
5 | /tmp | ||
6 | |||
7 | /tmp is a symlink in poky, so we need allow rules for files to read | ||
8 | lnk_file while doing search/list/delete/rw.. in /tmp/ directory. | ||
9 | |||
10 | Upstream-Status: Inappropriate [embedded specific] | ||
11 | |||
12 | Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com> | ||
13 | Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com> | ||
14 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
15 | --- | ||
16 | policy/modules/kernel/files.fc | 1 + | ||
17 | policy/modules/kernel/files.if | 8 ++++++++ | ||
18 | 2 files changed, 9 insertions(+) | ||
19 | |||
20 | diff --git a/policy/modules/kernel/files.fc b/policy/modules/kernel/files.fc | ||
21 | index 826722f4e..677ae96c3 100644 | ||
22 | --- a/policy/modules/kernel/files.fc | ||
23 | +++ b/policy/modules/kernel/files.fc | ||
24 | @@ -172,6 +172,7 @@ HOME_ROOT/lost\+found/.* <<none>> | ||
25 | # /tmp | ||
26 | # | ||
27 | /tmp -d gen_context(system_u:object_r:tmp_t,s0-mls_systemhigh) | ||
28 | +/tmp -l gen_context(system_u:object_r:tmp_t,s0) | ||
29 | /tmp/.* <<none>> | ||
30 | /tmp/\.journal <<none>> | ||
31 | |||
32 | diff --git a/policy/modules/kernel/files.if b/policy/modules/kernel/files.if | ||
33 | index 495cbe2f4..b308eefd9 100644 | ||
34 | --- a/policy/modules/kernel/files.if | ||
35 | +++ b/policy/modules/kernel/files.if | ||
36 | @@ -4555,6 +4555,7 @@ interface(`files_search_tmp',` | ||
37 | ') | ||
38 | |||
39 | allow $1 tmp_t:dir search_dir_perms; | ||
40 | + allow $1 tmp_t:lnk_file read_lnk_file_perms; | ||
41 | ') | ||
42 | |||
43 | ######################################## | ||
44 | @@ -4591,6 +4592,7 @@ interface(`files_list_tmp',` | ||
45 | ') | ||
46 | |||
47 | allow $1 tmp_t:dir list_dir_perms; | ||
48 | + allow $1 tmp_t:lnk_file read_lnk_file_perms; | ||
49 | ') | ||
50 | |||
51 | ######################################## | ||
52 | @@ -4627,6 +4629,7 @@ interface(`files_delete_tmp_dir_entry',` | ||
53 | ') | ||
54 | |||
55 | allow $1 tmp_t:dir del_entry_dir_perms; | ||
56 | + allow $1 tmp_t:lnk_file read_lnk_file_perms; | ||
57 | ') | ||
58 | |||
59 | ######################################## | ||
60 | @@ -4645,6 +4648,7 @@ interface(`files_read_generic_tmp_files',` | ||
61 | ') | ||
62 | |||
63 | read_files_pattern($1, tmp_t, tmp_t) | ||
64 | + allow $1 tmp_t:lnk_file read_lnk_file_perms; | ||
65 | ') | ||
66 | |||
67 | ######################################## | ||
68 | @@ -4663,6 +4667,7 @@ interface(`files_manage_generic_tmp_dirs',` | ||
69 | ') | ||
70 | |||
71 | manage_dirs_pattern($1, tmp_t, tmp_t) | ||
72 | + allow $1 tmp_t:lnk_file read_lnk_file_perms; | ||
73 | ') | ||
74 | |||
75 | ######################################## | ||
76 | @@ -4699,6 +4704,7 @@ interface(`files_manage_generic_tmp_files',` | ||
77 | ') | ||
78 | |||
79 | manage_files_pattern($1, tmp_t, tmp_t) | ||
80 | + allow $1 tmp_t:lnk_file read_lnk_file_perms; | ||
81 | ') | ||
82 | |||
83 | ######################################## | ||
84 | @@ -4735,6 +4741,7 @@ interface(`files_rw_generic_tmp_sockets',` | ||
85 | ') | ||
86 | |||
87 | rw_sock_files_pattern($1, tmp_t, tmp_t) | ||
88 | + allow $1 tmp_t:lnk_file read_lnk_file_perms; | ||
89 | ') | ||
90 | |||
91 | ######################################## | ||
92 | @@ -4942,6 +4949,7 @@ interface(`files_tmp_filetrans',` | ||
93 | ') | ||
94 | |||
95 | filetrans_pattern($1, tmp_t, $2, $3, $4) | ||
96 | + allow $1 tmp_t:lnk_file read_lnk_file_perms; | ||
97 | ') | ||
98 | |||
99 | ######################################## | ||
100 | -- | ||
101 | 2.17.1 | ||
102 | |||