All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Svoboda <michal.svoboda@agents.felk.cvut.cz>
To: selinux@tycho.nsa.gov
Subject: Re: MCS and default labels
Date: Tue, 15 Sep 2009 08:32:42 +0200	[thread overview]
Message-ID: <20090915063242.GM24297@myhost.felk.cvut.cz> (raw)
In-Reply-To: <1252930803.13634.1002.camel@moss-pluto.epoch.ncsc.mil>

[-- Attachment #1: Type: text/plain, Size: 1527 bytes --]

Stephen Smalley wrote:
> I don't think so - the problem with selinuxfs tunables is that they
> can't be changed atomically with a policy change, and this is a property
> that should be tied to a particular policy.  For the same reason,
> properties like handle_unknown and permissive domains are defined in the
> policy itself rather than being selinuxfs tunables.

There have been things like compat_net, why can't the inheritance be
done on the same basis and must be part of the policy instead?

Anyway, I've been looking at the policy loader code, and it seems that
the easiest way to incorporate this into the policy would be to blend it
with the config field (which is presently used for MLS and
handle_unknown flags), perhaps by defining a flag like CATEGORY_INHERIT
and to check for it right after ALLOW_UNKNOWN and REJECT_UNKNOWN are
processed. This flag would then go to struct policydb and would be
checked for in the mls_compute_sid function (I can see direct usage of
the policydb global variable in that very function, so I guess it
shouldn't be a problem).

Perhaps there could also be an upgrade of the policy version number and
a check for the policy being loaded just to prevent random values being
present in that bit.

There would also need to be a change in libsepol and checkpolicy to
reflect this; perhaps checkpolicy could accept an additional command
line argument (as it does with handle_unknown), and a new field defined
in libsepol's policydb_t and further processed in its write.c.

Michal Svoboda

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

  parent reply	other threads:[~2009-09-15  6:32 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-08  5:58 MCS and default labels Michal Svoboda
2009-09-08 15:35 ` Stephen Smalley
2009-09-08 16:36   ` Michal Svoboda
2009-09-08 17:10     ` Stephen Smalley
2009-09-09 10:06       ` Michal Svoboda
2009-09-09 12:17         ` Stephen Smalley
2009-09-09 13:19           ` Michal Svoboda
2009-09-09 13:34             ` Stephen Smalley
2009-09-09 13:59               ` Michal Svoboda
2009-09-09 14:34                 ` Stephen Smalley
2009-09-14  8:19           ` Michal Svoboda
2009-09-14 12:20             ` Stephen Smalley
2009-09-14 13:00               ` Stephen Smalley
2009-09-15  6:32               ` Michal Svoboda [this message]
2009-09-15 11:16                 ` Stephen Smalley
2009-09-27  7:34           ` Russell Coker
2009-09-28 13:37             ` Stephen Smalley
2009-09-28 20:57               ` Russell Coker
2009-09-28 23:22               ` Kyle Moffett
2009-09-29 12:21                 ` Stephen Smalley
2009-09-29 13:54                   ` Kyle Moffett
2009-09-29 20:54                     ` Paul Moore
2009-09-30  3:51                       ` Kyle Moffett
2009-09-30 13:19                         ` Paul Moore
2009-09-30 13:49                           ` Kyle Moffett
2009-09-30 14:20                             ` Paul Moore

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=20090915063242.GM24297@myhost.felk.cvut.cz \
    --to=michal.svoboda@agents.felk.cvut.cz \
    --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.