summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/linux.rs8
-rw-r--r--src/main.rs10
-rw-r--r--src/plugin/mod.rs2
3 files changed, 8 insertions, 12 deletions
diff --git a/src/linux.rs b/src/linux.rs
index 995e2c9..ee659cb 100644
--- a/src/linux.rs
+++ b/src/linux.rs
@@ -237,7 +237,7 @@ fn create_base_minijail(root: &Path, seccomp_policy: &Path) -> Result<Minijail>
 }
 
 fn simple_jail(cfg: &Config, policy: &str) -> Result<Option<Minijail>> {
-    if cfg.multiprocess {
+    if cfg.sandbox {
         let pivot_root: &str = option_env!("DEFAULT_PIVOT_ROOT").unwrap_or("/var/empty");
         // A directory for a jailed device's pivot root.
         let root_path = Path::new(pivot_root);
@@ -496,7 +496,7 @@ fn create_gpu_device(
     let dev = virtio::Gpu::new(
         exit_evt.try_clone().map_err(Error::CloneEventFd)?,
         Some(gpu_socket),
-        if cfg.multiprocess {
+        if cfg.sandbox {
             &jailed_wayland_path
         } else {
             wayland_socket_path
@@ -558,7 +558,7 @@ fn create_wayland_device(
     let jailed_wayland_path = jailed_wayland_dir.join(wayland_socket_name);
 
     let dev = virtio::Wl::new(
-        if cfg.multiprocess {
+        if cfg.sandbox {
             &jailed_wayland_path
         } else {
             socket_path
@@ -1044,7 +1044,7 @@ fn file_to_u64<P: AsRef<Path>>(path: P) -> io::Result<u64> {
 }
 
 pub fn run_config(cfg: Config) -> Result<()> {
-    if cfg.multiprocess {
+    if cfg.sandbox {
         // Printing something to the syslog before entering minijail so that libc's syslogger has a
         // chance to open files necessary for its operation, like `/etc/localtime`. After jailing,
         // access to those files will not be possible.
diff --git a/src/main.rs b/src/main.rs
index 1971e1a..a0cc1c2 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -120,7 +120,7 @@ pub struct Config {
     wayland_socket_path: Option<PathBuf>,
     wayland_dmabuf: bool,
     shared_dirs: Vec<(PathBuf, String)>,
-    multiprocess: bool,
+    sandbox: bool,
     seccomp_policy_dir: PathBuf,
     gpu: bool,
     software_tpm: bool,
@@ -160,7 +160,7 @@ impl Default for Config {
             wayland_socket_path: None,
             wayland_dmabuf: false,
             shared_dirs: Vec::new(),
-            multiprocess: !cfg!(feature = "default-no-sandbox"),
+            sandbox: !cfg!(feature = "default-no-sandbox"),
             seccomp_policy_dir: PathBuf::from(SECCOMP_POLICY_DIR),
             cras_audio: false,
             null_audio: false,
@@ -395,11 +395,8 @@ fn set_argument(cfg: &mut Config, name: &str, value: Option<&str>) -> argument::
             }
             cfg.socket_path = Some(socket_path);
         }
-        "multiprocess" => {
-            cfg.multiprocess = true;
-        }
         "disable-sandbox" => {
-            cfg.multiprocess = false;
+            cfg.sandbox = false;
         }
         "cid" => {
             if cfg.cid.is_some() {
@@ -684,7 +681,6 @@ fn run_vm(args: std::env::Args) -> std::result::Result<(), ()> {
                                 "socket",
                                 "PATH",
                                 "Path to put the control socket. If PATH is a directory, a name will be generated."),
-          Argument::short_flag('u', "multiprocess", "Run each device in a child process(default)."),
           Argument::flag("disable-sandbox", "Run all devices in one, non-sandboxed process."),
           Argument::value("cid", "CID", "Context ID for virtual sockets."),
           Argument::value("shared-dir", "PATH:TAG",
diff --git a/src/plugin/mod.rs b/src/plugin/mod.rs
index b79176e..4ec7a41 100644
--- a/src/plugin/mod.rs
+++ b/src/plugin/mod.rs
@@ -461,7 +461,7 @@ pub fn run_config(cfg: Config) -> Result<()> {
     // quickly.
     let sigchld_fd = SignalFd::new(SIGCHLD).map_err(Error::CreateSignalFd)?;
 
-    let jail = if cfg.multiprocess {
+    let jail = if cfg.sandbox {
         // An empty directory for jailed plugin pivot root.
         let root_path = match cfg.plugin_root {
             Some(ref dir) => Path::new(dir),