Bug 1319338

Summary: sepolgen-ifgen causes selinux-policy-devel-3.13.1-179: syntax errors on typebounds interfaces.
Product: [Fedora] Fedora Reporter: Giulio 'juliuxpigface' <juliux.pigface>
Component: policycoreutilsAssignee: Petr Lautrbach <plautrba>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 24CC: dominick.grift, dwalsh, lvrabec, mgrepl, plautrba, rc040203
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: policycoreutils-2.5-5.fc24 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-04-13 21:34:26 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:
Attachments:
Description Flags
sepolgen-typebounds none

Description Giulio 'juliuxpigface' 2016-03-18 21:29:22 UTC
Description of problem:
While updating the package "selinux-policy-devel" via dnf, the terminal emulator reports the following exceptions:

/usr/share/selinux/devel/include/contrib/docker.if: Syntax error on line 503 
docker_t [type=IDENTIFIER]

/usr/share/selinux/devel/include/roles/unconfineduser.if: Syntax error on line 706 unconfined_t [type=IDENTIFIER]

However, the update proceeds smoothly.

Version-Release number of selected component (if applicable):
selinux-policy-devel-3.13.1-179

How reproducible:
Always

Steps to Reproduce:
1. Update selinux-policy-devel via dnf


Actual results:
Two syntax errors are reported.

Expected results:
Ideally, the two syntax errors shall be fixed.

Comment 1 Daniel Walsh 2016-03-21 14:25:05 UTC
THe problem is sepolgen-ifgen does not understand typebounds syntax.

interface(`unconfined_typebounds',`
	gen_require(`
		type unconfined_t;
	')

	typebounds unconfined_t $1;
')

Comment 2 Miroslav Grepl 2016-03-21 17:16:43 UTC
Created attachment 1138693 [details]
sepolgen-typebounds

Yes, sepolgen/refparser.py and sepolgen/refpolicy.py files need to be patched.

Comment 3 Miroslav Grepl 2016-03-21 17:28:38 UTC
(In reply to Miroslav Grepl from comment #2)
> Created attachment 1138693 [details]
> sepolgen-typebounds
> 
> Yes, sepolgen/refparser.py and sepolgen/refpolicy.py files need to be
> patched.

https://github.com/fedora-selinux/selinux/pull/21

Comment 4 Petr Lautrbach 2016-04-08 18:51:43 UTC
*** Bug 1315629 has been marked as a duplicate of this bug. ***

Comment 5 Fedora Update System 2016-04-08 21:05:34 UTC
secilc-2.5-2.fc24 checkpolicy-2.5-2.fc24 policycoreutils-2.5-5.fc24 libselinux-2.5-3.fc24 libsepol-2.5-3.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-9bdf70e44d

Comment 6 Fedora Update System 2016-04-09 18:51:54 UTC
checkpolicy-2.5-2.fc24, libselinux-2.5-3.fc24, libsepol-2.5-3.fc24, policycoreutils-2.5-5.fc24, secilc-2.5-2.fc24 has been pushed to the Fedora 24 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-9bdf70e44d

Comment 7 Fedora Update System 2016-04-13 21:34:23 UTC
checkpolicy-2.5-2.fc24, libselinux-2.5-3.fc24, libsepol-2.5-3.fc24, policycoreutils-2.5-5.fc24, secilc-2.5-2.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.