Skip to content

Commit 100f11f

Browse files
committed
fix(process): gate runtime CA helpers on Linux
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
1 parent 31a5e26 commit 100f11f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎crates/openshell-supervisor-process/src/process.rs‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ pub(crate) fn prepare_child_sandbox(
163163
Ok(Some(prepared))
164164
}
165165

166+
#[cfg(target_os = "linux")]
166167
fn policy_with_runtime_read_only(
167168
policy: &SandboxPolicy,
168169
runtime_read_only: &[PathBuf],
@@ -176,6 +177,7 @@ fn policy_with_runtime_read_only(
176177
effective_policy
177178
}
178179

180+
#[cfg(target_os = "linux")]
179181
pub(crate) fn ca_runtime_read_only_paths(ca_paths: Option<&(PathBuf, PathBuf)>) -> Vec<PathBuf> {
180182
let Some((certificate, bundle)) = ca_paths else {
181183
return Vec::new();
@@ -3495,6 +3497,7 @@ mod tests {
34953497
}
34963498
}
34973499

3500+
#[cfg(target_os = "linux")]
34983501
#[test]
34993502
fn runtime_ca_paths_are_added_to_the_effective_read_only_policy() {
35003503
let mut policy = policy_with_process(ProcessPolicy::default());

0 commit comments

Comments
 (0)