Skip to content

Instantly share code, notes, and snippets.

@larstobi
Forked from larsar/selinux-create-policy
Created November 22, 2011 20:12
Show Gist options
  • Save larstobi/1386780 to your computer and use it in GitHub Desktop.
Save larstobi/1386780 to your computer and use it in GitHub Desktop.
Creating SELinux policy for failing stuff
For instance Puppet server will not start under RHEL SELinux. Try to start it, then run the following script. Continue this cycle until it starts. It will probably work for different SELinux challenges as well.
The script requires:
$yum install policycoreutils-python
cd /tmp && \
cat /var/log/audit/audit.log | audit2allow -m puppetmaster > puppetmaster.te && \
checkmodule -M -m puppetmaster.te -o puppetmaster.mod && \
semodule_package -m puppetmaster.mod -o puppetmaster.pp && \
semodule -i puppetmaster.pp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment