I use SELinux on a personal server but to do so, I need to remember some (otherwise fairly obscure) commands. They include:
newrole -r sysadm_r
grep ... | audit2allow -M $MODULE
# edit $MODULE.te; bump module version
make -f /usr/share/selinux/default/include/Makefile $MODULE.pp
semodule -i $MODULE.pp
semodule -u $MODULE.pp
run_init service $SERVICE restart
(c/o Major Hayden):
cat > /usr/sbin/policy-rc.d <<EOF
#!/bin/sh
echo "All runlevel operations denied by policy" >&2
exit 101
EOF
cat /var/log/audit/audit.log | grep $KEY | audit2allow -w
cat /var/log/audit/audit.log | grep $KEY | audit2allow
audit2why -al | less -RSn
sestatus
sesearch -T -s $SRC -t $target
sesearch -R -A -t 'mail.*' | grep -e postfix -e mail
semanage fcontext -l
semanage login -l
semanage user -l
semanage login -m -s 'staff_u' root
semanage login -m -s 'user_u' -r s0 __default__
semanage dontaudit off
touch /.autorelabel; reboot
restorecon -Rv /path/to/dir/...