Merge pull request #1139 from lifupan/skip_networkcheck

rustjail: remove the network ns validation against container
This commit is contained in:
Bin Liu 2020-11-25 15:03:18 +08:00 committed by GitHub
commit 8d19b8e013
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;