Last active
January 22, 2022 09:56
-
-
Save ekojs/d49afbc3c5670e3d8277a3ff1c855c2d to your computer and use it in GitHub Desktop.
Compile custom semodule for selinux policy
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
#!/bin/bash | |
for x in $(ausearch -m AVC,USER_AVC,SELINUX_ERR,USER_SELINUX_ERR -i | grep -w comm | sed 's/.*comm/comm/g;s/comm=\(\w\+\).*/\1/g' | sort -u);do ausearch -c "$x" --raw | audit2allow -w;done |
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
#!/bin/bash | |
checkmodule -M -m -o $1.mod $1.te | |
semodule_package -o $1.pp -m $1.mod | |
rm -f *.mod |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment