()
| 160 | } |
| 161 | |
| 162 | fn 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 | |
| 168 | filesystem_policy: |
| 169 | include_workdir: false |
| 170 | |
| 171 | landlock: |
| 172 | compatibility: best_effort |
| 173 | |
| 174 | process: |
| 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 | |
| 183 | async fn seed_volume(volume: &VolumeGuard) -> Result<(), String> { |
| 184 | run_volume_container( |
no outgoing calls
no test coverage detected