selinux-refpolicy.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [refpolicy] [PATCH 1/1] fstools: label e2mmpstatus as fsadm_exec_t
@ 2018-08-03 19:27 Nicolas Iooss
  2018-08-04 14:51 ` Chris PeBenito
  0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Iooss @ 2018-08-03 19:27 UTC (permalink / raw)
  To: refpolicy

e2fsprogs 1.44.3 installs e2mmpstatus as a hard link to dumpe2fs. This
makes "restorecon -Rv /usr/bin" relabels this file with conflicting
contexts:

Relabeled /usr/bin/e2mmpstatus from system_u:object_r:fsadm_exec_t to system_u:object_r:bin_t
Relabeled /usr/bin/dumpe2fs from system_u:object_r:bin_t to system_u:object_r:fsadm_exec_t

Fix this by labelling e2mmpstatus like dumpe2fs.

Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
---
 policy/modules/system/fstools.fc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/policy/modules/system/fstools.fc b/policy/modules/system/fstools.fc
index d4219a18ff17..8fbd5ce440d6 100644
--- a/policy/modules/system/fstools.fc
+++ b/policy/modules/system/fstools.fc
@@ -11,6 +11,7 @@
 /usr/bin/e2fsck			--	gen_context(system_u:object_r:fsadm_exec_t,s0)
 /usr/bin/e4fsck			--	gen_context(system_u:object_r:fsadm_exec_t,s0)
 /usr/bin/e2label		--	gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/e2mmpstatus		--	gen_context(system_u:object_r:fsadm_exec_t,s0)
 /usr/bin/efibootmgr		--	gen_context(system_u:object_r:fsadm_exec_t,s0)
 /usr/bin/fatsort		--	gen_context(system_u:object_r:fsadm_exec_t,s0)
 /usr/bin/fdisk			--	gen_context(system_u:object_r:fsadm_exec_t,s0)
@@ -67,6 +68,7 @@
 /usr/sbin/e2fsck		--	gen_context(system_u:object_r:fsadm_exec_t,s0)
 /usr/sbin/e4fsck		--	gen_context(system_u:object_r:fsadm_exec_t,s0)
 /usr/sbin/e2label		--	gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/sbin/e2mmpstatus		--	gen_context(system_u:object_r:fsadm_exec_t,s0)
 /usr/sbin/efibootmgr		--	gen_context(system_u:object_r:fsadm_exec_t,s0)
 /usr/sbin/fatsort		--	gen_context(system_u:object_r:fsadm_exec_t,s0)
 /usr/sbin/fdisk			--	gen_context(system_u:object_r:fsadm_exec_t,s0)
-- 
2.18.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [refpolicy] [PATCH 1/1] fstools: label e2mmpstatus as fsadm_exec_t
  2018-08-03 19:27 [refpolicy] [PATCH 1/1] fstools: label e2mmpstatus as fsadm_exec_t Nicolas Iooss
@ 2018-08-04 14:51 ` Chris PeBenito
  0 siblings, 0 replies; 2+ messages in thread
From: Chris PeBenito @ 2018-08-04 14:51 UTC (permalink / raw)
  To: refpolicy

On 08/03/2018 03:27 PM, Nicolas Iooss via refpolicy wrote:
> e2fsprogs 1.44.3 installs e2mmpstatus as a hard link to dumpe2fs. This
> makes "restorecon -Rv /usr/bin" relabels this file with conflicting
> contexts:
> 
> Relabeled /usr/bin/e2mmpstatus from system_u:object_r:fsadm_exec_t to system_u:object_r:bin_t
> Relabeled /usr/bin/dumpe2fs from system_u:object_r:bin_t to system_u:object_r:fsadm_exec_t
> 
> Fix this by labelling e2mmpstatus like dumpe2fs.
> 
> Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
> ---
>   policy/modules/system/fstools.fc | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/policy/modules/system/fstools.fc b/policy/modules/system/fstools.fc
> index d4219a18ff17..8fbd5ce440d6 100644
> --- a/policy/modules/system/fstools.fc
> +++ b/policy/modules/system/fstools.fc
> @@ -11,6 +11,7 @@
>   /usr/bin/e2fsck			--	gen_context(system_u:object_r:fsadm_exec_t,s0)
>   /usr/bin/e4fsck			--	gen_context(system_u:object_r:fsadm_exec_t,s0)
>   /usr/bin/e2label		--	gen_context(system_u:object_r:fsadm_exec_t,s0)
> +/usr/bin/e2mmpstatus		--	gen_context(system_u:object_r:fsadm_exec_t,s0)
>   /usr/bin/efibootmgr		--	gen_context(system_u:object_r:fsadm_exec_t,s0)
>   /usr/bin/fatsort		--	gen_context(system_u:object_r:fsadm_exec_t,s0)
>   /usr/bin/fdisk			--	gen_context(system_u:object_r:fsadm_exec_t,s0)
> @@ -67,6 +68,7 @@
>   /usr/sbin/e2fsck		--	gen_context(system_u:object_r:fsadm_exec_t,s0)
>   /usr/sbin/e4fsck		--	gen_context(system_u:object_r:fsadm_exec_t,s0)
>   /usr/sbin/e2label		--	gen_context(system_u:object_r:fsadm_exec_t,s0)
> +/usr/sbin/e2mmpstatus		--	gen_context(system_u:object_r:fsadm_exec_t,s0)
>   /usr/sbin/efibootmgr		--	gen_context(system_u:object_r:fsadm_exec_t,s0)
>   /usr/sbin/fatsort		--	gen_context(system_u:object_r:fsadm_exec_t,s0)
>   /usr/sbin/fdisk			--	gen_context(system_u:object_r:fsadm_exec_t,s0)

Merged.

-- 
Chris PeBenito

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-08-04 14:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-03 19:27 [refpolicy] [PATCH 1/1] fstools: label e2mmpstatus as fsadm_exec_t Nicolas Iooss
2018-08-04 14:51 ` Chris PeBenito

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 NNTP newsgroup(s).