Modify 'mdp' to output MLS and CIL policy source files.
Subsystems (2)
PATCH 1/1 Modify 'mdp' to output MLS and CIL policy source files.
The 'make dummy policy' application will now output policy source files to build a basic MLS policy and also support the CIL compiler. See the SELinux.txt file for further information.
Signed-off-by Richard Haines <[email protected]>
--- Documentation/security/SELinux.txt | 34 +++++ scripts/selinux/mdp/mdp.c | 269 +++++++++++++++++++++++++++++------- 2 files changed, 253 insertions(+), 50 deletions(-)
Documentation/security/SELinux.txt +34 -0
@@ -25,3 +25,37 @@ kernel, with a single selinux user, role, and type. It will compile the policy, will set your SELINUXTYPE to dummy in /etc/selinux/config, install the compiled policy as 'dummy', and relabel your filesystem. + +NOTES: + +mdp supports building the following policy source file types: + + 1. Output a non mls source file suitable for building a binary policy + with checkpolicy (this is the default when using step 4 above): + ./mdp <policy_file> <file_contexts> + + 2. Output an mls source file suitable for building an MLS binary policy + with checkpolicy: + ./mdp -M <policy_file> <file_contexts> + + 3. Output a CIL source file suitable for building either a non-mls or mls + binary policy using the CIL compiler: + ./mdp -c <policy_file> <file_contexts> + +If mdp is called locally, a path will need to point to the classmap.h and +initial_sid_to_string.h files located in the "security/selinux/include" +directory. + +You are advised to set the SELinux configuration file 'config' to permissive +as follows when testing these policies: + + SELINUX=permissive + +Once loaded, then 'setenforce 1' can be used to enforce the policy. + + + + + + +
scripts/selinux/mdp/mdp.c +219 -50
323 lines not on this page · raw message
Signature · 9 lines
1.7.6.1 Richard -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.