From: sven.vermeulen@siphos.be (Sven Vermeulen) Date: Mon, 2 Jul 2012 22:19:52 +0200 Subject: [refpolicy] [PATCH v2 2/6] Allow init scripts to handle sysctls In-Reply-To: <4FF1B48F.4060909@tresys.com> References: <1340911046-30441-1-git-send-email-sven.vermeulen@siphos.be> <1340911046-30441-3-git-send-email-sven.vermeulen@siphos.be> <4FF1B48F.4060909@tresys.com> Message-ID: <20120702201951.GA19551@siphos.be> To: refpolicy@oss.tresys.com List-Id: refpolicy.oss.tresys.com On Mon, Jul 02, 2012 at 10:47:43AM -0400, Christopher J. PeBenito wrote: > > allow initrc_t self:process { getpgid setsched setpgid setrlimit getsched }; > > -allow initrc_t self:capability ~{ sys_admin sys_module }; > > +allow initrc_t self:capability ~{ sys_module }; > > dontaudit initrc_t self:capability sys_module; # sysctl is triggering this > > allow initrc_t self:passwd rootok; > > allow initrc_t self:key manage_key_perms; > > We typically try to separate out the sys_admin privileges since its so broad. Can a new domain be created? Its the init script calling the sysctl binary. We currently don't hold a separate domain for sysctl, but that's certainly doable. I guess it would start with allowing both initrc_t and sysadm_t to transition to sysctl_t. But for some reason I think this has been thought of before - sysctl's are well known throughout the policy (with specific labels for kernel sysctl's and such). Was a new domain for sysctl's not done because there was little need for, or am I missing something? Wkr, Sven Vermeulen