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 2077120 - augeas cannot parse /etc/selinux/semanage.conf from RHEL 9
Summary: augeas cannot parse /etc/selinux/semanage.conf from RHEL 9
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: augeas
Version: 9.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: YongkuiGuo
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-04-20 17:21 UTC by Richard W.M. Jones
Modified: 2023-05-09 08:19 UTC (History)
3 users (show)

Fixed In Version: augeas-1.13.0-3.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-09 07:30:45 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github hercules-team augeas pull 758 0 None open semanage: Fix parsing of ignoredirs 2022-04-20 18:10:25 UTC
Red Hat Issue Tracker RHELPLAN-119440 0 None None None 2022-04-20 17:25:45 UTC
Red Hat Product Errata RHBA-2023:2186 0 None None None 2023-05-09 07:30:47 UTC

Description Richard W.M. Jones 2022-04-20 17:21:28 UTC
Description of problem:

Note I'm mainly filing this bug to document a test failure, not
as an intent to fix it any time soon.

Augeas cannot parse /etc/selinux/semanage.conf from RHEL 9.

Version-Release number of selected component (if applicable):

augeas-1.13.0-2.el9

How reproducible:

100%

Steps to Reproduce:

On a RHEL 9 machine do:

$ augtool
augtool> print /augeas//error

You will see several errors including:

/augeas/files/etc/selinux/semanage.conf/error = "parse_failed"
/augeas/files/etc/selinux/semanage.conf/error/pos = "2499"
/augeas/files/etc/selinux/semanage.conf/error/line = "54"
/augeas/files/etc/selinux/semanage.conf/error/char = "16"
/augeas/files/etc/selinux/semanage.conf/error/lens = "/usr/share/augeas/lenses/dist/semanage.aug:32.10-.27:"
/augeas/files/etc/selinux/semanage.conf/error/lens/last_matched = "/usr/share/augeas/lenses/dist/inifile.aug:218.18-.41:"
/augeas/files/etc/selinux/semanage.conf/error/lens/next_not_matched = "/usr/share/augeas/lenses/dist/inifile.aug:218.44-.56:"
/augeas/files/etc/selinux/semanage.conf/error/message = "Iterated lens matched less than it should"

Comment 1 Richard W.M. Jones 2022-04-20 17:23:24 UTC
The problem seems to be on this line and character:

ignoredirs=/root;/bin;/boot;/dev;/etc;/lib;/lib64;/proc;/run;/sbin;/sys;/tmp;/usr;/var
                ^

Comment 2 YongkuiGuo 2022-04-21 08:32:30 UTC
There is the same issue on RHEL8. See https://bugzilla.redhat.com/show_bug.cgi?id=1931058

Comment 3 Laszlo Ersek 2022-04-21 16:07:23 UTC
(In reply to Richard W.M. Jones from comment #0)

> Note I'm mainly filing this bug to document a test failure, not
> as an intent to fix it any time soon.

With your permission then, I'm setting "Devel Cond-NAK: Capacity". Please undo it if you disagree. Thanks.

Comment 4 Richard W.M. Jones 2022-04-21 16:43:57 UTC
I did actually fix it upstream, it was a surprise even to me.
However as usual it hasn't had any attention yet so we'll need to
wait to see if the fix goes upstream.  If it does I will update
the RHEL package.

Comment 6 Richard W.M. Jones 2022-10-06 14:55:03 UTC
There's a Xen CI test failure that I don't understand:
https://dashboard.osci.redhat.com/#/artifact/brew-build/aid/48157001?focus=tc:xen-ci.brew-build.tier1.functional

Comment 7 YongkuiGuo 2022-10-08 08:05:11 UTC
(In reply to Richard W.M. Jones from comment #6)
> There's a Xen CI test failure that I don't understand:
> https://dashboard.osci.redhat.com/#/artifact/brew-build/aid/
> 48157001?focus=tc:xen-ci.brew-build.tier1.functional

There was an issue with the brew tool in our jslave env when downloading the latest augeas package. Anyway, this gating test passed.

Comment 8 YongkuiGuo 2022-10-08 08:20:03 UTC
Tested with package:
augeas-1.13.0-3.el9.x86_64


Steps:

1. On RHEL9.2 host
$ augtool print /files/etc/selinux/semanage.conf
...
/files/etc/selinux/semanage.conf/ignoredirs
/files/etc/selinux/semanage.conf/ignoredirs/1 = "/root"
/files/etc/selinux/semanage.conf/ignoredirs/2 = "/bin"
/files/etc/selinux/semanage.conf/ignoredirs/3 = "/boot"
/files/etc/selinux/semanage.conf/ignoredirs/4 = "/dev"
/files/etc/selinux/semanage.conf/ignoredirs/5 = "/etc"
/files/etc/selinux/semanage.conf/ignoredirs/6 = "/lib"
/files/etc/selinux/semanage.conf/ignoredirs/7 = "/lib64"
/files/etc/selinux/semanage.conf/ignoredirs/8 = "/proc"
/files/etc/selinux/semanage.conf/ignoredirs/9 = "/run"
/files/etc/selinux/semanage.conf/ignoredirs/10 = "/sbin"
/files/etc/selinux/semanage.conf/ignoredirs/11 = "/sys"
/files/etc/selinux/semanage.conf/ignoredirs/12 = "/tmp"
/files/etc/selinux/semanage.conf/ignoredirs/13 = "/usr"
/files/etc/selinux/semanage.conf/ignoredirs/14 = "/var"
/files/etc/selinux/semanage.conf/optimize-policy = "true"
/files/etc/selinux/semanage.conf/@group = "sefcontext_compile"
/files/etc/selinux/semanage.conf/@group/path = "/usr/sbin/sefcontext_compile"
/files/etc/selinux/semanage.conf/@group/args = "-r $@"

Augeas can be able to parse /etc/selinux/semanage.conf correctly.

Comment 11 YongkuiGuo 2022-10-26 08:35:48 UTC
Verified this bug since the test case for this bug has been automated and passed in the latest nightly compose test.

Comment 13 errata-xmlrpc 2023-05-09 07:30:45 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 (augeas 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-2023:2186


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