Skip to content

Commit

Permalink
Create an empty selinux config file (#1243168)
Browse files Browse the repository at this point in the history
In order for selinux to properly label the system it needs to see that
the config file exists.

Also remove the old code trying to copy in a selinux config file, it
never worked -- the removepkg would remove it.
  • Loading branch information
bcl committed Jul 17, 2015
1 parent ef40d91 commit 164ad23
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 5 additions & 0 deletions share/runtime-cleanup.tmpl
Expand Up @@ -26,6 +26,11 @@ removefrom dracut --allbut /usr/lib/dracut/modules.d/30convertfs/convertfs.sh \
/usr/lib/dracut/dracut-initramfs-restore
## we don't run SELinux (not in enforcing, anyway)
removepkg checkpolicy selinux-policy libselinux-utils

## selinux checks for the /etc/selinux/config file's existance
## The removepkg above removes it, create an empty one. See rhbz#1243168
append etc/selinux/config ""

## anaconda has its own repo files
removefrom fedora-release --allbut /etc/os-release /usr/lib/os-release \
/usr/lib/os.release.d/*
Expand Down
3 changes: 0 additions & 3 deletions share/runtime-postinstall.tmpl
Expand Up @@ -61,9 +61,6 @@ install ${configdir}/sysctl.conf etc/sysctl.d/anaconda.conf
install ${configdir}/spice-vdagentd etc/sysconfig
mkdir etc/NetworkManager/conf.d
install ${configdir}/91-anaconda-autoconnect-slaves.conf etc/NetworkManager/conf.d
%if exists(root+"/etc/selinux/targeted"):
install ${configdir}/selinux.config etc/selinux/config
%endif

## set up sshd
install ${configdir}/sshd_config.anaconda etc/ssh
Expand Down

0 comments on commit 164ad23

Please sign in to comment.