SELinux-Refpolicy Archive mirror
 help / color / mirror / Atom feed
From: Chris PeBenito <pebenito@ieee.org>
To: Russell Coker <russell@coker.com.au>, selinux-refpolicy@vger.kernel.org
Subject: Re: [PATCH] blkmapd
Date: Tue, 16 Feb 2021 09:30:43 -0500	[thread overview]
Message-ID: <70306b7d-7292-0fab-fcbe-93d033493791@ieee.org> (raw)
In-Reply-To: <YCifyH4VtQwozFDE@xev>

On 2/13/21 10:58 PM, Russell Coker wrote:
> Patch for the blkmapd daemon that's part of the NFS server.
> 
> I think this is ready for mergikng.
> 
> Signed-off-by: Russell Coker <russell@coker.com.au>
> 
> Index: refpolicy-2.20210203/policy/modules/services/rpc.fc
> ===================================================================
> --- refpolicy-2.20210203.orig/policy/modules/services/rpc.fc
> +++ refpolicy-2.20210203/policy/modules/services/rpc.fc
> @@ -16,6 +16,7 @@
>   /usr/lib/systemd/system/nfs.*\.service --   gen_context(system_u:object_r:nfsd_unit_t,s0)
>   /usr/lib/systemd/system/rpc.*\.service --   gen_context(system_u:object_r:rpcd_unit_t,s0)
>   
> +/usr/sbin/blkmapd	--	gen_context(system_u:object_r:blkmapd_exec_t,s0)
>   /usr/sbin/rpc\..*	--	gen_context(system_u:object_r:rpcd_exec_t,s0)
>   /usr/sbin/rpc\.idmapd	--	gen_context(system_u:object_r:rpcd_exec_t,s0)
>   /usr/sbin/rpc\.gssd	--	gen_context(system_u:object_r:gssd_exec_t,s0)
> @@ -27,6 +28,7 @@
>   
>   /var/lib/nfs(/.*)?	gen_context(system_u:object_r:var_lib_nfs_t,s0)
>   
> +/run/blkmapd\.pid	--	gen_context(system_u:object_r:rpcd_runtime_t,s0)
>   /run/rpc\.statd(/.*)?	gen_context(system_u:object_r:rpcd_runtime_t,s0)
>   /run/rpc\.statd\.pid	--	gen_context(system_u:object_r:rpcd_runtime_t,s0)
>   /run/sm-notify\.pid	--	gen_context(system_u:object_r:rpcd_runtime_t,s0)
> Index: refpolicy-2.20210203/policy/modules/services/rpc.te
> ===================================================================
> --- refpolicy-2.20210203.orig/policy/modules/services/rpc.te
> +++ refpolicy-2.20210203/policy/modules/services/rpc.te
> @@ -72,6 +72,14 @@ init_unit_file(nfsd_unit_t)
>   type var_lib_nfs_t;
>   files_mountpoint(var_lib_nfs_t)
>   
> +rpc_domain_template(blkmapd)
> +
> +type blkmapd_runtime_t;
> +files_runtime_file(blkmapd_runtime_t)
> +files_runtime_filetrans(blkmapd_t, blkmapd_runtime_t, file, "blkmapd.pid")
> +allow blkmapd_t blkmapd_runtime_t:file manage_file_perms;
> +
> +
>   ########################################
>   #
>   # Common rpc domain local policy
> @@ -279,6 +287,17 @@ optional_policy(`
>   
>   ########################################
>   #
> +# BLKMAPD local policy
> +#
> +
> +allow blkmapd_t self:capability sys_rawio;
> +allow blkmapd_t self:unix_dgram_socket create_socket_perms;
> +
> +fs_list_rpc(blkmapd_t)
> +storage_raw_read_fixed_disk(blkmapd_t)
> +
> +########################################
> +#
>   # GSSD local policy
>   #

Merged.

-- 
Chris PeBenito

      reply	other threads:[~2021-02-16 14:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-14  3:58 [PATCH] blkmapd Russell Coker
2021-02-16 14:30 ` Chris PeBenito [this message]

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=70306b7d-7292-0fab-fcbe-93d033493791@ieee.org \
    --to=pebenito@ieee.org \
    --cc=russell@coker.com.au \
    --cc=selinux-refpolicy@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).