All of lore.kernel.org
 help / color / mirror / Atom feed
From: cpebenito@tresys.com (Christopher J. PeBenito)
To: refpolicy@oss.tresys.com
Subject: [refpolicy] [PATCH 1/1] Extending support for SELinux on ZFS
Date: Fri, 20 Dec 2013 15:07:30 -0500	[thread overview]
Message-ID: <52B4A382.9070507@tresys.com> (raw)
In-Reply-To: <1387560695-24878-1-git-send-email-mthode@mthode.org>

On 12/20/13 12:31, Matthew Thode wrote:
> Signed-off-by: Matthew Thode <mthode@mthode.org>
> ---
>  policy/modules/kernel/storage.fc | 5 +++++
>  policy/modules/system/fstools.fc | 6 ++++++
>  policy/modules/system/mount.fc   | 4 ++++
>  3 files changed, 15 insertions(+)
> 
> diff --git a/policy/modules/kernel/storage.fc b/policy/modules/kernel/storage.fc
> index 54f1827..4315bd5 100644
> --- a/policy/modules/kernel/storage.fc
> +++ b/policy/modules/kernel/storage.fc
> @@ -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.


> +/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)
> diff --git a/policy/modules/system/fstools.fc b/policy/modules/system/fstools.fc
> index 948ce2a..39e6c25 100644
> --- a/policy/modules/system/fstools.fc
> +++ b/policy/modules/system/fstools.fc
> @@ -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)
> diff --git a/policy/modules/system/mount.fc b/policy/modules/system/mount.fc
> index a38605e..807ceef 100644
> --- a/policy/modules/system/mount.fc
> +++ b/policy/modules/system/mount.fc
> @@ -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)
> 


-- 
Chris PeBenito
Tresys Technology, LLC
www.tresys.com | oss.tresys.com

  reply	other threads:[~2013-12-20 20:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-20 17:31 [refpolicy] [PATCH 1/1] Extending support for SELinux on ZFS Matthew Thode
2013-12-20 20:07 ` Christopher J. PeBenito [this message]
2013-12-20 20:14   ` Matthew Thode
2013-12-20 20:22     ` Christopher J. PeBenito
  -- strict thread matches above, loose matches on Subject: below --
2013-12-20 21:06 Matthew Thode
2014-01-20 16:31 ` Matthew Thode
2014-01-21 13:57   ` Christopher J. PeBenito

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52B4A382.9070507@tresys.com \
    --to=cpebenito@tresys.com \
    --cc=refpolicy@oss.tresys.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.