-
Notifications
You must be signed in to change notification settings - Fork 359
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
1 parent
d4f3ba7
commit 65c6325
Showing
2 changed files
with
156 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters