Bug 1311913 - libsemanage.semanage_read_policydb: Could not open kernel policy for reading
Summary: libsemanage.semanage_read_policydb: Could not open kernel policy for reading
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 25
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-25 10:14 UTC by Christian Heimes
Modified: 2016-08-17 03:03 UTC (History)
6 users (show)

Fixed In Version: selinux-policy-3.13.1-172.fc25 selinux-policy-3.13.1-208.fc25
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-08-17 03:03:55 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Christian Heimes 2016-02-25 10:14:57 UTC
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 10:16:57 UTC
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 10:25:00 UTC
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 04:44:06 UTC
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 14:18:00 UTC
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 15:56:46 UTC
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-17 03:02:19 UTC
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.