Replace lexical Rust fragments with real modules
This commit is contained in:
parent
f8849cdb5f
commit
247819250b
1 changed files with 3302 additions and 2671 deletions
|
|
@ -24,6 +24,20 @@ use oci_spec::runtime::{
|
|||
use rustix::fs::{AtFlags, FileType, Mode, OFlags, ResolveFlags, StatxFlags, openat2, statx};
|
||||
use sha2::{Digest, Sha256};
|
||||
|
||||
use mounts::{bind_mount, control_mounts, standard_mounts};
|
||||
use runtime_sources::{
|
||||
build_linux, build_mounts, build_process, build_runsc_command, descriptor_identity,
|
||||
handoff_runtime_sources, open_absolute_directory, open_runtime_source, require_exact_bytes,
|
||||
runtime_paths,
|
||||
};
|
||||
use validation::{
|
||||
changed_authority_at, changed_configuration_authority, confined_resolve_flags, hex_lower,
|
||||
host_path, oci_error, open_or_create_staging_directory, read_descriptor,
|
||||
require_network_namespace, require_staged_file, stage_exact_file, staging_error,
|
||||
validate_absolute_normalized, validate_compiled_terminfo, validate_sandbox_executable,
|
||||
validate_terminal_name,
|
||||
};
|
||||
|
||||
pub const NETWORK_NAMESPACE_PATH: &str = "/proc/self/ns/net";
|
||||
|
||||
const OCI_VERSION: &str = "1.2.1";
|
||||
|
|
@ -700,6 +714,6 @@ fn build_sandbox_bundle_from_source(
|
|||
})
|
||||
}
|
||||
|
||||
include!("sandbox/runtime_sources.rs");
|
||||
include!("sandbox/mounts.rs");
|
||||
include!("sandbox/validation.rs");
|
||||
mod mounts;
|
||||
mod runtime_sources;
|
||||
mod validation;
|
||||
|
|
|
|||
Loading…
Reference in a new issue