Skip to content

Instantly share code, notes, and snippets.

@larsar
Created November 14, 2011 14:46
Show Gist options
  • Save larsar/1364088 to your computer and use it in GitHub Desktop.
Save larsar/1364088 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