pub async fn inject_9p_socket(
mount: Arc<dyn Mount>,
subject: Subject,
decider: Arc<dyn AccessDecider>,
monitor: Option<Arc<ReferenceMonitor>>,
workload_dir: &Path,
guest_cfg: &WanixGuestConfig,
) -> Result<WanixInjection>Expand description
Allocate a per-workload UDS, serve mount (scoped to subject) as 9P over
it, and build the sandbox injection annotations (#506 deliverable 3, steps
a/b/c). See the module docs for the full contract.
The [UnixListener] is bound synchronously before the serve task is spawned,
so the socket file exists on return — the bind-mount at sandbox start never
races the server coming up.
This is the mechanical injection; the capability gate is
prepare_wanix_workload (or call
require_9p_socket_capability first).