Google

Replacing selinux policy

Make a backup and set the security context:

[root@surrey policy]# <strong>mv /etc/selinux/targeted/policy/policy.18 /etc/selinux/targeted/policy/policy.18.orig</strong>
[root@surrey policy]# <strong>cp new/policy.18 /etc/selinux/targeted/policy/</strong>
[root@surrey policy]# <strong>chcon system_u:object_r:policy_config_t /etc/selinux/targeted/policy/policy.18</strong>
[root@surrey policy]# <strong>/usr/sbin/setfiles -q -c /etc/selinux/targeted/policy/policy.18
/etc/selinux/targeted/contexts/files/file_contexts</strong>
[root@surrey policy]#<strong> load_policy /etc/selinux/targeted/policy/policy.18
</strong>

Check that the policy was uploaded:

[root@surrey policy]# <strong>tail -100 /var/log/messages |grep security</strong>
Dec� 6 11:39:49 surrey kernel: audit(1133887189.765:3): avc:� granted� { load_policy } for� pid=4407
comm="load_policy" scontext=root:system_r:unconfined_t tcontext=system_u:object_r:security_t
tclass=security
Dec� 6 11:39:49 surrey kernel: security:� 3 users, 4 roles, 349 types, 25 bools
Dec� 6 11:39:49 surrey kernel: security:� 55 classes, 18748 rules

Leave a Reply