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

@ -90,10 +90,22 @@ impl Catalog {
.open_authority()
.map_err(|error| CatalogError::Io(io::Error::other(error.to_string())))?,
);
let identity = mount_identity(&root).map_err(CatalogError::Io)?;
let root_label = PathBuf::from(std::ffi::OsString::from_vec(
storage_root.canonical_label().as_bytes().to_vec(),
));
Self::under_storage_root_authority(root, root_label)
}
/// Binds catalog access to an exact inherited Storage Root descriptor and label.
///
/// # Errors
/// Refuses a label that no longer names the inherited mount identity.
pub fn under_storage_root_authority(
root: File,
root_label: PathBuf,
) -> Result<Self, CatalogError> {
let identity = mount_identity(&root).map_err(CatalogError::Io)?;
require_mount_identity(&root_label, identity).map_err(CatalogError::Io)?;
Ok(Self {
location: CatalogLocation::StorageRoot(Arc::new(StorageRootCatalog {
root,