Give non-network runtime fixtures an isolated namespace

This commit is contained in:
ms2k 2026-07-17 14:36:40 +09:00
commit cb6f6dc465

View file

@ -35,7 +35,8 @@ use serde::{Deserialize, Serialize};
use crate::network::{
NetworkAttestationContext, NetworkProbeRequest, PreparedNetwork,
enter_generation_filesystem_namespaces, prepare_network, probe_current_network,
enter_generation_filesystem_namespaces, enter_generation_network_namespace, prepare_network,
probe_current_network,
};
use crate::sandbox::RunscCommand;
@ -684,6 +685,9 @@ fn parse_fixed_hex(value: &OsStr) -> io::Result<[u8; 32]> {
fn run_supervisor(arguments: &RuntimeArguments) -> io::Result<()> {
require_lifetime_held()?;
let namespaces = enter_generation_filesystem_namespaces()?;
if arguments.network.is_none() {
enter_generation_network_namespace()?;
}
let control = std::io::stdout();
let parent = current_process_identity()?;
let mut state_anchor = prepare_state_anchor(arguments, parent, namespaces, &control)?;