selinux/policycoreutils/semodule
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
..
.gitignore Ignore genhomedircon link. 2013-10-24 15:11:01 -04:00
genhomedircon.8 genhomedircon is no longer a script, but a link to semodule 2013-10-24 13:58:39 -04:00
Makefile Drop semodule_path; obsoleted by elimination of genhomedircon script. 2013-10-29 12:21:02 -04:00
semodule.8 policycoreutils/semodule: update semodule to allow extracting modules 2015-08-06 10:59:44 -04:00
semodule.c policycoreutils/semodule: update semodule to allow extracting modules 2015-08-06 10:59:44 -04:00