All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel J Walsh <dwalsh@redhat.com>
To: Chad Sellers <csellers@tresys.com>
Cc: Stephen Smalley <sds@tycho.nsa.gov>,
	James Morris <jmorris@namei.org>,
	selinux@tycho.nsa.gov, SELinux-dev@tresys.com
Subject: Re: [PATCH] SELinux - canonicalize getxattr() (fwd)
Date: Wed, 09 Nov 2005 17:46:37 -0500	[thread overview]
Message-ID: <43727C4D.1070100@redhat.com> (raw)
In-Reply-To: <200511091630.53757.csellers@tresys.com>

Chad Sellers wrote:
> On Thursday 27 October 2005 16:02, Stephen Smalley wrote:
>   
>> On Thu, 2005-10-27 at 15:23 -0400, James Morris wrote:
>>     
>>> On Thu, 27 Oct 2005, Stephen Smalley wrote:
>>>       
>>>> Thoughts?
>>>>         
>>> It may be helpful to have type aliases, but are they truly necessary?
>>>
>>> Seems like a lot of potential problems arise from them, including
>>> confusing SELinux developers.
>>>
>>> Perhaps type aliasing would be better implemented as a higher level
>>> policy construct?
>>>       
>> There seem to be three uses of the aliases:
>> 1) compatibility across policy changes, e.g. when a type is removed or
>> renamed, an alias can be defined so that any existing processes or
>> objects with the type aren't rendered unlabeled upon the policy reload,
>> 2) on-disk compatibility between policies, so that a filesystem
>> initially labeled for targeted policy is still fairly useable for
>> bootstrapping a strict policy system even though the latter has
>> finer-grained types,
>> 3) sharing among policies, both at a source level (macros, .te
>> files, .fc files) and for binary policy modules, so that policy modules
>> (source or binary) can refer to types that may then be coalesced or kept
>> separate as appropriate for a given base policy.
>>
>> #3 could be done entirely via a higher level construct, but we don't
>> have such a higher level construct yet and are relying on the ability to
>> share among policies in this manner.  #2 may not be critical.  #1 seems
>> to require that the kernel retain a notion of the aliases.
>>
>> If #2 is not critical, then changing matchpathcon_init in the proposed
>> manner may be sufficient (whether using sepol or selinuxfs as the
>> backend).  With that change, upgraded systems that have existing uses of
>> alias names in on-disk xattrs won't cause spurious complaints by
>> setfiles/restorecon, and a clean install should yield a system with no
>> alias names stored in the on-disk xattrs since rpm will get canonical
>> names.  We could instrument the setfilecon functions in libselinux to
>> also canonicalize the context prior to calling setxattr.  On second
>> thought, it seems overkill to do it on context translations, as this is
>> only an issue for file contexts and is already covered for getxattr, so
>> we are primarily concerned with matchpathcon and setfilecon.
>>     
>
> Did this ever get resolved?  I see that this patch has made it into the 
> rawhide kernel.  This means that when installing a new policy rpm, my screen 
> is flooded with fixfiles relabeling lib_t to shlib_t, due to shlib_t being a 
> typealias of lib_t in targeted.  Are we worried about this right now, or are 
> these messages ok?
>
>   
We are supposed to be patching restorecon/chcon/setfiles to make these 
go away or at most warn.  These tools should be asking the kernel for 
the correct context for a file  IE shlib_t -> lib_t in targeted policy 
and then says it is ok.


-- 



--
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:[~2005-11-09 22:46 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-14 14:15 [PATCH] SELinux - canonicalize getxattr() (fwd) James Morris
2005-10-27 19:03 ` Stephen Smalley
2005-10-27 19:23   ` James Morris
2005-10-27 20:02     ` Stephen Smalley
2005-11-09 21:30       ` Chad Sellers
2005-11-09 22:46         ` Daniel J Walsh [this message]
2005-11-10 12:31           ` Stephen Smalley
2005-11-10 12:45             ` Stephen Smalley
2005-11-10 12:19         ` Stephen Smalley
2005-11-10 15:13         ` Stephen Smalley
2005-11-10 15:22           ` Chad Sellers
2005-11-10 15:33             ` Stephen Smalley
2005-11-10 15:45               ` Stephen Smalley

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=43727C4D.1070100@redhat.com \
    --to=dwalsh@redhat.com \
    --cc=SELinux-dev@tresys.com \
    --cc=csellers@tresys.com \
    --cc=jmorris@namei.org \
    --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.