fix: correctly quote KVMFR_MODPROBE heredoc and remove virtqemud_t from type enforcement (#2373)

* fix: KVMFR_MODPROBE heredoc is now properly quoted

* fix: remove virtqemud_t from selinux type enforcement
This commit is contained in:
HikariKnight 2025-03-13 12:55:04 +01:00 committed by GitHub
parent 9af59fce13
commit 6a5388af99
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -194,13 +194,13 @@ setup-virtualization ACTION="":
echo "Re-creating dummy kvmfr modprobe file"
sudo rm /etc/modprobe.d/kvmfr.conf
fi
sudo bash -c "cat << KVMFR_MODPROBE > /etc/modprobe.d/kvmfr.conf
sudo bash -c 'cat << KVMFR_MODPROBE > /etc/modprobe.d/kvmfr.conf
# This is a dummy file and changing it does nothing
# If you want to change the kvmfr static_size_mb
# Run "rpm-ostree kargs --replace=kvmfr.static_size_mb=oldvalue=newvalue"
# Default value set by us is 128 which is enough for 4k SDR
# Find the current value by running "rpm-ostree kargs"
KVMFR_MODPROBE"
KVMFR_MODPROBE'
rpm-ostree kargs --append-if-missing="kvmfr.static_size_mb=128"
if [ -f "/etc/udev/rules.d/99-kvmfr.rules" ]; then
echo "Re-creating kvmfr udev rules"
@ -250,9 +250,6 @@ setup-virtualization ACTION="":
#============= svirt_t ==============
allow svirt_t device_t:chr_file { open read write map };
#============= virtqemud_t ==============
allow virtqemud_t device_t:chr_file { read write };
KVMFR_SELINUX"
echo "This is the type enforcement we wrote for SELinux and you can find it in $HOME/.config/selinux_te/kvmfr.te"
echo "#======= start of kvmfr.te ======="