mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-29 20:24:31 +00: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:
parent
67e82804c5
commit
e9e82ce28b
@ -81,8 +81,8 @@ impl Container {
|
|||||||
let mut inner = self.inner.write().await;
|
let mut inner = self.inner.write().await;
|
||||||
let toml_config = self.resource_manager.config().await;
|
let toml_config = self.resource_manager.config().await;
|
||||||
let config = &self.config;
|
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);
|
let sandbox_pidns = is_pid_namespace_enabled(&spec);
|
||||||
|
amend_spec(&mut spec, toml_config.runtime.disable_guest_seccomp).context("amend spec")?;
|
||||||
|
|
||||||
// handler rootfs
|
// handler rootfs
|
||||||
let rootfs = self
|
let rootfs = self
|
||||||
|
Loading…
Reference in New Issue
Block a user