Why is /usr/include matched with /usr/inclu.e?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux