Created
May 30, 2015 22:39
-
-
Save louis89/e9334e0c7d2f356f0004 to your computer and use it in GitHub Desktop.
Script for compiling SELinux policy files
This file contains hidden or 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
!/bin/bash | |
# Call this script with the name of the source policy file. | |
# The policy file is expected to have the extension .te | |
if [ $1 ]; then | |
m4 "$1.te" > "$1.m4.te" | |
checkmodule -M -m "$1.m4.te" -o "$1.mod" | |
semodule_package -o "$1.pp" -m "$1.mod" | |
else | |
echo "This script requires parameter 1 to be the name of the policy source file to be compiled." | |
fi | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment