From 98f4a9612dd54429b3f92dccf631fdfa4f9018f3 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 17 Sep 2018 11:39:04 +0200 Subject: executor: make sandboxes more modular Currently we have a global fixed set of sandboxes, which makes it hard to add new OS-specific ones (all OSes need to updated to say that they don't support this sandbox). Let it each OS say what sandboxes it supports instead. --- executor/executor.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'executor/executor.cc') diff --git a/executor/executor.cc b/executor/executor.cc index 2244cc797..fca80e9be 100644 --- a/executor/executor.cc +++ b/executor/executor.cc @@ -364,15 +364,21 @@ int main(int argc, char** argv) case sandbox_none: status = do_sandbox_none(); break; +#if SYZ_HAVE_SANDBOX_SETUID case sandbox_setuid: status = do_sandbox_setuid(); break; +#endif +#if SYZ_HAVE_SANDBOX_NAMESPACE case sandbox_namespace: status = do_sandbox_namespace(); break; +#endif +#if SYZ_HAVE_SANDBOX_ANDROID_UNTRUSTED_APP case sandbox_android_untrusted_app: status = do_sandbox_android_untrusted_app(); break; +#endif default: fail("unknown sandbox type"); } -- cgit mrf-deployment