1 |
commit: cb31a289deeaf5a45222d1fab3e33eb4fb7ae008 |
2 |
Author: Sven Vermeulen <sven.vermeulen <AT> siphos <DOT> be> |
3 |
AuthorDate: Tue Oct 30 21:51:53 2012 +0000 |
4 |
Commit: Sven Vermeulen <sven.vermeulen <AT> siphos <DOT> be> |
5 |
CommitDate: Wed Oct 31 17:59:27 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-refpolicy.git;a=commit;h=cb31a289 |
7 |
|
8 |
Allow init to set attributes on device_t |
9 |
|
10 |
In Gentoo, the openrc init framework creates the /dev/shm location (within |
11 |
devtmpfs) using a "mkdir -m 1777 /dev/shm" command. This results in initrc_t |
12 |
wanting to set the attributes of the /dev/shm directory (at that point still |
13 |
labeled device_t as tmpfs isn't mounted on it yet). |
14 |
|
15 |
Signed-off-by: Sven Vermeulen <sven.vermeulen <AT> siphos.be> |
16 |
|
17 |
--- |
18 |
policy/modules/system/init.te | 2 ++ |
19 |
1 files changed, 2 insertions(+), 0 deletions(-) |
20 |
|
21 |
diff --git a/policy/modules/system/init.te b/policy/modules/system/init.te |
22 |
index 3bd98e0..83c1a31 100644 |
23 |
--- a/policy/modules/system/init.te |
24 |
+++ b/policy/modules/system/init.te |
25 |
@@ -86,6 +86,7 @@ files_pid_file(initrc_var_run_t) |
26 |
ifdef(`distro_gentoo',` |
27 |
type rc_exec_t; |
28 |
domain_entry_file(initrc_t, rc_exec_t) |
29 |
+ |
30 |
') |
31 |
|
32 |
ifdef(`enable_mls',` |
33 |
@@ -466,6 +467,7 @@ ifdef(`distro_gentoo',` |
34 |
# early init |
35 |
dev_create_generic_dirs(initrc_t) |
36 |
dev_delete_generic_dirs(initrc_t) |
37 |
+ dev_setattr_generic_dirs(initrc_t) |
38 |
|
39 |
# allow bootmisc to create /var/lock/.keep. |
40 |
files_manage_generic_locks(initrc_t) |