Own the patched runsc artifact and bind recovery identity
This commit is contained in:
parent
c474fa4a23
commit
2c420012bd
1 changed files with 1967 additions and 130 deletions
|
|
@ -40,6 +40,13 @@ use validation::{
|
|||
};
|
||||
|
||||
pub const NETWORK_NAMESPACE_PATH: &str = "/proc/self/ns/net";
|
||||
pub const RUNSC_BUILD_ID: &str = "904ab3c9bd4c99a27181076f2c9ea2fecc041db5a728c999540d6664174d2cd4";
|
||||
pub const RUNSC_BUILD_ID_BYTES: [u8; 32] = [
|
||||
144, 74, 179, 201, 189, 76, 153, 162, 113, 129, 7, 111, 44, 158, 162, 254, 204, 4, 29, 181,
|
||||
167, 40, 201, 153, 84, 13, 102, 100, 23, 77, 44, 212,
|
||||
];
|
||||
pub const RUNSC_EXECUTABLE_NAME: &str =
|
||||
"lazaret-runsc-904ab3c9bd4c99a27181076f2c9ea2fecc041db5a728c999540d6664174d2cd4";
|
||||
pub const DOMAIN_OPEN_FILE_LIMIT: u64 = 524_288;
|
||||
|
||||
const OCI_VERSION: &str = "1.2.1";
|
||||
|
|
@ -445,6 +452,7 @@ pub fn stage_host_terminal(
|
|||
|
||||
pub struct SandboxBuildRequest<'a> {
|
||||
pub configuration: &'a ResolvedDomainConfiguration,
|
||||
pub runsc_program: &'a Path,
|
||||
pub container_id: ContainerId,
|
||||
pub expected_network_namespace: NamespaceIdentity,
|
||||
pub root_process: RootProcess,
|
||||
|
|
@ -647,6 +655,7 @@ fn build_sandbox_bundle_from_source(
|
|||
request: SandboxBuildRequest<'_>,
|
||||
workspace_source: PathBuf,
|
||||
) -> Result<SandboxBundle, SandboxBuildError> {
|
||||
validate_absolute_normalized(request.runsc_program)?;
|
||||
require_network_namespace(request.expected_network_namespace)?;
|
||||
request
|
||||
.configuration
|
||||
|
|
@ -694,6 +703,7 @@ fn build_sandbox_bundle_from_source(
|
|||
let specification_json = canonical_specification_json(&specification)?;
|
||||
let bundle_authorization = Sha256::digest(&specification_json).into();
|
||||
let command = build_runsc_command(
|
||||
request.runsc_program,
|
||||
&paths,
|
||||
request.configuration.runsc_dcache(),
|
||||
bundle_authorization,
|
||||
|
|
|
|||
Loading…
Reference in a new issue