65c6325271
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> |
||
---|---|---|
.. | ||
.gitignore | ||
genhomedircon.8 | ||
Makefile | ||
semodule.8 | ||
semodule.c |