mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-28 00:07:16 +00:00
rustjail: allow network sysctls
The network ns is shared with the guest skip looking for it in the spec Fixes: #1228 Signed-off-by: Snir Sheriber <ssheribe@redhat.com> Signed-off-by: Peng Tao <bergwolf@hyper.sh>
This commit is contained in:
parent
3306195f66
commit
26f176e2d9
@ -214,16 +214,8 @@ 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 == "".to_string() {
|
||||
continue;
|
||||
}
|
||||
|
||||
check_host_ns(net.as_str())?;
|
||||
// the network ns is shared with the guest, don't expect to find it in spec
|
||||
continue;
|
||||
}
|
||||
|
||||
if contain_namespace(&linux.namespaces, "uts") {
|
||||
|
Loading…
Reference in New Issue
Block a user