Bug 1311913 - libsemanage.semanage_read_policydb: Could not open kernel policy for reading
libsemanage.semanage_read_policydb: Could not open kernel policy for reading
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
25
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-25 05:14 EST by Christian Heimes
Modified: 2016-08-16 23:03 EDT (History)
6 users (show)

See Also:
Fixed In Version: selinux-policy-3.13.1-172.fc25 selinux-policy-3.13.1-208.fc25
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-08-16 23:03:55 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Christian Heimes 2016-02-25 05:14:57 EST
Description of problem:
semanage doesn't work on rawhide

Version-Release number of selected component (if applicable):
libselinux-2.5-0.1.rc1.fc24.x86_64
selinux-policy-3.13.1-171.fc24.noarch
selinux-policy-targeted-3.13.1-171.fc24.noarch
libselinux-python-2.5-0.1.rc1.fc24.x86_64
libselinux-utils-2.5-0.1.rc1.fc24.x86_64
libselinux-python3-2.5-0.1.rc1.fc24.x86_64
rpm-plugin-selinux-4.13.0-0.rc1.24.fc24.x86_64
libsemanage-2.5-0.1.rc1.fc24.x86_64
libsemanage-python3-2.5-0.1.rc1.fc24.x86_64
libsemanage-python-2.5-0.1.rc1.fc24.x86_64

How reproducible:
Always

Steps to Reproduce:
1. install rawhide
2. run: semanage port --list

Actual results:
# semanage port --list
libsemanage.semanage_read_policydb: Could not open kernel policy /var/lib/selinux/targeted/active/policy.kern for reading. (No such file or directory).
FileNotFoundError: [Errno 2] No such file or directory

Expected results:
A list of port mappings

Additional info:
I can manually fix the issue by symlinking the current policy:
ln -s /etc/selinux/targeted/policy/policy.29 /var/lib/selinux/targeted/active/policy.kern
Comment 1 Petr Lautrbach 2016-02-25 05:16:57 EST
We need to fix it in selinux-policy package. In the mean time, please use:

# semodule -B

The symlink you created is not corrent
Comment 2 Christian Heimes 2016-02-25 05:25:00 EST
Thanks Petr! I can confirm that 'semodule -B' indeed fixes the issue.

# rm /var/lib/selinux/targeted/active/policy.kern
# semodule -B
# semanage port --list
SELinux Port Type              Proto    Port Number

afs3_callback_port_t           tcp      7001
afs3_callback_port_t           udp      7001
...
Comment 3 Jan Kurik 2016-07-26 00:44:06 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 25 development cycle.
Changing version to '25'.
Comment 4 Fedora Update System 2016-08-12 10:18:00 EDT
selinux-policy-3.13.1-208.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-662487f8f1
Comment 5 Fedora Update System 2016-08-12 11:56:46 EDT
selinux-policy-3.13.1-208.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-662487f8f1
Comment 6 Fedora Update System 2016-08-16 23:02:19 EDT
selinux-policy-3.13.1-208.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

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