fedora-selinux / selinux-policy-contrib

Fedora Policy Contributions
39 stars 66 forks source link

Label /var/lib/kdump with kdump_var_lib_t #400

Closed zpytela closed 3 years ago

zpytela commented 3 years ago

The kexec-tools usually create initramfs-KERNELVERSIONkdump.img in /boot. On some operating systems, the /boot directory can be read-only, preventing the image file from being created. In newer kexec-tools package versions, the image files are created in /var/lib/kdump in case /boot is read-only.

The kdump_manage_lib_files() interface was created and rpm_script_t allowed to manage /var/lib/kdump files. This is needed when the /lib/kernel/install.d/60-kdump.install kernel install hook is triggered to delete unused images.

Resolves: rhbz#1951323

zpytela commented 3 years ago

Merging a cherry-picked commit.