All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joshua Brindle <jbrindle@tresys.com>
To: sds@tycho.nsa.gov
Cc: Ivan Gyurdiev <ivg2@cornell.edu>,
	"Christopher J. PeBenito" <cpebenito@tresys.com>,
	Daniel J Walsh <dwalsh@redhat.com>,
	SE Linux <selinux@tycho.nsa.gov>
Subject: Re: The sort algorithm is broken by the second rule,  We	need	a	way to pin these rules to the top.
Date: Fri, 31 Mar 2006 14:18:53 -0500	[thread overview]
Message-ID: <442D809D.8050105@tresys.com> (raw)
In-Reply-To: <1143832535.17469.29.camel@moss-spartans.epoch.ncsc.mil>

Stephen Smalley wrote:
> On Fri, 2006-03-31 at 14:03 -0500, Ivan Gyurdiev wrote:
>>>   Sorting is presently only
>>> happening in the policy build process via the
>>> refpolicy/support/fc_sort.c helper program, so it is only applied to the
>>> file_context file provided by the policy itself, not to any local
>>> entries (whether created via semanage or not).
>>>   
>> My mistake, I thought sorting was moved into matchpathcon at some point...
>> In that case the patch I sent shouldn't be necessary.
> 
> Yes, Joshua had sent a patch to add the sorting logic to matchpathcon
> back in Oct '05, but I rejected it at the time because it needed to be
> coordinated with a policy update to ensure no actual change in
> filesystem labeling and because it sorted all of the file_contexts.*
> files together rather than retaining a prioritization among them.  And
> as we later agreed, it belongs in libsemanage at generation time rather
> than in libselinux.
> 
> Current libselinux matchpathcon logic only moves exact specifications
> (no regex in the pathname) to the end so that they are never overridden
> by a pathname regex; otherwise, it just uses the provided ordering
> within each file and it uses a fixed ordering among the files
> (file_contexts.local takes precedence over file_contexts.homedirs which
> takes precedence over file_contexts).
> 
> What is a little confusing right now is that there are potentially two
> "file_contexts.local" files; the one managed via semanage that only
> exists in the store and is merged to the end of the generated
> file_contexts file for installation and the one that can be manually
> created by the admin that is "merged" to the end of the in-memory table
> by matchpathcon.  I suppose we should consider the latter to be
> deprecated but libselinux will continue to look for it for legacy
> support.
> 

I think libsemanage should just put the .local file out for libselinux 
to read. There is no guarantee that none of the entries on .local won't 
be preceded by something in the normal file context if it is merged in 
libsemanage. This is the same thing we do for file_contexts.homedirs so 
why not do it with .local? (Also, if we merge .local into the normal fc 
file then the .local can't override .homedirs)

--
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.

  reply	other threads:[~2006-03-31 19:18 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-31 14:50 The sort algorithm is broken by the second rule, We need a way to pin these rules to the top Daniel J Walsh
2006-03-31 14:57 ` Joshua Brindle
2006-03-31 15:01   ` Daniel J Walsh
2006-03-31 15:17     ` Joshua Brindle
2006-03-31 16:01       ` Christopher Ashworth
2006-03-31 19:27       ` Stephen Smalley
2006-03-31 15:17     ` Stephen Smalley
2006-03-31 15:20       ` Stephen Smalley
2006-03-31 15:10   ` Stephen Smalley
2006-03-31 16:35     ` Ivan Gyurdiev
2006-03-31 17:26       ` Ivan Gyurdiev
2006-04-02 11:32         ` Ivan Gyurdiev
2006-03-31 18:52       ` Stephen Smalley
2006-03-31 19:03         ` Ivan Gyurdiev
2006-03-31 19:15           ` Stephen Smalley
2006-03-31 19:18             ` Joshua Brindle [this message]
2006-03-31 19:32               ` Stephen Smalley
2006-04-02 17:55                 ` Joshua Brindle
2006-04-02 20:13                   ` Ivan Gyurdiev
2006-04-02 20:31                     ` Joshua Brindle
2006-03-31 22:17               ` Ivan Gyurdiev

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=442D809D.8050105@tresys.com \
    --to=jbrindle@tresys.com \
    --cc=cpebenito@tresys.com \
    --cc=dwalsh@redhat.com \
    --cc=ivg2@cornell.edu \
    --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.