All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Carter <jwcart2@tycho.nsa.gov>
To: Miroslav Grepl <mgrepl@redhat.com>, selinux@tycho.nsa.gov
Subject: Re: type inheritance in CIL
Date: Mon, 29 Jun 2015 14:56:34 -0400	[thread overview]
Message-ID: <559194E2.20501@tycho.nsa.gov> (raw)
In-Reply-To: <559129C1.4010201@redhat.com>

On 06/29/2015 07:19 AM, Miroslav Grepl wrote:
> On 06/29/2015 09:56 AM, Dominick Grift wrote:
>> On Mon, Jun 29, 2015 at 09:29:34AM +0200, Miroslav Grepl wrote:
>>> Trying to make sandbox working using CIL but I see it does not
>>> support typeinherit statement.
>>
>> One of those features that really define CIL but that is currently
>> not available or fully working yet.
>>

Inheritance in CIL is handled with blocks.

The following policy:

(block b1
   (type t)
   (allow t self (CLASS (PERM)))
)

(block b2
   (blockinherit b1))

Would result in two types (b1.t and b2.t) and two rules.

See block_test.cil and name_resolution_test.cil in secilc/test/ for more 
examples. Everything should work, but, of course, it has seen less testing at 
this point.

Jim

>> My suggestion is to study the "cilpolicy" (which is really just a
>> snapshot of reference policy transformed to cil with hll i
>> believe)
>>
>> This will give you some pointers as to how to create an alternative
>> implementation that achieves a similar result.
>>
>> When you write CIL policy, there are some "bugs" to take into
>> account and to workaround.
>>
>
> Sure there are different ways how to write it. I just wanted to
> combine it with the current Fedora policy as much as possible without
> re-writing the current Fedora policy.
>
>>>
>>> -- Miroslav Grepl Senior Software Engineer, SELinux Solutions Red
>>> Hat, Inc. _______________________________________________ Selinux
>>> mailing list Selinux@tycho.nsa.gov To unsubscribe, send email to
>>> Selinux-leave@tycho.nsa.gov. To get help, send an email
>>> containing "help" to Selinux-request@tycho.nsa.gov.
>>
>>
>>
>> _______________________________________________ Selinux mailing
>> list Selinux@tycho.nsa.gov To unsubscribe, send email to
>> Selinux-leave@tycho.nsa.gov. To get help, send an email containing
>> "help" to Selinux-request@tycho.nsa.gov.
>>
>
>


-- 
James Carter <jwcart2@tycho.nsa.gov>
National Security Agency

  reply	other threads:[~2015-06-29 18:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-29  7:29 type inheritance in CIL Miroslav Grepl
2015-06-29  7:56 ` Dominick Grift
2015-06-29 11:19   ` Miroslav Grepl
2015-06-29 18:56     ` James Carter [this message]
2015-06-29 19:25       ` Dominick Grift
2015-06-29 20:22         ` James Carter
2015-06-30  8:37         ` Miroslav Grepl
2015-06-30 14:48           ` James Carter

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=559194E2.20501@tycho.nsa.gov \
    --to=jwcart2@tycho.nsa.gov \
    --cc=mgrepl@redhat.com \
    --cc=selinux@tycho.nsa.gov \
    /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.