From: Joshua Brindle <method@gentoo.org>
To: Karl MacMillan <kmacmillan@tresys.com>
Cc: Jeremy Katz <katzj@redhat.com>,
Daniel J Walsh <dwalsh@redhat.com>,
Stephen Smalley <sds@tycho.nsa.gov>,
SE Linux <selinux@tycho.nsa.gov>,
Paul Nasrat <pnasrat@redhat.com>,
James Antill <jantill@redhat.com>
Subject: Re: We are attempting once again to split policy out into individual RPMS.
Date: Wed, 03 May 2006 17:14:50 -0400 [thread overview]
Message-ID: <44591D4A.10005@gentoo.org> (raw)
In-Reply-To: <1146683243.2766.42.camel@localhost.localdomain>
Karl MacMillan wrote:
> On Wed, 2006-05-03 at 15:02 -0400, Joshua Brindle wrote:
>
>> Karl MacMillan wrote:
>>
>>>>> The comparison to uid/gid is bogus, uid/gid are unambiguous, file
>>>>> contexts are ordered by specificity because multiple regexes can match
>>>>> any given filename. The file_contexts *must* be combined and ordered
>>>>> prior to labeling, and if multiple policy packages are being installed
>>>>> within a set those must all be included as well. matchpathcon does not
>>>>> currently have the sorting mechanism that libsemanage does to properly
>>>>> combine policy package file contexts.
>>>>>
>>>>>
>>>> By moving the policy to being maintained by the package maintainer, it's
>>>> moving towards having the file context be unambiguous as well.
>>>> Otherwise, the packager really has no control.
>>>>
>>>>
>>>>
>>> Both of these seem like positive changes, particularly having the
>>> package maintainers take responsibility for the SELinux policy
>>> associated with their package.
>>>
>>> Also, how ambiguous are the application file contexts now anyway? Josh,
>>> you are claiming that the labeling requires all of the file contexts to
>>> be combined, but for most applications that come with policy the file
>>> contexts are already a) specific and b) cover the majority of the files
>>> provided by that application. The more general file contexts are most
>>> useful for applications without policy.
>>>
>>>
>> Having unambiguous contexts for every package would not be scalable.
>> Most apps have some sort of fallback now (eg., mysql installs libraries
>> but doesn't label them, and shouldn't, the base library labeling should
>> take care of them). I imagine there are very few packages that have
>> entirely self contained file contexts files. Anything that installs
>> libraries, man pages, info pages, binaries without unique labels
>> (mysqladmin doesn't need its own label, only the daemon binary), etc.
>>
>> Not only does adding specific entries for every file in every package
>> not scale but it breaks encapsulation (why should a policy need to know
>> that /bin is bin_t, we intentionally abstracted that away in policy, why
>> regress in file contexts).
>>
>>
>
> Sure, but the common case is that the application specific file contexts
> can be combined with only the base policy file contexts to create the
> full labeling policy for that application.
>
This doesn't work every time though. For example, if you are installing
sendmail and thus installing the mta and sendmail policies the sendmail
binary _will not_ get labeled correctly just by looking at the sendmail
policy and the base policy. The sendmail binary is labeled via mta.fc. I
expect mutually dependent modules like this to increase over time, not
go away.
I still haven't heard why it is a problem to explicitly combine policy
packages within the same rpm transaction (since you are trying to
minimize transaction size) and do a rebuild/commit after that (and
before installing the apps). This seems pretty clear to me to be the
best solution but noone seems to be considering it at all.
And noone has addressed the fact that libselinux does not sort the
file_contexts the same way that libsemanage does when it writes it. This
leads to matchpathcon(foo.pp) producing different results than would be
produced if foo.pp were installed and matchpathcon() run.
I am baffled why the advocates of this believe making kernel tolerant of
inconsistent filesystem labels and allowing strange policy interactions
for the sake of bandaiding an inadequacy in RPM is better.. .*shrug*
--
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:[~2006-05-03 21:14 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-02 14:24 We are attempting once again to split policy out into individual RPMS Daniel J Walsh
2006-05-02 15:01 ` Joshua Brindle
2006-05-02 15:16 ` Jeremy Katz
2006-05-02 15:33 ` Joshua Brindle
2006-05-02 15:48 ` Jeremy Katz
2006-05-03 15:15 ` Karl MacMillan
2006-05-03 19:02 ` Joshua Brindle
2006-05-03 19:06 ` Jeremy Katz
2006-05-03 19:07 ` Karl MacMillan
2006-05-03 21:14 ` Joshua Brindle [this message]
2006-05-04 9:01 ` Thomas Bleher
2006-05-04 19:18 ` Thomas Bleher
2006-05-02 15:12 ` Stephen Smalley
2006-05-02 15:27 ` Jeremy Katz
2006-05-02 16:26 ` Stephen Smalley
2006-05-02 16:29 ` Paul Nasrat
2006-05-02 16:53 ` Stephen Smalley
2006-05-02 17:42 ` Stephen Smalley
2006-05-02 17:53 ` Jeremy Katz
2006-05-03 15:08 ` Karl MacMillan
2006-05-03 15:33 ` Daniel J Walsh
2006-05-03 15:41 ` Karl MacMillan
2006-05-02 15:27 ` Paul Nasrat
2006-05-02 16:13 ` Richard Hally
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=44591D4A.10005@gentoo.org \
--to=method@gentoo.org \
--cc=dwalsh@redhat.com \
--cc=jantill@redhat.com \
--cc=katzj@redhat.com \
--cc=kmacmillan@tresys.com \
--cc=pnasrat@redhat.com \
--cc=sds@tycho.nsa.gov \
--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.