Extending support for SELinux on ZFS
PATCH 1/1 Extending support for SELinux on ZFS
--- policy/modules/kernel/storage.fc | 5 +++++ policy/modules/system/fstools.fc | 6 ++++++ policy/modules/system/mount.fc | 4 ++++ 3 files changed, 15 insertions(+)
policy/modules/kernel/storage.fc +5 -0
@@ -79,5 +79,10 @@ ifdef(`distro_redhat', ` /dev/usb/rio500 -c gen_context(system_u:object_r:removable_device_t,s0) +/dev/zfs -c gen_context(system_u:object_r:fixed_disk_device_t,mls_systemhigh) +/dev/zpios -c gen_context(system_u:object_r:fixed_disk_device_t,mls_systemhigh) +/dev/zvol(/.*)? -l gen_context(system_u:object_r:fixed_disk_device_t,mls_systemhigh) +/dev/zd.* -b gen_context(system_u:object_r:fixed_disk_device_t,mls_systemhigh) + /lib/udev/devices/loop.* -b gen_context(system_u:object_r:fixed_disk_device_t,mls_systemhigh) /lib/udev/devices/fuse -c gen_context(system_u:object_r:fuse_device_t,s0)
policy/modules/system/fstools.fc +6 -0
@@ -36,6 +36,12 @@ /sbin/swapoff -- gen_context(system_u:object_r:fsadm_exec_t,s0) /sbin/swapon.* -- gen_context(system_u:object_r:fsadm_exec_t,s0) /sbin/tune2fs -- gen_context(system_u:object_r:fsadm_exec_t,s0) +/sbin/zpios -- gen_context(system_u:object_r:fsadm_exec_t,s0) +/sbin/ztest -- gen_context(system_u:object_r:fsadm_exec_t,s0) +/sbin/zinject -- gen_context(system_u:object_r:fsadm_exec_t,s0) +/sbin/zhack -- gen_context(system_u:object_r:fsadm_exec_t,s0) +/sbin/zdb -- gen_context(system_u:object_r:fsadm_exec_t,s0) +/sbin/zstreamdump -- gen_context(system_u:object_r:fsadm_exec_t,s0) /usr/bin/partition_uuid -- gen_context(system_u:object_r:fsadm_exec_t,s0) /usr/bin/raw -- gen_context(system_u:object_r:fsadm_exec_t,s0)
policy/modules/system/mount.fc +4 -0
@@ -1,6 +1,10 @@ /bin/mount.* -- gen_context(system_u:object_r:mount_exec_t,s0) /bin/umount.* -- gen_context(system_u:object_r:mount_exec_t,s0) +/sbin/mount.zfs -- gen_context(system_u:object_r:mount_exec_t,s0) +/sbin/zpool -- gen_context(system_u:object_r:mount_exec_t,s0) +/sbin/zfs -- gen_context(system_u:object_r:mount_exec_t,s0) + /usr/bin/fusermount -- gen_context(system_u:object_r:mount_exec_t,s0) /var/run/mount(/.*)? gen_context(system_u:object_r:mount_var_run_t,s0)
Signature · 1 line
1.8.3.2
PATCH 1/1 Extending support for SELinux on ZFS
Quoted 12 lines · Matthew Thode
Signed-off-by Matthew Thode <[email protected]>--- policy/modules/kernel/storage.fc | 5 +++++ policy/modules/system/fstools.fc | 6 ++++++ policy/modules/system/mount.fc | 4 ++++ 3 files changed, 15 insertions(+)policy/modules/kernel/storage.fc +0
-0
policy/modules/kernel/storage.fc ifdef(`distro_redhat', ` · line 84
Quoted 6 lines
policy/modules/kernel/storage.fc +3
-0@@ -79,5 +79,10 @@ ifdef(`distro_redhat', ` /dev/usb/rio500 -c gen_context(system_u:object_r:removable_device_t,s0) +/dev/zfs -c gen_context(system_u:object_r:fixed_disk_device_t,mls_systemhigh) +/dev/zpios -c gen_context(system_u:object_r:fixed_disk_device_t,mls_systemhigh) +/dev/zvol(/.*)? -l gen_context(system_u:object_r:fixed_disk_device_t,mls_systemhigh)
Normally we leave the symlinks stay the generic type, in this case device_t. That type is sufficiently protected and the symlink isn't sensitive, so it doesn't merit having a different type. Otherwise the patch looks ok.
Quoted 37 lines
policy/modules/kernel/storage.fc +2
-0+/dev/zd.* -b gen_context(system_u:object_r:fixed_disk_device_t,mls_systemhigh) + /lib/udev/devices/loop.* -b gen_context(system_u:object_r:fixed_disk_device_t,mls_systemhigh) /lib/udev/devices/fuse -c gen_context(system_u:object_r:fuse_device_t,s0)policy/modules/system/fstools.fc +6
-0@@ -36,6 +36,12 @@ /sbin/swapoff -- gen_context(system_u:object_r:fsadm_exec_t,s0) /sbin/swapon.* -- gen_context(system_u:object_r:fsadm_exec_t,s0) /sbin/tune2fs -- gen_context(system_u:object_r:fsadm_exec_t,s0) +/sbin/zpios -- gen_context(system_u:object_r:fsadm_exec_t,s0) +/sbin/ztest -- gen_context(system_u:object_r:fsadm_exec_t,s0) +/sbin/zinject -- gen_context(system_u:object_r:fsadm_exec_t,s0) +/sbin/zhack -- gen_context(system_u:object_r:fsadm_exec_t,s0) +/sbin/zdb -- gen_context(system_u:object_r:fsadm_exec_t,s0) +/sbin/zstreamdump -- gen_context(system_u:object_r:fsadm_exec_t,s0) /usr/bin/partition_uuid -- gen_context(system_u:object_r:fsadm_exec_t,s0) /usr/bin/raw -- gen_context(system_u:object_r:fsadm_exec_t,s0)policy/modules/system/mount.fc +4
-0@@ -1,6 +1,10 @@ /bin/mount.* -- gen_context(system_u:object_r:mount_exec_t,s0) /bin/umount.* -- gen_context(system_u:object_r:mount_exec_t,s0) +/sbin/mount.zfs -- gen_context(system_u:object_r:mount_exec_t,s0) +/sbin/zpool -- gen_context(system_u:object_r:mount_exec_t,s0) +/sbin/zfs -- gen_context(system_u:object_r:mount_exec_t,s0) + /usr/bin/fusermount -- gen_context(system_u:object_r:mount_exec_t,s0) /var/run/mount(/.*)? gen_context(system_u:object_r:mount_var_run_t,s0)
Signature · 3 lines
Chris PeBenito Tresys Technology, LLC www.tresys.com | oss.tresys.com
PATCH 1/1 Extending support for SELinux on ZFS
Quoted 52 lines · Christopher J. PeBenito
Quoted 12 lines · Matthew Thode
Signed-off-by Matthew Thode <[email protected]>--- policy/modules/kernel/storage.fc | 5 +++++ policy/modules/system/fstools.fc | 6 ++++++ policy/modules/system/mount.fc | 4 ++++ 3 files changed, 15 insertions(+)policy/modules/kernel/storage.fc +0
-0policy/modules/kernel/storage.fc ifdef(`distro_redhat', ` · line 84
Quoted 6 lines
policy/modules/kernel/storage.fc +3
-0@@ -79,5 +79,10 @@ ifdef(`distro_redhat', ` /dev/usb/rio500 -c gen_context(system_u:object_r:removable_device_t,s0) +/dev/zfs -c gen_context(system_u:object_r:fixed_disk_device_t,mls_systemhigh) +/dev/zpios -c gen_context(system_u:object_r:fixed_disk_device_t,mls_systemhigh) +/dev/zvol(/.*)? -l gen_context(system_u:object_r:fixed_disk_device_t,mls_systemhigh)Normally we leave the symlinks stay the generic type, in this case
device_t. That type is sufficiently protected and the symlink isn't sensitive, so it doesn't merit having a different type. Otherwise the patch looks ok.Quoted 29 lines
policy/modules/kernel/storage.fc +2
-0+/dev/zd.* -b gen_context(system_u:object_r:fixed_disk_device_t,mls_systemhigh) + /lib/udev/devices/loop.* -b gen_context(system_u:object_r:fixed_disk_device_t,mls_systemhigh) /lib/udev/devices/fuse -c gen_context(system_u:object_r:fuse_device_t,s0)policy/modules/system/fstools.fc +6
-0@@ -36,6 +36,12 @@ /sbin/swapoff -- gen_context(system_u:object_r:fsadm_exec_t,s0) /sbin/swapon.* -- gen_context(system_u:object_r:fsadm_exec_t,s0) /sbin/tune2fs -- gen_context(system_u:object_r:fsadm_exec_t,s0) +/sbin/zpios -- gen_context(system_u:object_r:fsadm_exec_t,s0) +/sbin/ztest -- gen_context(system_u:object_r:fsadm_exec_t,s0) +/sbin/zinject -- gen_context(system_u:object_r:fsadm_exec_t,s0) +/sbin/zhack -- gen_context(system_u:object_r:fsadm_exec_t,s0) +/sbin/zdb -- gen_context(system_u:object_r:fsadm_exec_t,s0) +/sbin/zstreamdump -- gen_context(system_u:object_r:fsadm_exec_t,s0) /usr/bin/partition_uuid -- gen_context(system_u:object_r:fsadm_exec_t,s0) /usr/bin/raw -- gen_context(system_u:object_r:fsadm_exec_t,s0)policy/modules/system/mount.fc +0
-0@@ -1,6 +1,10 @@ /bin/mount.* -- gen_context(system_u:object_r:mount_exec_t,s0) /bin/umount.* -- gen_context(system_u:object_r:mount_exec_t,s0)
Quoted 10 lines
policy/modules/system/mount.fc line 10
Quoted 8 lines
policy/modules/system/mount.fc +4
-0+/sbin/mount.zfs -- gen_context(system_u:object_r:mount_exec_t,s0) +/sbin/zpool -- gen_context(system_u:object_r:mount_exec_t,s0) +/sbin/zfs -- gen_context(system_u:object_r:mount_exec_t,s0) + /usr/bin/fusermount -- gen_context(system_u:object_r:mount_exec_t,s0) /var/run/mount(/.*)? gen_context(system_u:object_r:mount_var_run_t,s0)
Would you like me to resubmit?
Signature · 9 lines
-- Matthew Thode -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: OpenPGP digital signature Url : http://oss.tresys.com/pipermail/refpolicy/attachments/20131220/03cab114/attachment.bin
PATCH 1/1 Extending support for SELinux on ZFS
Quoted 17 lines · Matthew Thode
Quoted 16 lines · Christopher J. PeBenito
Quoted 15 lines · Matthew Thode
Signed-off-by Matthew Thode <[email protected]>--- policy/modules/kernel/storage.fc | 5 +++++ policy/modules/system/fstools.fc | 6 ++++++ policy/modules/system/mount.fc | 4 ++++ 3 files changed, 15 insertions(+)policy/modules/kernel/storage.fc +0
-0@@ -79,5 +79,10 @@ ifdef(`distro_redhat', ` /dev/usb/rio500 -c gen_context(system_u:object_r:removable_device_t,s0)
Quoted 7 lines
Quoted 5 lines
policy/modules/kernel/storage.fc ifdef(`distro_redhat', ` · line 84
Quoted 3 lines
policy/modules/kernel/storage.fc +3
-0+/dev/zfs -c gen_context(system_u:object_r:fixed_disk_device_t,mls_systemhigh) +/dev/zpios -c gen_context(system_u:object_r:fixed_disk_device_t,mls_systemhigh) +/dev/zvol(/.*)? -l gen_context(system_u:object_r:fixed_disk_device_t,mls_systemhigh)Normally we leave the symlinks stay the generic type, in this case
device_t. That type is sufficiently protected and the symlink isn't sensitive, so it doesn't merit having a different type. Otherwise the patch looks ok.Would you like me to resubmit?
Please do. I was going to apply it and then fix it, but it fails to apply; looks like a conflict from something I just merged.
Signature · 3 lines
Chris PeBenito Tresys Technology, LLC www.tresys.com | oss.tresys.com