Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Description of problem:
semodule -l is not showing up policy modules versions anymore as it was used to do since the time I recall about using the semodule command:
With RHEL 7.3 this fails:
semodule -l | head -n 5
abrt
accountsd
acct
afs
aiccu
With RHEL 6 or RHEL 7.2 it works as expected:
semodule -l | head -n 5
abrt 1.2.0
accountsd 1.0.0
ada 1.4.0
afs 1.5.3
aiccu 1.0.0
Version-Release number of selected component (if applicable):
policycoreutils-2.5-8.el7.x86_64
How reproducible:
Always
Steps to Reproduce:
1. Run semodule -l
Actual results:
semodule -l | head -n 5
abrt
accountsd
acct
afs
aiccu
Expected results:
semodule -l | head -n 5
abrt 1.2.0
accountsd 1.0.0
ada 1.4.0
afs 1.5.3
aiccu 1.0.0
Additional info:
Comment 2Christian Kaenzig
2016-11-08 07:52:05 UTC
Hello, this bug also affects RHEL 7.2 when the policycoreutils package is upgraded to 2.5-8.
I opened as support case with Red Hat, here is the answer I got:
---
The new SELinux userspace uses SELinux Common Intermediate Language (CIL) in the module store. CIL treats files as modules and does not have a separate module statement, the module is named after the file name.
Unfortunately CIL doesn't support policy_module() statement. It means that modules don't have versions anymore. Now we have namespaces for policy rules. So all the current rules are in the global namespace and we don't identify them using policy modules as before.
---
I don't currently understand what this means exactly as I lack knowledge about how selinux modules work exactly.
SELinux userspace 2.4 and higher uses CIL and CIL doesn't have any component which would represent a module name or version. Therefore a module name is derived from a filename and a version completely dropped from semodule output.
However, original .pp files are stored together with cil files as hll files. It means that a version could be extracted from that file.
I prepared a patch and srpms [1] with libsemanage patched to look to try to extract a version from hll files if an original module was installed from .pp file. And semodule patched to accept another list option - legacy - which tries to provide same output as pre-2.4 releases, e.g.:
# semodule -l | tail -n 3
zarafa
zebra
zoneminder
# semodule -lfull | tail -n 3
100 zebra pp
100 zoneminder cil
100 zosremote pp disabled
# semodule -llegacy | tail -n 3
zebra 1.13.0
zoneminder (null)
zosremote 1.2.0 Disabled
(null) at zoneminder means that the module was not installed from .pp file and there's no version available.
[1] https://plautrba.fedorapeople.org/copr/selinux-semodule-llegacy/