Implement plymouth policy.
PATCH 1/1 Implement plymouth policy.
I noticed that Fedoras' patch for plymouth was not adopted yet, and since i want to merge it to my custom policy i decided to make some modifications to it in the process.
On the off chance that this patch improves chances of it to get adopted i submit it. Be aware that some modifications i made are purely guess work (it does build though).
When i run refpolicy without the unconfined domain on a Fedora 13 system though, i get many AVC denials for kernel_t where it is executing plymouth commands somewhere really early in the boot process. I wonder
how Fedora got that to work in say policy-MLS.
---
:100644 100644 0352a19... cc054b5... M policy/modules/kernel/kernel.if
:100644 100644 2aa3808... ef8f249... M policy/modules/services/hal.if
:000000 100644 0000000... 0138640... A policy/modules/services/plymouth.fc
:000000 100644 0000000... d65c7c2... A policy/modules/services/plymouth.if
:000000 100644 0000000... 5391e59... A policy/modules/services/plymouth.te
:100644 100644 8dc6d81... 71643bc... M policy/modules/services/xserver.te
:100644 100644 362614c... 5daaf88... M policy/modules/system/logging.fc
policy/modules/kernel/kernel.if | 19 ++ policy/modules/services/hal.if | 2 +- policy/modules/services/plymouth.fc | 9 + policy/modules/services/plymouth.if | 339 +++++++++++++++++++++++++++++++++++ policy/modules/services/plymouth.te | 103 +++++++++++ policy/modules/services/xserver.te | 5 + policy/modules/system/logging.fc | 1 + 7 files changed, 477 insertions(+), 1 deletions(-)
policy/modules/kernel/kernel.if +19 -0
@@ -2807,3 +2807,22 @@ interface(`kernel_unconfined',` typeattribute $1 kern_unconfined; ') + +######################################## +## <summary> +## Connect to the kernel on a unix +## stream socket. +## </summary> +## <param name="domain"> +## <summary> +## Domain allowed access. +## </summary> +## </param> +# +interface(`kernel_stream_connect',` + gen_require(` + type kernel_t; + ') + + allow $1 kernel_t:unix_stream_socket connectto; +')
policy/modules/services/hal.if +1 -1
@@ -115,7 +115,7 @@ interface(`hal_dontaudit_use_fds',` ## </summary> ## <param name="domain"> ## <summary> -## Domain to not audit. +## Domain allowed access. ## </summary> ## </param> #
policy/modules/services/plymouth.fc new file +9 -0
@@ -0,0 +1,9 @@ +/bin/plymouth -- gen_context(system_u:object_r:plymouth_exec_t, s0) + +/sbin/plymouthd -- gen_context(system_u:object_r:plymouthd_exec_t, s0) + +/var/lib/plymouth(/.*)? gen_context(system_u:object_r:plymouthd_var_lib_t, s0) + +/var/run/plymouth(/.*)? gen_context(system_u:object_r:plymouthd_var_run_t, s0) + +/var/spool/plymouth(/.*)? gen_context(system_u:object_r:plymouthd_spool_t, s0)
policy/modules/services/plymouth.if new file +339 -0
339 lines not on this page · raw message
policy/modules/services/plymouth.te new file +103 -0
103 lines not on this page · raw message
policy/modules/services/xserver.te +5 -0
@@ -543,6 +543,11 @@ optional_policy(` ') optional_policy(` + plymouthd_exec_plymouth(xdm_t) + plymouthd_search_spool(xdm_t) +') + +optional_policy(` resmgr_stream_connect(xdm_t) ')
policy/modules/system/logging.fc +1 -0
@@ -65,6 +65,7 @@ ifdef(`distro_redhat',` /var/spool/bacula/log(/.*)? gen_context(system_u:object_r:var_log_t,s0) /var/spool/postfix/pid -d gen_context(system_u:object_r:var_run_t,s0) +# Is this still required? /var/spool/plymouth/boot.log gen_context(system_u:object_r:var_log_t,s0) /var/spool/rsyslog(/.*)? gen_context(system_u:object_r:var_log_t,s0)
Signature · 9 lines
1.7.0.1 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: not available Url : http://oss.tresys.com/pipermail/refpolicy/attachments/20100321/34180cb4/attachment.bin