mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-18 06:44:23 +01:00
runtime-rs: fix is_pid_namespace_enabled check
We should test is_pid_namespace_enabled before amending the container spec, where the pid namespace path is cleared and resulting sandbox_pidns to always being false. Fixes: #5881 Signed-off-by: Peng Tao <bergwolf@hyper.sh>
This commit is contained in:
@@ -81,8 +81,8 @@ impl Container {
|
||||
let mut inner = self.inner.write().await;
|
||||
let toml_config = self.resource_manager.config().await;
|
||||
let config = &self.config;
|
||||
amend_spec(&mut spec, toml_config.runtime.disable_guest_seccomp).context("amend spec")?;
|
||||
let sandbox_pidns = is_pid_namespace_enabled(&spec);
|
||||
amend_spec(&mut spec, toml_config.runtime.disable_guest_seccomp).context("amend spec")?;
|
||||
|
||||
// handler rootfs
|
||||
let rootfs = self
|
||||
|
||||
Reference in New Issue
Block a user