Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 558958 - Support .cil modules in SELinux policy packages
Summary: Support .cil modules in SELinux policy packages
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: SELinux (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Sven Vermeulen (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-27 18:39 UTC by Sven Vermeulen (RETIRED)
Modified: 2015-08-30 08:40 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch against selinux-policy-2.eclass to support .cil files (selinux-policy-2.eclass.patch,2.63 KB, patch)
2015-08-27 18:41 UTC, Sven Vermeulen (RETIRED)
Details | Diff
Patch against selinux-policy-2.eclass to support .cil files (selinux-policy-2.eclass.patch,2.72 KB, patch)
2015-08-27 19:00 UTC, Sven Vermeulen (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Vermeulen (RETIRED) gentoo-dev 2015-08-27 18:39:38 UTC
The selinux-policy-2.eclass file should support .cil files as well as the regular .te/.if/.fc files in the POLICY_FILES as well as refpolicy structure (latter not validated yet).

Reproducible: Always

Steps to Reproduce:
Create a selinux-test.ebuild with a test.cil file referenced in it (as stored in the files/ directory):

# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sec-policy/selinux-hadoop/selinux-hadoop-9999.ebuild,v 1.5 2015/03/22 13:47:33 swift Exp $
EAPI="5"

IUSE=""
MODS="test"
POLICY_FILES="test.cil"

inherit selinux-policy-2

DESCRIPTION="SELinux policy for hadoop"

if [[ $PV == 9999* ]] ; then
        KEYWORDS=""
else
        KEYWORDS="~amd64 ~x86"
fi
Actual Results:  
Trying to install the package fails. The eclass does not copy the .cil file and as such no resulting files exist that can be loaded.

Expected Results:  
The .cil file is copied and treated like a .pp file.
Comment 1 Sven Vermeulen (RETIRED) gentoo-dev 2015-08-27 18:41:36 UTC
Created attachment 410460 [details, diff]
Patch against selinux-policy-2.eclass to support .cil files

Current patch against the eclass which seems to work for both existing as well as .cil using policy packages.
Comment 2 Sven Vermeulen (RETIRED) gentoo-dev 2015-08-27 19:00:36 UTC
Created attachment 410468 [details, diff]
Patch against selinux-policy-2.eclass to support .cil files

Small update not to use -i ... -i ... -i ... in the semodule command
Comment 3 Sven Vermeulen (RETIRED) gentoo-dev 2015-08-30 08:40:25 UTC
Committed