* init_daemon_domain vs init_spec_daemon_domain
@ 2018-11-07 23:14 Luis Ressel
2018-11-10 0:22 ` Chris PeBenito
0 siblings, 1 reply; 2+ messages in thread
From: Luis Ressel @ 2018-11-07 23:14 UTC (permalink / raw)
To: selinux-refpolicy
Hello *,
I've noticed the init_daemon_domain and init_spec_daemon_domain
interfaces contain quite a bit of duplicated code. As can be seen from
the patch I just [two weeks ago, but this mail unfortunately didn't go
out back then due to a problem on my end] posted, this has already
caused bugs.
Ideally, init_daemon_domain should just call init_spec_daemon_domain
and only add a typetransition statement on top of it. However, this is
currently not possible because those two interfaces differ in some
aspects:
* i_d_d grants the daemon nscd_use() permissions, while i_s_d_d
doesn't. This is most likely an oversight too.
* i_d_d permits transitions from initrc_t to the daemon domain, while
i_s_d_d permits transitions from init_t. This is thoroughly odd. My
expectation was that i_s_d_d would allow transitions from initrc_t
too, and as far as I understand the situation, transitions directly
from init_t do a daemon domain only happen with systemd.
* The ifdef(init_systemd) blocks of the two interfaces are very
different. Could someone familiar with the systemd policy please
comment on this?
* i_s_d_d obviously grants init_t (and initrc_t if that is added in the
future) self:process setexec permissions, while i_d_d doesn't. This
makes sense, of course, but if we can fix the three other differences
I already mentioned, I don't believe this difference alone should
block my proposed change.
Thanks,
Luis
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: init_daemon_domain vs init_spec_daemon_domain
2018-11-07 23:14 init_daemon_domain vs init_spec_daemon_domain Luis Ressel
@ 2018-11-10 0:22 ` Chris PeBenito
0 siblings, 0 replies; 2+ messages in thread
From: Chris PeBenito @ 2018-11-10 0:22 UTC (permalink / raw)
To: Luis Ressel, selinux-refpolicy
On 11/07/2018 06:14 PM, Luis Ressel wrote:
> Hello *,
>
> I've noticed the init_daemon_domain and init_spec_daemon_domain
> interfaces contain quite a bit of duplicated code. As can be seen from
> the patch I just [two weeks ago, but this mail unfortunately didn't go
> out back then due to a problem on my end] posted, this has already
> caused bugs.
>
> Ideally, init_daemon_domain should just call init_spec_daemon_domain
> and only add a typetransition statement on top of it. However, this is
I'm inclined to accept a patch that will make this so, regardless of the
below concerns, since there are no usages in refpolicy.
> currently not possible because those two interfaces differ in some
> aspects:
>
> * i_d_d grants the daemon nscd_use() permissions, while i_s_d_d
> doesn't. This is most likely an oversight too.
>
> * i_d_d permits transitions from initrc_t to the daemon domain, while
> i_s_d_d permits transitions from init_t. This is thoroughly odd. My
> expectation was that i_s_d_d would allow transitions from initrc_t
> too, and as far as I understand the situation, transitions directly
> from init_t do a daemon domain only happen with systemd.
>
> * The ifdef(init_systemd) blocks of the two interfaces are very
> different. Could someone familiar with the systemd policy please
> comment on this?
>
> * i_s_d_d obviously grants init_t (and initrc_t if that is added in the
> future) self:process setexec permissions, while i_d_d doesn't. This
> makes sense, of course, but if we can fix the three other differences
> I already mentioned, I don't believe this difference alone should
> block my proposed change.
>
> Thanks,
> Luis
>
--
Chris PeBenito
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-11-10 0:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-07 23:14 init_daemon_domain vs init_spec_daemon_domain Luis Ressel
2018-11-10 0:22 ` Chris PeBenito
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).