who provides /etc/sysconfig/selinux?

Daniel J Walsh dwalsh at redhat.com
Fri Jun 4 13:57:36 UTC 2004


Todays selinux-polcy-* RPMS attempt to handle the /etc/selinux/config 
and /etc/sysconfig/selinux files in the post install.

Please check them out.


%post
if [ ! -f /etc/selinux/config ]; then
    if [ -f /etc/sysconfig/selinux ]; then
        cp /etc/sysconfig/selinux /etc/selinux/config
        echo "
# SELINUXTYPE= can take one of these two values:
#    targeted - Only targeted network daemons are protected.
#    strict - Full SELinux protection.
SELINUXTYPE=strict " >> /etc/selinux/config
        rm -f /etc/sysconfig/selinux
    else
        echo "
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#    enforcing - SELinux security policy is enforced.
#    permissive - SELinux prints warnings instead of enforcing.
#    disabled - No SELinux policy is loaded.
SELINUX=enforcing
# SELINUXTYPE= can take one of these two values:
#    targeted - Only targeted network daemons are protected.
#    strict - Full SELinux protection.
SELINUXTYPE=targeted " > /etc/selinux/config

    fi
fi
ln -sf /etc/selinux/config /etc/sysconfig/selinux
restorecon /etc/selinux/config





More information about the fedora-test-list mailing list