1 |
commit: db53283aab8d16614c4c72b3967d8570083a2e20 |
2 |
Author: Kenton Groombridge <me <AT> concord <DOT> sh> |
3 |
AuthorDate: Mon Feb 1 20:46:24 2021 +0000 |
4 |
Commit: Jason Zaman <perfinion <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Feb 6 20:54:11 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=db53283a |
7 |
|
8 |
lvm: add lvm_tmpfs_t type and rules |
9 |
|
10 |
cryptsetup uses tmpfs when performing some operations on encrypted |
11 |
volumes such as changing keys. |
12 |
|
13 |
Signed-off-by: Kenton Groombridge <me <AT> concord.sh> |
14 |
Signed-off-by: Jason Zaman <perfinion <AT> gentoo.org> |
15 |
|
16 |
policy/modules/system/lvm.te | 7 +++++++ |
17 |
1 file changed, 7 insertions(+) |
18 |
|
19 |
diff --git a/policy/modules/system/lvm.te b/policy/modules/system/lvm.te |
20 |
index a0cc3bd9..99053132 100644 |
21 |
--- a/policy/modules/system/lvm.te |
22 |
+++ b/policy/modules/system/lvm.te |
23 |
@@ -42,6 +42,9 @@ init_unit_file(lvm_unit_t) |
24 |
type lvm_tmp_t; |
25 |
files_tmp_file(lvm_tmp_t) |
26 |
|
27 |
+type lvm_tmpfs_t; |
28 |
+files_tmpfs_file(lvm_tmpfs_t) |
29 |
+ |
30 |
type lvm_var_lib_t; |
31 |
files_type(lvm_var_lib_t) |
32 |
|
33 |
@@ -183,6 +186,10 @@ manage_dirs_pattern(lvm_t, lvm_tmp_t, lvm_tmp_t) |
34 |
manage_files_pattern(lvm_t, lvm_tmp_t, lvm_tmp_t) |
35 |
files_tmp_filetrans(lvm_t, lvm_tmp_t, { file dir }) |
36 |
|
37 |
+manage_dirs_pattern(lvm_t, lvm_tmpfs_t, lvm_tmpfs_t) |
38 |
+manage_files_pattern(lvm_t, lvm_tmpfs_t, lvm_tmpfs_t) |
39 |
+fs_tmpfs_filetrans(lvm_t, lvm_tmpfs_t, { dir file }) |
40 |
+ |
41 |
# /lib/lvm-<version> holds the actual LVM binaries (and symlinks) |
42 |
read_files_pattern(lvm_t, lvm_exec_t, lvm_exec_t) |
43 |
read_lnk_files_pattern(lvm_t, lvm_exec_t, lvm_exec_t) |