All of lore.kernel.org
 help / color / mirror / Atom feed
From: cpebenito@tresys.com (Christopher J. PeBenito)
To: refpolicy@oss.tresys.com
Subject: [refpolicy] RFC: direct_init_entry breaks direct_initrc
Date: Tue, 14 Jan 2014 15:44:07 -0500	[thread overview]
Message-ID: <52D5A197.8010805@tresys.com> (raw)
In-Reply-To: <1389724229.28251.74.camel@x220.localdomain>

On 01/14/14 13:30, Dominick Grift wrote:
> On Tue, 2014-01-14 at 09:10 -0500, Christopher J. PeBenito wrote:
>> On Tue Jan 14 09:02:08 2014, Dominick Grift wrote:
>>> On Tue, 2014-01-14 at 08:56 -0500, Christopher J. PeBenito wrote:
>>>> On 12/10/13 10:57, Dominick Grift wrote:
>>>>> I have not tested this yet and it is a theory
>>>>>
>>>>> I was not there when that type attribute was implemented so i do not
>>>>> know the rationale behind the decision to implement it.
>>>>>
>>>>> Would be nice if anyone could shed some light on that and would be even
>>>>> better if this fix is acknowledged
>>>>
>>>> It seems like it would probably work, but definitely needs to be tested.
>>>>
>>>
>>> I have tested it. role transitions should happen on the init script and
>>> now on the daemon entry file. This is a bug in the init_run_daemon
>>> interface and it breaks a lot of stuff
>>>
>>> Also the init_run_daemon(unconfined_t, unconfined_r) should be make
>>> tunable (direct_sysadm_daemon)
>>
>> Would you send patches for these?  The first patch I only see as 
>> inlined comments in the body of the first message.
> 
> Unfortunately i found some other issue during rebasing.
> 
> Not only do callers of init_run_daemon() role transition on daemon
> executable files instead of init scripts. They turn out to be also
> domain transitioning on executable files instead of init scripts.
> 
> (so sysadm_t seems to actually run init scripts in the sysadm_t domain
> (with direct_initrc=y) (unless i overlooked something)
> 
> My previous patches do work and fix many issues but it is not the fix i
> was hoping for (i guess i had not tested it enough after all)
> 
> Enclosed you will find the rebased patch , and although it builds i have
> not been able to test it yet. I need to test this on debian because
> Fedora has diverged a lot from refpolicy, is using systemd. I can't test
> it on rhel either since that also diverged a lot from refpolicy and
> refpolicy probably does not install on el6 due to old user space (does
> not support named file transition for one)
> 
> I am planning to test this on debian, but for now i just post the patch
> for review/comments.

I think you may be able to drop the direct_run_init attribute and put the domtrans you added in the init_run_daemon() interface instead.

-- 
Chris PeBenito
Tresys Technology, LLC
www.tresys.com | oss.tresys.com

  reply	other threads:[~2014-01-14 20:44 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-10 15:57 [refpolicy] RFC: direct_init_entry breaks direct_initrc 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 [this message]
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
  -- strict thread matches above, loose matches on Subject: below --
2013-12-11  8:33 Sven Vermeulen
2013-12-11  8:56 ` Dominick Grift
2013-12-11  9:52   ` Sven Vermeulen
2013-12-11 10:31     ` 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=52D5A197.8010805@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.