1 |
commit: 14d96d1fa40e6d7c911904703ee00bd653194ca0 |
2 |
Author: Matthew Thode <mthode <AT> mthode <DOT> org> |
3 |
AuthorDate: Fri Dec 20 21:06:20 2013 +0000 |
4 |
Commit: Sven Vermeulen <swift <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jan 23 19:59:27 2014 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-refpolicy.git;a=commit;h=14d96d1f |
7 |
|
8 |
Extending support for SELinux on ZFS |
9 |
|
10 |
Signed-off-by: Matthew Thode <mthode <AT> mthode.org> |
11 |
|
12 |
--- |
13 |
policy/modules/kernel/storage.fc | 5 +++++ |
14 |
policy/modules/system/fstools.fc | 6 ++++++ |
15 |
policy/modules/system/mount.fc | 4 ++++ |
16 |
3 files changed, 15 insertions(+) |
17 |
|
18 |
diff --git a/policy/modules/kernel/storage.fc b/policy/modules/kernel/storage.fc |
19 |
index 54f1827..4315bd5 100644 |
20 |
--- a/policy/modules/kernel/storage.fc |
21 |
+++ b/policy/modules/kernel/storage.fc |
22 |
@@ -79,5 +79,10 @@ ifdef(`distro_redhat', ` |
23 |
|
24 |
/dev/usb/rio500 -c gen_context(system_u:object_r:removable_device_t,s0) |
25 |
|
26 |
+/dev/zfs -c gen_context(system_u:object_r:fixed_disk_device_t,mls_systemhigh) |
27 |
+/dev/zpios -c gen_context(system_u:object_r:fixed_disk_device_t,mls_systemhigh) |
28 |
+/dev/zvol(/.*)? -l gen_context(system_u:object_r:fixed_disk_device_t,mls_systemhigh) |
29 |
+/dev/zd.* -b gen_context(system_u:object_r:fixed_disk_device_t,mls_systemhigh) |
30 |
+ |
31 |
/lib/udev/devices/loop.* -b gen_context(system_u:object_r:fixed_disk_device_t,mls_systemhigh) |
32 |
/lib/udev/devices/fuse -c gen_context(system_u:object_r:fuse_device_t,s0) |
33 |
|
34 |
diff --git a/policy/modules/system/fstools.fc b/policy/modules/system/fstools.fc |
35 |
index e2e6b71..9b835cf 100644 |
36 |
--- a/policy/modules/system/fstools.fc |
37 |
+++ b/policy/modules/system/fstools.fc |
38 |
@@ -36,6 +36,12 @@ |
39 |
/sbin/swapoff -- gen_context(system_u:object_r:fsadm_exec_t,s0) |
40 |
/sbin/swapon.* -- gen_context(system_u:object_r:fsadm_exec_t,s0) |
41 |
/sbin/tune2fs -- gen_context(system_u:object_r:fsadm_exec_t,s0) |
42 |
+/sbin/zpios -- gen_context(system_u:object_r:fsadm_exec_t,s0) |
43 |
+/sbin/ztest -- gen_context(system_u:object_r:fsadm_exec_t,s0) |
44 |
+/sbin/zinject -- gen_context(system_u:object_r:fsadm_exec_t,s0) |
45 |
+/sbin/zhack -- gen_context(system_u:object_r:fsadm_exec_t,s0) |
46 |
+/sbin/zdb -- gen_context(system_u:object_r:fsadm_exec_t,s0) |
47 |
+/sbin/zstreamdump -- gen_context(system_u:object_r:fsadm_exec_t,s0) |
48 |
|
49 |
/usr/bin/partition_uuid -- gen_context(system_u:object_r:fsadm_exec_t,s0) |
50 |
/usr/bin/raw -- gen_context(system_u:object_r:fsadm_exec_t,s0) |
51 |
|
52 |
diff --git a/policy/modules/system/mount.fc b/policy/modules/system/mount.fc |
53 |
index 4619000..a5e1c6e 100644 |
54 |
--- a/policy/modules/system/mount.fc |
55 |
+++ b/policy/modules/system/mount.fc |
56 |
@@ -2,6 +2,10 @@ |
57 |
/bin/mount.* -- gen_context(system_u:object_r:mount_exec_t,s0) |
58 |
/bin/umount.* -- gen_context(system_u:object_r:mount_exec_t,s0) |
59 |
|
60 |
+/sbin/mount.zfs -- gen_context(system_u:object_r:mount_exec_t,s0) |
61 |
+/sbin/zpool -- gen_context(system_u:object_r:mount_exec_t,s0) |
62 |
+/sbin/zfs -- gen_context(system_u:object_r:mount_exec_t,s0) |
63 |
+ |
64 |
/usr/bin/fusermount -- gen_context(system_u:object_r:mount_exec_t,s0) |
65 |
|
66 |
/var/run/mount(/.*)? gen_context(system_u:object_r:mount_var_run_t,s0) |