summaryrefslogtreecommitdiffstats
path: root/recipes-security/refpolicy/refpolicy-git/0021-policy-module-files-add-rules-for-the-symlink-of-tmp.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-security/refpolicy/refpolicy-git/0021-policy-module-files-add-rules-for-the-symlink-of-tmp.patch')
-rw-r--r--recipes-security/refpolicy/refpolicy-git/0021-policy-module-files-add-rules-for-the-symlink-of-tmp.patch100
1 files changed, 0 insertions, 100 deletions
diff --git a/recipes-security/refpolicy/refpolicy-git/0021-policy-module-files-add-rules-for-the-symlink-of-tmp.patch b/recipes-security/refpolicy/refpolicy-git/0021-policy-module-files-add-rules-for-the-symlink-of-tmp.patch
deleted file mode 100644
index aa61a80..0000000
--- a/recipes-security/refpolicy/refpolicy-git/0021-policy-module-files-add-rules-for-the-symlink-of-tmp.patch
+++ /dev/null
@@ -1,100 +0,0 @@
1From edcfc7eb98658352f3ffdeb8079517c54ba7f984 Mon Sep 17 00:00:00 2001
2From: Xin Ouyang <Xin.Ouyang@windriver.com>
3Date: Thu, 22 Aug 2013 13:37:23 +0800
4Subject: [PATCH 21/34] policy/module/files: add rules for the symlink of /tmp
5
6/tmp is a symlink in poky, so we need allow rules for files to read
7lnk_file while doing search/list/delete/rw.. in /tmp/ directory.
8
9Upstream-Status: Inappropriate [only for Poky]
10
11Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
12Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
13---
14 policy/modules/kernel/files.fc | 1 +
15 policy/modules/kernel/files.if | 8 ++++++++
16 2 files changed, 9 insertions(+)
17
18diff --git a/policy/modules/kernel/files.fc b/policy/modules/kernel/files.fc
19index c3496c21..05b1734b 100644
20--- a/policy/modules/kernel/files.fc
21+++ b/policy/modules/kernel/files.fc
22@@ -176,6 +176,7 @@ HOME_ROOT/lost\+found/.* <<none>>
23 # /tmp
24 #
25 /tmp -d gen_context(system_u:object_r:tmp_t,s0-mls_systemhigh)
26+/tmp -l gen_context(system_u:object_r:tmp_t,s0-mls_systemhigh)
27 /tmp/.* <<none>>
28 /tmp/\.journal <<none>>
29
30diff --git a/policy/modules/kernel/files.if b/policy/modules/kernel/files.if
31index f1c94411..eb067ad3 100644
32--- a/policy/modules/kernel/files.if
33+++ b/policy/modules/kernel/files.if
34@@ -4350,6 +4350,7 @@ interface(`files_search_tmp',`
35 ')
36
37 allow $1 tmp_t:dir search_dir_perms;
38+ allow $1 tmp_t:lnk_file read_lnk_file_perms;
39 ')
40
41 ########################################
42@@ -4386,6 +4387,7 @@ interface(`files_list_tmp',`
43 ')
44
45 allow $1 tmp_t:dir list_dir_perms;
46+ allow $1 tmp_t:lnk_file read_lnk_file_perms;
47 ')
48
49 ########################################
50@@ -4422,6 +4424,7 @@ interface(`files_delete_tmp_dir_entry',`
51 ')
52
53 allow $1 tmp_t:dir del_entry_dir_perms;
54+ allow $1 tmp_t:lnk_file read_lnk_file_perms;
55 ')
56
57 ########################################
58@@ -4440,6 +4443,7 @@ interface(`files_read_generic_tmp_files',`
59 ')
60
61 read_files_pattern($1, tmp_t, tmp_t)
62+ allow $1 tmp_t:lnk_file read_lnk_file_perms;
63 ')
64
65 ########################################
66@@ -4458,6 +4462,7 @@ interface(`files_manage_generic_tmp_dirs',`
67 ')
68
69 manage_dirs_pattern($1, tmp_t, tmp_t)
70+ allow $1 tmp_t:lnk_file read_lnk_file_perms;
71 ')
72
73 ########################################
74@@ -4476,6 +4481,7 @@ interface(`files_manage_generic_tmp_files',`
75 ')
76
77 manage_files_pattern($1, tmp_t, tmp_t)
78+ allow $1 tmp_t:lnk_file read_lnk_file_perms;
79 ')
80
81 ########################################
82@@ -4512,6 +4518,7 @@ interface(`files_rw_generic_tmp_sockets',`
83 ')
84
85 rw_sock_files_pattern($1, tmp_t, tmp_t)
86+ allow $1 tmp_t:lnk_file read_lnk_file_perms;
87 ')
88
89 ########################################
90@@ -4719,6 +4726,7 @@ interface(`files_tmp_filetrans',`
91 ')
92
93 filetrans_pattern($1, tmp_t, $2, $3, $4)
94+ allow $1 tmp_t:lnk_file read_lnk_file_perms;
95 ')
96
97 ########################################
98--
992.19.1
100