diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2016-12-02 19:50:27 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-12-02 19:50:27 +0100 |
| commit | ce1cd11efcd29052fda2f9e6d670c286e9c5021e (patch) | |
| tree | aa668a878fc78da2b1e5cb000fedfc3f3f89f5bd /executor/executor.cc | |
| parent | 3e53602346688d61fe5ea3a6fab6939a9d863d8f (diff) | |
| parent | 346fb4e5e977a0f0709a4fcdf9265f163fe32459 (diff) | |
Merge pull request #101 from xairy/tun-fix
executor: don't try to open tun if it's not enabled
Diffstat (limited to 'executor/executor.cc')
| -rw-r--r-- | executor/executor.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/executor/executor.cc b/executor/executor.cc index 85133fa3d..a51bd2e46 100644 --- a/executor/executor.cc +++ b/executor/executor.cc @@ -73,6 +73,7 @@ bool flag_collide; bool flag_deduplicate; bool flag_sandbox_privs; sandbox_type flag_sandbox; +bool flag_enable_tun; __attribute__((aligned(64 << 10))) char input_data[kMaxInput]; __attribute__((aligned(64 << 10))) char output_data[kMaxOutput]; @@ -161,10 +162,11 @@ int main(int argc, char** argv) flag_sandbox = sandbox_namespace; if (!flag_threaded) flag_collide = false; + flag_enable_tun = flags & (1 << 7); uint64_t executor_pid = *((uint64_t*)input_data + 1); cover_open(); - setup_main_process(executor_pid); + setup_main_process(executor_pid, flag_enable_tun); int pid = -1; switch (flag_sandbox) { |
