RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1904059 - semanage-fcontext documentation does not explain regular expressions
Summary: semanage-fcontext documentation does not explain regular expressions
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: policycoreutils
Version: 8.0
Hardware: All
OS: Linux
medium
low
Target Milestone: rc
: 8.0
Assignee: Vit Mojzis
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-12-03 12:51 UTC by Alain D D Williams
Modified: 2021-05-18 15:09 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-18 15:09:18 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Alain D D Williams 2020-12-03 12:51:22 UTC
Description of problem:

man semanage-fcontext

Contains "This command maps file paths using regular expressions to SELinux labels" - but it does not say what sort of regular expressions: eg POSIX, Perl, ... and any extensions/restrictions. The only example anywhere seems to be (/.*)? -- OK, not quite true but I look at this and feel very unsure as to what I can/cannot use.

Comment 2 Alain D D Williams 2020-12-26 17:50:10 UTC
Ah: PCRE - thanks.

What regular expression flags are in effect ? I assume that there is not a way of specifying them; the 'i' (case-insensitive) not being set.
Is 'u' (Unicode) set, eg will a.b match a£b ? Is this affected by $LANG ?

You might also mention that '/' is not a special character -- to clearly distance itself what happens in shell globbing.
Many will understand, but no harm in being nice to novices!

Thanks for picking this up.

Comment 4 Alain D D Williams 2021-02-11 13:23:59 UTC
Brilliant - questions answered, thanks.

Comment 12 errata-xmlrpc 2021-05-18 15:09:18 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (policycoreutils bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2021:1715


Note You need to log in before you can comment on or make changes to this bug.