From: cpebenito@tresys.com (Christopher J. PeBenito) Date: Wed, 15 Dec 2010 15:01:34 -0500 Subject: [refpolicy] [PATCH 1/2] Allow Gentoo rc-update to manage runlevels In-Reply-To: <1290934018-9306-1-git-send-email-gizmo@giz-works.com> References: <1290934018-9306-1-git-send-email-gizmo@giz-works.com> Message-ID: <4D091E9E.4000901@tresys.com> To: refpolicy@oss.tresys.com List-Id: refpolicy.oss.tresys.com On 11/28/10 03:46, Chris Richards wrote: > rc-update cannot properly update the system runlevels, even when run > as the root user in sysadm role. > > Signed-off-by: Chris Richards > --- > policy/modules/system/init.if | 19 +++++++++++++++++++ > 1 files changed, 19 insertions(+), 0 deletions(-) > > diff --git a/policy/modules/system/init.if b/policy/modules/system/init.if > index df3fa64..b1ef45f 100644 > --- a/policy/modules/system/init.if > +++ b/policy/modules/system/init.if > @@ -1441,6 +1441,25 @@ interface(`init_dontaudit_use_script_ptys',` > > ######################################## > ## > +## Manage init runlevel files. > +## > +## > +## > +## Domain allowed access. > +## > +## > +# > +interface(`init_manage_runlevel_files',` Needs a name similar to the other initrc_state_t interfaces. > + gen_require(` > + type initrc_state_t; > + ') > + > + read_lnk_files_pattern($1, initrc_state_t, initrc_state_t) > + files_manage_etc_symlinks($1) > +') > + > +######################################## > +## > ## Get the attributes of init script > ## status files. > ## -- Chris PeBenito Tresys Technology, LLC www.tresys.com | oss.tresys.com