From: Stephen Smalley <sds@tycho.nsa.gov>
To: David Windsor <dwindsor@gmail.com>
Cc: Daniel J Walsh <dwalsh@redhat.com>, SELinux <selinux@tycho.nsa.gov>
Subject: Re: I would like to change the behavior of MCS label creations in directory.
Date: Tue, 27 Sep 2011 12:51:58 -0400 [thread overview]
Message-ID: <1317142318.22218.10.camel@moss-pluto> (raw)
In-Reply-To: <CAEXv5_g+ookJ-TTWBXevNGSObQ2SUc-T3Bc9Tbz=6z070GiNEw@mail.gmail.com>
On Tue, 2011-09-27 at 12:50 -0400, David Windsor wrote:
> On Tue, Sep 27, 2011 at 12:06 PM, Stephen Smalley <sds@tycho.nsa.gov> wrote:
> > On Sat, 2011-09-24 at 18:05 -0400, David Windsor wrote:
> >> On Fri, Sep 23, 2011 at 11:07 AM, Stephen Smalley <sds@tycho.nsa.gov> wrote:
> >>
> >> <snip>
> >>
> >> >>
> >> >> level_default file fromsource; == MLS;
> >> >> level_default file fromtarget; == MCS;
> >> >>
> >> >> Anyone want to step forward and implement? :^)
> >> >
> >> > Need to distinguish low vs high. In MLS, you want to inherit the low
> >> > level of the source/subject/process.
> >> >
> >> > Also, do you want the MCS behavior for all types or selectively? For
> >> > example, if a svirt_t:s0:c256,c387 process creates a file in a :s0
> >> > directory (is that even possible?), do you really want that file to
> >> > be :s0?
> >> >
> >>
> >> Couldn't you use a range_transition in this case to specify an
> >> exception to the default behavior for category inheritance?
> >>
> >> AFAICS, using rules such as (user|role|type|level|range)_default,
> >> we're only specifying default labeling behaviors for the different
> >> fields of a context. More specific *_transition rules can exist in
> >> policy that should override any defaults defined elsewhere.
> >
> > range_transition would only let you specify things like "When files are
> > created by a process with domain D in a directory with type T, the range
> > should be set to R.". Not rules of the form "Files created by processes
> > in domain D1 should inherit their level from their creator while files
> > created by processes in domain D2 should inherit their level from the
> > parent directory."
> >
> > --
> > Stephen Smalley
> > National Security Agency
> >
>
> I realize that the semantics of the two rules are different. I'm
> wondering about the precedence of *_default rules: given a policy in
> which conflicting labels are calculated for a newly created object of
> a certain type, do *_default rules take precedence?
>
> For instance, suppose the following rules:
>
> range_default D1_t file use_source;
> range_transition D1_t T_t:file R;
>
> The first rule specifies that newly created files by processes in the
> D1_t domain should inherit the range of the source/creating process.
> The second rule specifies that files created by a process in the D1_t
> domain in a directory labeled T_t should have a range of R. This
> seems to create a conflict for deciding the range of files created by
> processes labeled D1_t in a directory labeled T_t.
>
> What should happen here?
>
> I would think that the more specific range_transition rule, which
> specifies both the type of the creating process and the type of the
> parent directory, would dictate the labeling of the created file and
> that the range_default rule specifies labeling in the default case.
The *_default rules would just replace the current hardcoded default
logic. They would be overridden by any matching *_transition rules just
as the current hardcoded default logic is overridden by such rules.
--
Stephen Smalley
National Security Agency
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
next prev parent reply other threads:[~2011-09-27 16:51 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-22 19:53 I would like to change the behavior of MCS label creations in directory Daniel J Walsh
2011-09-22 20:13 ` Guido Trentalancia
2011-09-22 20:31 ` Stephen Smalley
2011-09-22 20:32 ` Daniel J Walsh
2011-09-22 20:37 ` Stephen Smalley
2011-09-22 20:42 ` Stephen Smalley
2011-09-23 15:01 ` Daniel J Walsh
2011-09-23 15:07 ` Stephen Smalley
2011-09-23 16:06 ` Guido Trentalancia
2011-09-23 17:33 ` Daniel J Walsh
2011-09-24 22:05 ` David Windsor
2011-09-27 16:06 ` Stephen Smalley
2011-09-27 16:50 ` David Windsor
2011-09-27 16:51 ` Stephen Smalley [this message]
2011-09-27 18:13 ` Daniel J Walsh
2011-10-14 15:57 ` Daniel J Walsh
2011-10-18 12:34 ` Christopher J. PeBenito
[not found] ` <00243337-937e-4e6b-880b-ba2f351112e7@email.android.com>
2011-10-18 22:07 ` David Windsor
2011-10-19 16:55 ` Stephen Smalley
2011-10-19 15:31 ` Joshua Brindle
2011-10-19 16:26 ` Stephen Smalley
2011-11-22 18:59 ` Eric Paris
2011-11-22 19:25 ` Stephen Smalley
2011-11-22 19:37 ` Eric Paris
2011-11-22 19:39 ` Stephen Smalley
2011-11-22 19:42 ` Eric Paris
2011-10-19 16:36 ` Kyle Moffett
2011-10-19 17:41 ` Daniel J Walsh
2011-10-19 17:47 ` Joshua Brindle
2011-10-19 17:50 ` Daniel J Walsh
2011-09-22 20:41 ` Guido Trentalancia
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=1317142318.22218.10.camel@moss-pluto \
--to=sds@tycho.nsa.gov \
--cc=dwalsh@redhat.com \
--cc=dwindsor@gmail.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.