MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / write_bind_mount_policy

Function write_bind_mount_policy

e2e/rust/tests/driver_config_volume.rs:162–181  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

160}
161
162fn write_bind_mount_policy() -> Result<tempfile::NamedTempFile, String> {
163 let mut file =
164 tempfile::NamedTempFile::new().map_err(|err| format!("create bind policy: {err}"))?;
165 file.write_all(
166 br"version: 1
167
168filesystem_policy:
169 include_workdir: false
170
171landlock:
172 compatibility: best_effort
173
174process:
175 run_as_user: sandbox
176 run_as_group: sandbox
177",
178 )
179 .map_err(|err| format!("write bind policy: {err}"))?;
180 Ok(file)
181}
182
183async fn seed_volume(volume: &VolumeGuard) -> Result<(), String> {
184 run_volume_container(

Calls

no outgoing calls

Tested by

no test coverage detected