Fix rootless launches with subordinate ID maps

Resolve and verify canonical caller subordinate ranges, launch preparation and runtime workers through mapped causal acquisition, and keep runsc in the existing user namespace. Repair descriptor-relative OCI cleanup and absent-mount recovery so failed launches can progress to the corrected path.
This commit is contained in:
ms2k 2026-07-19 19:51:47 +09:00
commit 73e3e9fdee

View file

@ -13,6 +13,7 @@ use lazaret_state_anchor::{
};
use crate::client_bootstrap::dispatch_private_client_bootstrap;
use crate::prepared_worker::{PRIVATE_PREPARED_WORKER_ROLE, dispatch_private_prepared_worker};
use crate::sandbox_init::{
PRIVATE_SANDBOX_INIT_ROLE, PRIVATE_SESSION_EXEC_ROLE, PRIVATE_SESSION_IDENTITY_ROLE,
dispatch_private_sandbox_init,
@ -42,8 +43,12 @@ fn dispatch_exact(role: &str, arguments: &[OsString]) -> Option<io::Result<()>>
})
}
static ROLES: [PrivateRole; 8] = [
static ROLES: [PrivateRole; 9] = [
PrivateRole::new(PRIVATE_CLIENT_BOOTSTRAP_ROLE, client_bootstrap),
PrivateRole::new(
PRIVATE_PREPARED_WORKER_ROLE,
dispatch_private_prepared_worker,
),
PrivateRole::new(PRIVATE_SANDBOX_INIT_ROLE, sandbox_init),
PrivateRole::new(PRIVATE_SESSION_EXEC_ROLE, session_exec),
PrivateRole::new(PRIVATE_SESSION_IDENTITY_ROLE, session_identity),
@ -68,6 +73,7 @@ mod tests {
REGISTRY.names(),
[
PRIVATE_CLIENT_BOOTSTRAP_ROLE,
PRIVATE_PREPARED_WORKER_ROLE,
PRIVATE_SANDBOX_INIT_ROLE,
PRIVATE_SESSION_EXEC_ROLE,
PRIVATE_SESSION_IDENTITY_ROLE,