From 2fca6f75df89139ba9eb904c8b9811e93e1803f0 Mon Sep 17 00:00:00 2001 From: Vladimir Slavik Date: Jun 16 2020 12:39:13 +0000 Subject: Clean up lists of files and directories to relabel One item per line, sorted alphabetically. Related: rhbz#1775975 Related: rhbz#1834189 --- diff --git a/data/post-scripts/80-setfilecons.ks b/data/post-scripts/80-setfilecons.ks index c9fc2a0..420464c 100644 --- a/data/post-scripts/80-setfilecons.ks +++ b/data/post-scripts/80-setfilecons.ks @@ -6,31 +6,48 @@ # /var/log/anaconda) # - ostree payloads, where all of the labeling of /var is the installer's # responsibility (see https://github.com/ostreedev/ostree/pull/872 ) +# - OSTree variants of the traditional mounts if present -restorecon -ir /etc/sysconfig/network-scripts /etc/lvm /etc/X11/xorg.conf.d \ - /etc/iscsi /etc/modprobe.d /etc/sysconfig \ - /var/lib /var/lib/iscsi /var/lock /var/log /var/spool \ - /var/cache/yum \ - /dev \ - /root \ - /boot \ - /etc/dnf/modules.d - -# Also relabel the OSTree variants of the traditional mounts if present -restorecon -ir /var/roothome /var/home /var/opt /var/srv /var/media /var/mnt - -restorecon -i /etc/rpm/macros /etc/dasd.conf /etc/zfcp.conf /etc/blkid.tab* \ - /etc/mtab /etc/fstab /etc/resolv.conf /etc/modprobe.conf* \ - /etc/crypttab /etc/mdadm.conf /etc/sysconfig/network \ - /etc/*shadow* /etc/group* /etc/passwd* /etc/dhcp/dhclient-*.conf \ - /etc/localtime /etc/hostname /root/install.log* \ - /var/run /var/log/*tmp \ - /usr/lib64 \ - /lib64 \ - /root/install.log* - -if [ -e /etc/zipl.conf ]; then - restorecon -i /etc/zipl.conf -fi +restorecon -ir \ + /boot \ + /dev \ + /etc/*shadow* \ + /etc/X11/xorg.conf.d \ + /etc/blkid.tab* \ + /etc/crypttab \ + /etc/dasd.conf \ + /etc/dhcp/dhclient-*.conf \ + /etc/dnf/modules.d \ + /etc/fstab \ + /etc/group* \ + /etc/hostname \ + /etc/iscsi \ + /etc/localtime \ + /etc/lvm \ + /etc/mdadm.conf \ + /etc/modprobe.conf* \ + /etc/modprobe.d \ + /etc/mtab \ + /etc/passwd* \ + /etc/resolv.conf \ + /etc/rpm/macros \ + /etc/sysconfig \ + /etc/zfcp.conf \ + /etc/zipl.conf \ + /lib64 \ + /root \ + /usr/lib64 \ + /var/cache/yum \ + /var/home \ + /var/lib \ + /var/lock \ + /var/log \ + /var/media \ + /var/mnt \ + /var/opt \ + /var/roothome \ + /var/run \ + /var/spool \ + /var/srv \ %end