2010-12-20 22:28:40

by gizmo

[permalink] [raw]
Subject: [refpolicy] [PATCH 2/2] Allow Gentoo rc-update to manage runlevels, try 2

From: Chris Richards <[email protected]>

rc-update cannot properly update the system runlevels, even when run
as the root user in sysadm role.

Signed-off-by: Chris Richards <[email protected]>
---
policy/modules/system/selinuxutil.te | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/policy/modules/system/selinuxutil.te b/policy/modules/system/selinuxutil.te
index ff5d72d..9a71b6e 100644
--- a/policy/modules/system/selinuxutil.te
+++ b/policy/modules/system/selinuxutil.te
@@ -405,6 +405,10 @@ ifndef(`direct_sysadm_daemon',`
')
')

+ifdef(`distro_gentoo',`
+ init_manage_script_runlevel_files(run_init_t)
+')
+
ifdef(`distro_ubuntu',`
optional_policy(`
unconfined_domain(run_init_t)
--
1.7.3.2


2011-01-05 15:29:25

by cpebenito

[permalink] [raw]
Subject: [refpolicy] [PATCH 2/2] Allow Gentoo rc-update to manage runlevels, try 2

On 12/20/10 17:28, gizmo at giz-works.com wrote:
> From: Chris Richards <[email protected]>
>
> rc-update cannot properly update the system runlevels, even when run
> as the root user in sysadm role.

rc-update should not be running in run_init_t.

> Signed-off-by: Chris Richards <[email protected]>
> ---
> policy/modules/system/selinuxutil.te | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/policy/modules/system/selinuxutil.te b/policy/modules/system/selinuxutil.te
> index ff5d72d..9a71b6e 100644
> --- a/policy/modules/system/selinuxutil.te
> +++ b/policy/modules/system/selinuxutil.te
> @@ -405,6 +405,10 @@ ifndef(`direct_sysadm_daemon',`
> ')
> ')
>
> +ifdef(`distro_gentoo',`
> + init_manage_script_runlevel_files(run_init_t)
> +')
> +
> ifdef(`distro_ubuntu',`
> optional_policy(`
> unconfined_domain(run_init_t)


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