From: Nicolas Iooss <nicolas.iooss@m4x.org>
To: selinux-refpolicy@vger.kernel.org
Subject: Why is /usr/include matched with /usr/inclu.e?
Date: Wed, 21 Aug 2019 21:57:14 +0200 [thread overview]
Message-ID: <CAJfZ7=krh_TaCBQzFxLM394Sc5-82ZO0DdcfvWON-RXu-wqBVw@mail.gmail.com> (raw)
Hi all,
While checking the patterns in refpolicy, I stumbled upon the
following line in
https://github.com/SELinuxProject/refpolicy/blob/RELEASE_2_20190609/policy/modules/kernel/files.fc#L200
/usr/inclu.e(/.*)? gen_context(system_u:object_r:usr_t,s0)
This pattern matches /usr/include and its content, but why is a dot
used? Which other directories can it match?
The issue there is that a dot can match a slash, so the pattern also
matches /usr/inclu/e/, which seems strange. This pattern has been
introduced in the very early days of refpolicy's git repository,
according to https://github.com/SELinuxProject/refpolicy/commit/f8ec0ad43b54437e2d9f0e48a773a64dbd9e543c#diff-e333cb52d2139f7a71f0dfbd32c06f70R117.
Does anyone remember why the pattern for /usr/include is so special?
Thanks,
Nicolas
next reply other threads:[~2019-08-21 19:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-21 19:57 Nicolas Iooss [this message]
2019-08-21 20:02 ` Why is /usr/include matched with /usr/inclu.e? Dominick Grift
2019-08-21 20:29 ` Nicolas Iooss
2019-08-27 4:06 ` Chris PeBenito
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='CAJfZ7=krh_TaCBQzFxLM394Sc5-82ZO0DdcfvWON-RXu-wqBVw@mail.gmail.com' \
--to=nicolas.iooss@m4x.org \
--cc=selinux-refpolicy@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).