From: cpebenito@tresys.com (Christopher J. PeBenito)
To: refpolicy@oss.tresys.com
Subject: [refpolicy] [PATCH] selinuxutil: semanage create, rmdir, rename directories tmp, active, previous in /etc/selinux/default/modules/ when i use semanage fcontext -a ...
Date: Fri, 27 Sep 2013 16:23:41 -0400 [thread overview]
Message-ID: <5245E94D.401@tresys.com> (raw)
In-Reply-To: <1380312364.23967.2.camel@d30>
On Fri 27 Sep 2013 04:06:04 PM EDT, Dominick Grift wrote:
> On Fri, 2013-09-27 at 16:00 -0400, Christopher J. PeBenito wrote:
>> On Fri 27 Sep 2013 05:26:55 AM EDT, Dominick Grift wrote:
>>>
>>> Signed-off-by: Dominick Grift <dominick.grift@gmail.com>
>>> diff --git a/policy/modules/system/selinuxutil.te b/policy/modules/system/selinuxutil.te
>>> index ec01d0b..246fa97 100644
>>> --- a/policy/modules/system/selinuxutil.te
>>> +++ b/policy/modules/system/selinuxutil.te
>>> @@ -492,6 +492,7 @@
>>> seutil_libselinux_linked(semanage_t)
>>> seutil_manage_file_contexts(semanage_t)
>>> seutil_manage_config(semanage_t)
>>> +seutil_manage_config_dirs(semanage_t)
>>> seutil_run_setfiles(semanage_t, semanage_roles)
>>> seutil_run_loadpolicy(semanage_t, semanage_roles)
>>> seutil_manage_bin_policy(semanage_t)
>>
>> Sounds like mislabeled files. Everything under /etc/selinux/*/modules
>> should be semanage_store_t.
>
> Not really its create a tmp dir under /etc/selinux/default/modules
> (inheriting the type of the parent) then it renames, and removes that
> dir.
>
> You want me to tell selinux that semanage_t creates that tmp dir with a
> type transition from selinux_config_t to semanage_store_t?
That seems like a better choice. Alternatively we can look at making
the fc change to:
/etc/selinux/([^/]*/)?modules(/.*)?
gen_context(system_u:object_r:semanage_store_t,s0)
but that may have a broader impact.
--
Chris PeBenito
Tresys Technology, LLC
www.tresys.com | oss.tresys.com
next prev parent reply other threads:[~2013-09-27 20:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-27 9:26 [refpolicy] [PATCH] selinuxutil: semanage create, rmdir, rename directories tmp, active, previous in /etc/selinux/default/modules/ when i use semanage fcontext -a Dominick Grift
2013-09-27 20:00 ` Christopher J. PeBenito
2013-09-27 20:06 ` Dominick Grift
2013-09-27 20:23 ` Christopher J. PeBenito [this message]
2013-09-27 20:25 ` Dominick Grift
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5245E94D.401@tresys.com \
--to=cpebenito@tresys.com \
--cc=refpolicy@oss.tresys.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.