diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2019-11-14 18:56:34 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2019-11-16 09:58:54 +0100 |
| commit | 690740b4a4e1ce9c661ca07fdd14cb2486f04e00 (patch) | |
| tree | 5ce0ababf2c64b623115a0fbd33edfd11ec9b47e /executor/common_linux.h | |
| parent | a6e3054436b5cc7f8c4acbce9841ecb17f699fb1 (diff) | |
executor: refactor sandbox flags
In preparation for future changes.
Diffstat (limited to 'executor/common_linux.h')
| -rw-r--r-- | executor/common_linux.h | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/executor/common_linux.h b/executor/common_linux.h index 4c8e79c4e..cc5c58950 100644 --- a/executor/common_linux.h +++ b/executor/common_linux.h @@ -1912,9 +1912,7 @@ static void reset_ebtables() static void checkpoint_net_namespace(void) { #if SYZ_EXECUTOR - if (!flag_net_reset) - return; - if (flag_sandbox == sandbox_setuid) + if (!flag_net_reset || flag_sandbox_setuid) return; #endif checkpoint_ebtables(); @@ -1926,9 +1924,7 @@ static void checkpoint_net_namespace(void) static void reset_net_namespace(void) { #if SYZ_EXECUTOR - if (!flag_net_reset) - return; - if (flag_sandbox == sandbox_setuid) + if (!flag_net_reset || flag_sandbox_setuid) return; #endif reset_ebtables(); @@ -2539,8 +2535,8 @@ static void syz_setfilecon(const char* path, const char* context) fail("setfilecon: could not set context to %s, currently %s", context, new_context); } -#define SYZ_HAVE_SANDBOX_ANDROID_UNTRUSTED_APP 1 -static int do_sandbox_android_untrusted_app(void) +#define SYZ_HAVE_SANDBOX_ANDROID 1 +static int do_sandbox_android(void) { setup_common(); sandbox_common(); @@ -2564,7 +2560,7 @@ static int do_sandbox_android_untrusted_app(void) initialize_tun(); #endif #if SYZ_EXECUTOR || SYZ_NET_DEVICES - // Note: sandbox_android_untrusted_app does not unshare net namespace. + // Note: sandbox_android does not unshare net namespace. initialize_netdevices_init(); initialize_netdevices(); #endif |
