[CentOS] Centos 6.5 workaround needed for selinux "Could not open policy file" bug

Tue May 20 17:52:54 UTC 2014
Daniel J Walsh <dwalsh at redhat.com>

On 05/20/2014 12:50 PM, Michael McNulty wrote:
> I read about this bug in the Centos 6.2 faq and the link showing it fixed in https://bugzilla.redhat.com/show_bug.cgi?id=769859
> but I am still getting it updating on a Centos 6.5 server that had selinux disabled. I want to run selinux as permissive but it won't load now on reboot.
>
> I ran the yum update to apply this latest selinux update 
> http://lists.centos.org/pipermail/centos-announce/2014-May/020294.html
> for centos-release-6-5.el6.centos.11.2.x86_64.
>
> Transaction Test Succeeded
> Running Transaction
>   Installing : selinux-policy-3.7.19-231.el6_5.3.noarch            
>   Installing : selinux-policy-targeted-3.7.19-231.el6_5.3.noarch             
> semodule: link.c:840: alias_copy_callback: Assertion `base_type->primary == target_type->s.value' failed.
> SELinux:  Could not open policy file <= /etc/selinux/targeted/policy/policy.24:  No such file or directory
>   Verifying  : selinux-policy-3.7.19-231.el6_5.3.noarch       
>   Verifying  : selinux-policy-targeted-3.7.19-231.el6_5.3.noarch  
>
> Installed:
>   selinux-policy.noarch 0:3.7.19-231.el6_5.3               
>
> I tried yum reinstall, yum remove and yum install for selinux-policy-targeted but I still receive the same error. I also enabled selinux as permissive and rebooted but selinux still will not start as permissive.
>
> Anyone have a work around to get selinux working as permissive with this condition?
>
> thx
>
> Mike
>  		 	   		  
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
This seems strange.  Try this.

setenforce 0
rm -rf /etc/selinux
yum reinstall selinux-policy selinux-policy-targeted
restorecon -R -v /etc/selinux