--- prepare 2023-09-17 11:53:42.054620477 +0200 +++ prepare-fedora 2023-09-17 12:13:49.007243976 +0200 @@ -1757,6 +1757,16 @@ msg2 "Setting config" make ${_config_updating} ${llvm_opt} |& tee -a "$_where"/logs/prepare.log.txt + # Modify the config file to fit Fedora SELinux configuration + if [ "$_distro" = "Fedora" ]; then + msg2 "SELinux activation for Fedora" + sed -i 's/# CONFIG_AUDIT is not set/CONFIG_AUDIT=y/' .config + sed -i 's/# CONFIG_SECURITY_SELINUX is not set/CONFIG_SECURITY_SELINUX=y/' .config + sed -i 's/# CONFIG_DEFAULT_SECURITY_SELINUX is not set/CONFIG_DEFAULT_SECURITY_SELINUX=y/' .config + sed -i 's/CONFIG_DEFAULT_SECURITY_DAC=y/# CONFIG_DEFAULT_SECURITY_DAC is not set/' .config + sed -i 's/.*CONFIG_LSM=".*/CONFIG_LSM="lockdown,yama,integrity,selinux,bpf,landlock"/' .config + fi + # menuconfig / nconfig if [ -z "$_menunconfig" ]; then plain ""