From: sven.vermeulen@siphos.be (Sven Vermeulen)
To: refpolicy@oss.tresys.com
Subject: [refpolicy] RFC: direct_init_entry breaks direct_initrc
Date: Wed, 11 Dec 2013 09:33:40 +0100 [thread overview]
Message-ID: <20131211083339.GA5997@siphos.be> (raw)
On Tue, 2013-12-10 at 17:00 +0100, Dominick Grift wrote:
> On Tue, 2013-12-10 at 16:57 +0100, Dominick Grift wrote:
>
> > >
> > > typeattribute $1 direct_init;
> > - typeattribute $2 direct_init_entry;
>
> Here its actually associated with the init daemon entry file. That is
> wrong in my view. The role transition should happen on the init script
> not the daemon entry file
>
> > > - role_transition $2 direct_init_entry system_r;
> > > + role_transition $2 init_script_file_type system_r;
>
> Here is that actual role transition. This is causing problems with
> direct_initrc. role transition to system_r should happen on the init
> script and not the init daemon executable file
In Gentoo, we don't use the direct_* attributes so I can't tell you that
they do (or do not) cause problems.
hpl htdocs # seinfo -adirect_init -x
direct_init
hpl htdocs # seinfo -adirect_run_init -x
direct_run_init
hpl htdocs # seinfo -adirect_init_entry -x
direct_init_entry
What we do is we have the following set:
seutil_init_script_run_runinit(sysadm_t, sysadm_r)
. seutil_init_script_domtrans_runinit(sysadm_t)
. . init_script_file_domtrans(sysadm_t, run_init_t)
. . . domain_auto_trans(sysadm_t, initrc_exec_t, run_init_t)
This ensures that, if sysadm_t executes an initrc_exec_t script, the script
is launched in the run_init_t context. Then, our init system (OpenRC) calls
a shared library we provide (linked with libselinux) which sets the next
execution context to system_u:system_r:initrc_t (using setexeccon) and
re-executes the script.
Wkr,
Sven Vermeulen
next reply other threads:[~2013-12-11 8:33 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-11 8:33 Sven Vermeulen [this message]
2013-12-11 8:56 ` [refpolicy] RFC: direct_init_entry breaks direct_initrc Dominick Grift
2013-12-11 9:52 ` Sven Vermeulen
2013-12-11 10:31 ` Dominick Grift
-- strict thread matches above, loose matches on Subject: below --
2013-12-10 15:57 Dominick Grift
2013-12-10 16:00 ` Dominick Grift
2014-01-14 13:56 ` Christopher J. PeBenito
2014-01-14 14:02 ` Dominick Grift
2014-01-14 14:10 ` Christopher J. PeBenito
2014-01-14 14:48 ` Daniel J Walsh
2014-01-14 18:30 ` Dominick Grift
2014-01-14 20:44 ` Christopher J. PeBenito
2014-01-14 22:23 ` Dominick Grift
2014-01-15 13:01 ` Dominick Grift
2014-01-15 13:51 ` Christopher J. PeBenito
2014-01-15 15:44 ` Dominick Grift
2014-01-15 17:01 ` Daniel J Walsh
2014-01-16 21:12 ` Christopher J. PeBenito
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=20131211083339.GA5997@siphos.be \
--to=sven.vermeulen@siphos.be \
--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.