depot/third_party/nixpkgs/pkgs/applications/virtualization/crosvm/default-seccomp-policy-dir.diff
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

15 lines
618 B
Diff

diff --git a/src/crosvm.rs b/src/crosvm.rs
index b7055df..5989c87 100644
--- a/src/crosvm.rs
+++ b/src/crosvm.rs
@@ -141,7 +141,9 @@ impl Default for Config {
x_display: None,
shared_dirs: Vec::new(),
sandbox: !cfg!(feature = "default-no-sandbox"),
- seccomp_policy_dir: PathBuf::from(SECCOMP_POLICY_DIR),
+ seccomp_policy_dir: PathBuf::from(
+ option_env!("DEFAULT_SECCOMP_POLICY_DIR").unwrap_or(SECCOMP_POLICY_DIR),
+ ),
seccomp_log_failures: false,
cras_audio: false,
cras_capture: false,