From: Stephen Smalley <sds@tycho.nsa.gov>
To: Mark Steele <mark@control-alt-del.org>, selinux@tycho.nsa.gov
Subject: Re: SELinux file context matching
Date: Tue, 2 Feb 2016 13:15:51 -0500 [thread overview]
Message-ID: <56B0F257.60504@tycho.nsa.gov> (raw)
In-Reply-To: <CAB5=j_qPtHM-D0X6qZf151es_erjfBWYMohLx+PF6toFaKaJgg@mail.gmail.com>
On 02/02/2016 12:48 PM, Mark Steele wrote:
> Hi list,
>
> I've got some file contexts setup for an application, and can't get the
> file context matching to work as I would expect.
>
> [root@dev1 policy]# cat
> /etc/selinux/targeted/contexts/files/file_contexts | grep cinched
> /etc/cinched(/.*)? system_u:object_r:ts_etc_t:s0
> /var/log/cinched(/.*)? system_u:object_r:ts_log_t:s0
> /var/lib/cinched(/.*)? system_u:object_r:ts_t:s0
> */usr/lib64/cinched(/.*)? system_u:object_r:ts_lib_t:s0*
> /etc/bash_completion.d/cinched_bash_completions
> system_u:object_r:ts_etc_t:s0
> /var/log/cinched/audit(/.*)? system_u:object_r:ts_audit_log_t:s0
> /usr/sbin/cinched system_u:object_r:ts_exec_t:s0
>
> [root@dev1 policy]# matchpathcon /usr/lib64/cinched/
> */usr/lib64/cinched system_u:object_r:lib_t:s0*
>
> [root@dev1 policy]# findcon
> /etc/selinux/targeted/contexts/files/file_contexts -p /usr/lib64/cinched
> /.* system_u:object_r:default_t:s0
> /usr/.* system_u:object_r:usr_t:s0
> */usr/lib64/cinched(/.*)? system_u:object_r:ts_lib_t:s0*
>
>
> This is running on CentOS 7. I was assuming that since my rule has the
> longest stem, it would be applied.
>
> Any suggestions?
It would help to see the complete file_contexts file.
Do you have anything in file_contexts.local that could be overriding it?
next prev parent reply other threads:[~2016-02-02 18:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-02 17:48 SELinux file context matching Mark Steele
2016-02-02 18:15 ` Stephen Smalley [this message]
2016-02-02 18:26 ` Jason Zaman
2016-02-02 18:31 ` Mike Palmiotto
2016-02-02 20:45 ` Mark Steele
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=56B0F257.60504@tycho.nsa.gov \
--to=sds@tycho.nsa.gov \
--cc=mark@control-alt-del.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.