mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-28 19:54:35 +00:00
rustjail: remove the network ns validation against container
Since kata containers shared the network ns with the guest system, thus there's no need to do the network ns check. Fixes: #1047 Signed-off-by: fupan.lfp <fupan.lfp@antfin.com>
This commit is contained in:
parent
a853e8eaca
commit
3b08376c4e
@ -188,19 +188,6 @@ fn sysctl(oci: &Spec) -> Result<()> {
|
||||
}
|
||||
}
|
||||
|
||||
if key.starts_with("net.") {
|
||||
if !contain_namespace(&linux.namespaces, "network") {
|
||||
return Err(anyhow!(nix::Error::from_errno(Errno::EINVAL)));
|
||||
}
|
||||
|
||||
let net = get_namespace_path(&linux.namespaces, "network")?;
|
||||
if net.is_empty() || net == "" {
|
||||
continue;
|
||||
}
|
||||
|
||||
check_host_ns(net.as_str())?;
|
||||
}
|
||||
|
||||
if contain_namespace(&linux.namespaces, "uts") {
|
||||
if key == "kernel.domainname" {
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user