mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-14 06:06:12 +00:00
runtime-rs: clear OCI spec namespace path
None of the host namespace paths make sense in the guest. Let's clear them all before sending the spec to the agent. Signed-off-by: Peng Tao <bergwolf@hyper.sh>
This commit is contained in:
parent
62f4603e81
commit
79cf38e6ea
@ -403,7 +403,10 @@ fn amend_spec(spec: &mut oci::Spec, disable_guest_seccomp: bool) -> Result<()> {
|
||||
for n in linux.namespaces.iter() {
|
||||
match n.r#type.as_str() {
|
||||
oci::PIDNAMESPACE | oci::NETWORKNAMESPACE => continue,
|
||||
_ => ns.push(n.clone()),
|
||||
_ => ns.push(oci::LinuxNamespace {
|
||||
r#type: n.r#type.clone(),
|
||||
path: "".to_string(),
|
||||
}),
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user