Is there a way to view all custom policies applied to SELinux, preferably rolling them all up into one policy "package"?
I've just spent the last week or so working through a series of SELinux errors when a certain process (awstats update from logrotate scripts, FWIW) tried to run. With SELinux in permissive mode I'd wait for logrotate to run, view the SELinux blocks in the audit log, run audit2allow to create an allow policy, and then repeat the process the next day with a whole new list of related errors. Finally, this morning the audit log came up clean, so I think I have all the required rules in place to allow the scripts to run properly.
Of course I wasn't thinking as I ran thorough this process, so I don't have all the .pp/.te files created along the way. So what I would like to do is pull all the currently active custom policies back out of SELinux, so I can have a backup copy for use on other machines or restores. Is this possible?
Edit: This is on a machine running CentOS 6.7, if that makes a difference