Bug 1435127

Summary: fcontext --extract does not work when socket entries are present in custom fcontext policy
Product: [Fedora] Fedora Reporter: Zdenek Pytela <zpytela>
Component: policycoreutilsAssignee: Petr Lautrbach <plautrba>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 25CC: dwalsh, lvrabec, mgrepl, mmalik, plautrba, pmoore, qe-baseos-security, ssekidde, vmojzis
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: policycoreutils-2.5-20.fc25 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1435100 Environment:
Last Closed: 2017-04-09 21:52:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1435100    
Bug Blocks:    

Description Zdenek Pytela 2017-03-23 08:43:32 UTC
+++ This bug was initially created as a clone of Bug #1435100 +++

Description of problem:
semanage fcontext -E does not work when custom policy contains filetype socket spoecification.

Version-Release number of selected component (if applicable):
policycoreutils-python-2.5-11.el7_3.x86_64

How reproducible:
always

Steps to Reproduce:
1. semanage fcontext -E
2. semanage fcontext -a -f s -t httpd_var_run_t '/var/www/\.sockets(/.*)?'
3. semanage fcontext -E

Actual results:
KeyError: socket
(exit code 1)

Expected results:
list of customizable commands


Additional info:
Seems to be fixed in this commit:
https://github.com/SELinuxProject/selinux/commit/317743bbe2a235a5c68f1066b4153e0726a3118f

semanage fcontext with other file types work correctly
the same is valid for RHEL 7.3 and RHEL 7.4

--- Additional comment from Red Hat Bugzilla Rules Engine on 2017-03-23 03:16:28 EDT ---

Since this bug report was entered in Red Hat Bugzilla, the release flag has been set to ? to ensure that it is properly evaluated for this release.

Comment 2 Fedora Update System 2017-04-06 16:16:09 UTC
policycoreutils-2.6-5.fc26 libselinux-2.6-5.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-f21a1bffda

Comment 3 Fedora Update System 2017-04-07 07:42:14 UTC
policycoreutils-2.5-20.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-c89d1d37d0

Comment 4 Fedora Update System 2017-04-07 19:58:12 UTC
policycoreutils-2.5-20.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-2017-c89d1d37d0

Comment 5 Fedora Update System 2017-04-07 21:20:49 UTC
libselinux-2.6-5.fc26, policycoreutils-2.6-5.fc26 has been pushed to the Fedora 26 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-2017-f21a1bffda

Comment 6 Fedora Update System 2017-04-09 21:52:12 UTC
policycoreutils-2.5-20.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2017-04-12 14:50:48 UTC
libselinux-2.6-5.fc26, policycoreutils-2.6-5.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.