diff options
author | Jingkui Wang <jkwang@google.com> | 2018-11-08 10:47:42 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-12-25 17:55:07 -0800 |
commit | f6752e7927b3a40f01d45eb4e81ded3a63682fd0 (patch) | |
tree | a4db47caac849a5856de83bb6a354e3da775c9d8 /devices/src/proxy.rs | |
parent | 7df5a0ef1a23542b0cc7db7797b8b287eaa05699 (diff) | |
download | crosvm-f6752e7927b3a40f01d45eb4e81ded3a63682fd0.tar crosvm-f6752e7927b3a40f01d45eb4e81ded3a63682fd0.tar.gz crosvm-f6752e7927b3a40f01d45eb4e81ded3a63682fd0.tar.bz2 crosvm-f6752e7927b3a40f01d45eb4e81ded3a63682fd0.tar.lz crosvm-f6752e7927b3a40f01d45eb4e81ded3a63682fd0.tar.xz crosvm-f6752e7927b3a40f01d45eb4e81ded3a63682fd0.tar.zst crosvm-f6752e7927b3a40f01d45eb4e81ded3a63682fd0.zip |
devices: add on_sandboxed
On sandboxed will be invoked when the device is sandboxed. Device implementation could do initialization here. It does not need to return fd opened here to keep fds. BUG=None TEST=local build and run Change-Id: I42c2b3cae3a87dd54f02e77b8cd10766309a0770 Reviewed-on: https://chromium-review.googlesource.com/1327513 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Jingkui Wang <jkwang@google.com> Reviewed-by: David Tolnay <dtolnay@chromium.org> Reviewed-by: Zach Reizner <zachr@chromium.org>
Diffstat (limited to 'devices/src/proxy.rs')
-rw-r--r-- | devices/src/proxy.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/devices/src/proxy.rs b/devices/src/proxy.rs index 5867e58..0b60736 100644 --- a/devices/src/proxy.rs +++ b/devices/src/proxy.rs @@ -143,6 +143,7 @@ impl ProxyDevice { let pid = unsafe { match jail.fork(Some(&keep_fds)).map_err(Error::ForkingJail)? { 0 => { + device.on_sandboxed(); child_proc(child_sock, &mut device); // ! Never returns process::exit(0); |