platform_external_selinux/policycoreutils
Yuli Khodorkovskiy 65c6325271 policycoreutils/semodule: update semodule to allow extracting modules
Add --extract/-E, --cil/-c, and --hll/-H to extract modules. If -c/-H
are not provided, the module will be output as HLL by default. Only
--cil or --hll (which will use the lang_ext in the semodule store) are valid
options to use with -E. The module is written to the current working directory
as <module_name>.<lang_ext>.

If a module exists as HLL and is exported as CIL, it will first compile into
CIL and cache to the module store. Once compiled, exporting will
continue.

If no priority is provided when extracting a module, then extraction at
the default priority, 400, will be attempted. If the module does not
exist at the default priority, then it will be exported at the highest
existing priority.

Examples:

Extract the wireshark module in a .cil format. If the module only exists
as HLL on the system, the module will be compiled into CIL and placed
into the module store. This command will then write wireshark.cil to the CWD.

    semodule --cil --extract wireshark

Extract the wireshark module in HLL format. Since the original HLL file
was a policy package, a wireshark.pp will be written to the CWD.

    semodule -E wireshark

Extract the wireshark module as CIL and HLL and extract the puppet
module as CIL at priority 400.

    semodule --hll -E wireshark --cil -E wireshark -X 400 --cil -E puppet

Signed-off-by: Yuli Khodorkovskiy <ykhodorkovskiy@tresys.com>
Signed-off-by: James Carter <jwcart2@tycho.nsa.gov>
2015-08-06 10:59:44 -04:00
..
.tx Update Translations 2013-10-24 13:58:39 -04:00
audit2allow policycoreutils: Comment constraint rules in audit2allow and sepolgen output 2015-07-31 11:16:00 -04:00
gui policycoreutils: Fix PEP8 issues 2015-07-24 16:07:13 +08:00
hll libsepol, policycoreutils: Move functions to convert a module package to CIL 2015-04-01 13:09:17 -04:00
load_policy Minor manpages improvements 2013-11-06 09:36:33 -05:00
man Merge branch 'fedora' into master-merge 2013-10-24 15:24:17 -04:00
mcstrans policycoreutils: Fix PEP8 issues 2015-07-24 16:07:13 +08:00
newrole Fix -Wformat errors 2015-03-13 14:14:23 -04:00
po Update Translations 2013-10-24 13:58:39 -04:00
restorecond Fix gcc -Wstrict-prototypes warnings 2014-10-02 09:56:38 -04:00
run_init run_init: Use a ring buffer in open_init_pty 2015-03-30 10:53:41 -04:00
sandbox policycoreutils: Fix PEP8 issues 2015-07-24 16:07:13 +08:00
scripts policycoreutils: Fix PEP8 issues 2015-07-24 16:07:13 +08:00
secon Minor manpages improvements 2013-11-06 09:36:33 -05:00
semanage policycoreutils: Fix PEP8 issues 2015-07-24 16:07:13 +08:00
semodule policycoreutils/semodule: update semodule to allow extracting modules 2015-08-06 10:59:44 -04:00
semodule_deps Laurent Bigonville patch to fix various minor manpage issues and correct section numbering. 2013-10-24 13:58:37 -04:00
semodule_expand tree: Makefiles: syntax, convert all ${VAR} to $(VAR) 2011-11-02 15:37:08 -04:00
semodule_link tree: Makefiles: syntax, convert all ${VAR} to $(VAR) 2011-11-02 15:37:08 -04:00
semodule_package policycoreutils: fix most gcc -Wwrite-strings warnings 2014-10-02 09:56:34 -04:00
sepolgen-ifgen tree: Makefiles: syntax, convert all ${VAR} to $(VAR) 2011-11-02 15:37:08 -04:00
sepolicy policycoreutils: Fix PEP8 issues 2015-07-24 16:07:13 +08:00
sestatus Laurent Bigonville patch to fix various minor manpage issues and correct section numbering. 2013-10-24 13:58:37 -04:00
setfiles policycoreutils: setfiles/restorecon: fix -r/-R option 2015-04-16 11:40:55 -04:00
setsebool Cleanup whitespace 2013-11-08 15:52:11 -05:00
.gitignore policycoreutils: add a HLL compiler to convert policy packages (.pp) to CIL 2014-08-26 08:03:31 -04:00
ChangeLog Updated policycoreutils and sepolgen ChangeLogs. 2015-07-31 11:18:39 -04:00
COPYING initial import from svn trunk revision 2950 2008-08-19 15:30:36 -04:00
Makefile policycoreutils: add a HLL compiler to convert policy packages (.pp) to CIL 2014-08-26 08:03:31 -04:00
VERSION Bump to final release 2015-02-02 09:38:10 -05:00