All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christopher J. PeBenito" <cpebenito@tresys.com>
To: Laurent Bigonville <bigon@debian.org>
Cc: <selinux@tycho.nsa.gov>
Subject: Re: File context not applied due to regex ordering
Date: Mon, 1 Apr 2013 11:58:32 -0400	[thread overview]
Message-ID: <5159AEA8.2090004@tresys.com> (raw)
In-Reply-To: <20130321123256.198ba5b6@soldur.bigon.be>

On 03/21/13 07:32, Laurent Bigonville wrote:
> Hello,
> 
> I remember that I already talk about this on IRC a while back, but I
> don't remember if there was any outcome.
> 
> The refpolicy is containing the following filecontext:
> 
> /usr/(s)?bin/gdm(3)?    --      gen_context(system_u:object_r:xdm_exec_t,s0)
> 
> But for some reasons /usr/sbin/gdm3 is labeled on disk as bin_t instead
> of xdm_exec_t. matchpathcon is giving me this:
> 
> /usr/bin/gdm	system_u:object_r:xdm_exec_t:SystemLow
> /usr/bin/gdm3	system_u:object_r:xdm_exec_t:SystemLow
> /usr/sbin/gdm	system_u:object_r:bin_t:SystemLow
> /usr/sbin/gdm3	system_u:object_r:bin_t:SystemLow
> 
> Changing the regex to /usr/s?bin/gdm(3)? fix the issue.
> 
> Shouldn't this be fixed in the userspace libraries?

I'm not clear; are you saying this is a file context sorting issue or a matchpathcon error?  Matchpathcon should be able to handle a regex with ()? so I'd guess its a sorting issue.  Since sorting file contexts is tricky, it would probably be simpler to fix the policy.

-- 
Chris PeBenito
Tresys Technology, LLC
www.tresys.com | oss.tresys.com

--
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:[~2013-04-01 15:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-21 11:32 File context not applied due to regex ordering Laurent Bigonville
2013-04-01 15:58 ` Christopher J. PeBenito [this message]
2013-04-01 16:55   ` Laurent Bigonville
2013-04-01 17:40     ` Eric Paris
2013-04-02  9:41       ` Laurent Bigonville
2013-09-28  9:29         ` Laurent Bigonville
2013-09-28 13:30           ` Dominick Grift

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=5159AEA8.2090004@tresys.com \
    --to=cpebenito@tresys.com \
    --cc=bigon@debian.org \
    --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.