mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-27 07:48:55 +00:00
runtime-rs: enable/disable selinux in guest based on disable_guest_selinux
This change technically affects the path for enabled guest selinux as well, however since this is not implemented in runtime-rs anyway nothing should break. When guest selinux support is added this change will come handy. Signed-off-by: Pavel Mores <pmores@redhat.com>
This commit is contained in:
parent
204ee21bc8
commit
8c92f3bfec
@ -176,6 +176,10 @@ impl Kernel {
|
|||||||
kernel_params.append(&mut KernelParams::from_string(
|
kernel_params.append(&mut KernelParams::from_string(
|
||||||
&config.boot_info.kernel_params,
|
&config.boot_info.kernel_params,
|
||||||
));
|
));
|
||||||
|
kernel_params.append(&mut KernelParams::from_string(&format!(
|
||||||
|
"selinux={}",
|
||||||
|
if config.disable_guest_selinux { 0 } else { 1 }
|
||||||
|
)));
|
||||||
|
|
||||||
Ok(Kernel {
|
Ok(Kernel {
|
||||||
path: config.boot_info.kernel.clone(),
|
path: config.boot_info.kernel.clone(),
|
||||||
|
Loading…
Reference in New Issue
Block a user