From 4b2655c8d9a9ef71865ab6693be860ceac907765 Mon Sep 17 00:00:00 2001 From: Julian Hector Date: Fri, 13 Nov 2015 12:29:47 +0000 Subject: [PATCH] Bug 1215303 - Part 2 - automatically enable broker when in permissive mode r=jld --- .../sandbox/linux/broker/SandboxBrokerPolicyFactory.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/security/sandbox/linux/broker/SandboxBrokerPolicyFactory.cpp b/security/sandbox/linux/broker/SandboxBrokerPolicyFactory.cpp index 7b51f0f87101..e513e5cbf526 100644 --- a/security/sandbox/linux/broker/SandboxBrokerPolicyFactory.cpp +++ b/security/sandbox/linux/broker/SandboxBrokerPolicyFactory.cpp @@ -5,6 +5,7 @@ * You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "SandboxBrokerPolicyFactory.h" +#include "SandboxInfo.h" #include "mozilla/ClearOnShutdown.h" #include "mozilla/Preferences.h" @@ -29,6 +30,12 @@ SandboxBrokerPolicyFactory::IsSystemSupported() { if (length > 0 && strcmp(hardware, "goldfish") == 0) { return true; } + + // When broker is running in permissive mode, we enable it + // automatically regardless of the device. + if (SandboxInfo::Get().Test(SandboxInfo::kPermissive)) { + return true; + } #endif return false; }