summaryrefslogtreecommitdiffstats
path: root/toolkit
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-05-03 01:24:31 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-05-03 01:24:31 +0200
commit4613b91ecac2745252c40be64e73de5ff920b02b (patch)
tree26b0aa50bb4d580b156ab2eb9825707a17f51e99 /toolkit
parente1490c07e29f5e4715f73088b7ca7aab4ada90a6 (diff)
downloadUXP-4613b91ecac2745252c40be64e73de5ff920b02b.tar
UXP-4613b91ecac2745252c40be64e73de5ff920b02b.tar.gz
UXP-4613b91ecac2745252c40be64e73de5ff920b02b.tar.lz
UXP-4613b91ecac2745252c40be64e73de5ff920b02b.tar.xz
UXP-4613b91ecac2745252c40be64e73de5ff920b02b.zip
Remove sandbox ductwork conditional code.
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/content/aboutSupport.js21
-rw-r--r--toolkit/content/aboutSupport.xhtml14
-rw-r--r--toolkit/locales/en-US/chrome/global/aboutSupport.dtd2
-rw-r--r--toolkit/modules/AppConstants.jsm7
-rw-r--r--toolkit/modules/Troubleshoot.jsm20
-rw-r--r--toolkit/toolkit.mozbuild6
-rw-r--r--toolkit/xre/moz.build6
-rw-r--r--toolkit/xre/nsAppRunner.cpp42
-rw-r--r--toolkit/xre/nsEmbedFunctions.cpp16
9 files changed, 2 insertions, 132 deletions
diff --git a/toolkit/content/aboutSupport.js b/toolkit/content/aboutSupport.js
index e9087dfcb..7209b7ad0 100644
--- a/toolkit/content/aboutSupport.js
+++ b/toolkit/content/aboutSupport.js
@@ -497,26 +497,7 @@ var snapshotFormatters = {
$("prefs-user-js-section").style.display = "";
// Clear the no-copy class
$("prefs-user-js-section").className = "";
- },
-
- sandbox: function sandbox(data) {
- if (!AppConstants.MOZ_SANDBOX)
- return;
-
- let strings = stringBundle();
- let tbody = $("sandbox-tbody");
- for (let key in data) {
- // Simplify the display a little in the common case.
- if (key === "hasPrivilegedUserNamespaces" &&
- data[key] === data["hasUserNamespaces"]) {
- continue;
- }
- tbody.appendChild($.new("tr", [
- $.new("th", strings.GetStringFromName(key), "column"),
- $.new("td", data[key])
- ]));
- }
- },
+ }
};
var $ = document.getElementById.bind(document);
diff --git a/toolkit/content/aboutSupport.xhtml b/toolkit/content/aboutSupport.xhtml
index 9574365a3..a92dcfb4a 100644
--- a/toolkit/content/aboutSupport.xhtml
+++ b/toolkit/content/aboutSupport.xhtml
@@ -475,20 +475,6 @@
</tbody>
</table>
-
- <!-- - - - - - - - - - - - - - - - - - - - - -->
-
-#if defined(MOZ_SANDBOX)
- <h2 class="major-section" id="sandbox">
- &aboutSupport.sandboxTitle;
- </h2>
-
- <table>
- <tbody id="sandbox-tbody">
- </tbody>
- </table>
-#endif
-
</div>
</body>
diff --git a/toolkit/locales/en-US/chrome/global/aboutSupport.dtd b/toolkit/locales/en-US/chrome/global/aboutSupport.dtd
index 9f64ef0f1..8459300c5 100644
--- a/toolkit/locales/en-US/chrome/global/aboutSupport.dtd
+++ b/toolkit/locales/en-US/chrome/global/aboutSupport.dtd
@@ -109,8 +109,6 @@ variant of aboutSupport.showDir.label. -->
<!ENTITY aboutSupport.copyTextToClipboard.label "Copy text to clipboard">
<!ENTITY aboutSupport.copyRawDataToClipboard.label "Copy raw data to clipboard">
-<!ENTITY aboutSupport.sandboxTitle "Sandbox">
-
<!ENTITY aboutSupport.safeModeTitle "Try Safe Mode">
<!ENTITY aboutSupport.restartInSafeMode.label "Restart with Add-ons Disabled…">
diff --git a/toolkit/modules/AppConstants.jsm b/toolkit/modules/AppConstants.jsm
index 405f23de8..b4201ec67 100644
--- a/toolkit/modules/AppConstants.jsm
+++ b/toolkit/modules/AppConstants.jsm
@@ -81,13 +81,6 @@ this.AppConstants = Object.freeze({
false,
#endif
- MOZ_SANDBOX:
-#ifdef MOZ_SANDBOX
- true,
-#else
- false,
-#endif
-
MOZ_TELEMETRY_REPORTING:
#ifdef MOZ_TELEMETRY_REPORTING
true,
diff --git a/toolkit/modules/Troubleshoot.jsm b/toolkit/modules/Troubleshoot.jsm
index 743a9c419..e11d47774 100644
--- a/toolkit/modules/Troubleshoot.jsm
+++ b/toolkit/modules/Troubleshoot.jsm
@@ -530,23 +530,3 @@ var dataProviders = {
}
};
-if (AppConstants.MOZ_SANDBOX) {
- dataProviders.sandbox = function sandbox(done) {
- let data = {};
- if (AppConstants.platform == "linux") {
- const keys = ["hasSeccompBPF", "hasSeccompTSync",
- "hasPrivilegedUserNamespaces", "hasUserNamespaces",
- "canSandboxContent", "canSandboxMedia"];
-
- let sysInfo = Cc["@mozilla.org/system-info;1"].
- getService(Ci.nsIPropertyBag2);
- for (let key of keys) {
- if (sysInfo.hasKey(key)) {
- data[key] = sysInfo.getPropertyAsBool(key);
- }
- }
- }
-
- done(data);
- }
-}
diff --git a/toolkit/toolkit.mozbuild b/toolkit/toolkit.mozbuild
index b06c58162..b67b49157 100644
--- a/toolkit/toolkit.mozbuild
+++ b/toolkit/toolkit.mozbuild
@@ -4,12 +4,8 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-if CONFIG['MOZ_SANDBOX']:
- DIRS += ['/security/sandbox']
-
DIRS += [
- # Depends on NSS and NSPR, and must be built after sandbox or else B2G emulator
- # builds fail.
+ # Depends on NSS and NSPR
'/security/certverifier',
# Depends on certverifier
'/security/apps',
diff --git a/toolkit/xre/moz.build b/toolkit/xre/moz.build
index 7ada19d41..55b59ca83 100644
--- a/toolkit/xre/moz.build
+++ b/toolkit/xre/moz.build
@@ -149,12 +149,6 @@ LOCAL_INCLUDES += [
'/xpcom/build',
]
-if CONFIG['MOZ_SANDBOX'] and CONFIG['OS_ARCH'] == 'WINNT':
- LOCAL_INCLUDES += [
- '/security/sandbox/chromium',
- '/security/sandbox/chromium-shim',
- ]
-
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
LOCAL_INCLUDES += [
'/widget',
diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp
index ddba0de61..2050b9671 100644
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -193,14 +193,6 @@
#include "GeneratedJNIWrappers.h"
#endif
-#if defined(MOZ_SANDBOX)
-#if defined(XP_LINUX) && !defined(ANDROID)
-#include "mozilla/SandboxInfo.h"
-#elif defined(XP_WIN)
-#include "SandboxBroker.h"
-#endif
-#endif
-
extern uint32_t gRestartMode;
extern void InstallSignalHandlers(const char *ProgramName);
@@ -2948,18 +2940,6 @@ XREMain::XRE_mainInit(bool* aExitFlag)
if (NS_FAILED(rv))
return 1;
-#if defined(MOZ_SANDBOX) && defined(XP_WIN)
- if (mAppData->sandboxBrokerServices) {
- SandboxBroker::Initialize(mAppData->sandboxBrokerServices);
- Telemetry::Accumulate(Telemetry::SANDBOX_BROKER_INITIALIZED, true);
- } else {
- Telemetry::Accumulate(Telemetry::SANDBOX_BROKER_INITIALIZED, false);
- // Otherwise just warn for the moment, as most things will work.
- NS_WARNING("Failed to initialize broker services, sandboxed processes will "
- "fail to start.");
- }
-#endif
-
#ifdef XP_MACOSX
// Set up ability to respond to system (Apple) events. This must occur before
// ProcessUpdates to ensure that links clicked in external applications aren't
@@ -3902,24 +3882,6 @@ XREMain::XRE_mainRun()
}
#endif /* MOZ_INSTRUMENT_EVENT_LOOP */
-#if defined(MOZ_SANDBOX) && defined(XP_LINUX) && !defined(MOZ_WIDGET_GONK)
- // If we're on Linux, we now have information about the OS capabilities
- // available to us.
- SandboxInfo sandboxInfo = SandboxInfo::Get();
- Telemetry::Accumulate(Telemetry::SANDBOX_HAS_SECCOMP_BPF,
- sandboxInfo.Test(SandboxInfo::kHasSeccompBPF));
- Telemetry::Accumulate(Telemetry::SANDBOX_HAS_SECCOMP_TSYNC,
- sandboxInfo.Test(SandboxInfo::kHasSeccompTSync));
- Telemetry::Accumulate(Telemetry::SANDBOX_HAS_USER_NAMESPACES_PRIVILEGED,
- sandboxInfo.Test(SandboxInfo::kHasPrivilegedUserNamespaces));
- Telemetry::Accumulate(Telemetry::SANDBOX_HAS_USER_NAMESPACES,
- sandboxInfo.Test(SandboxInfo::kHasUserNamespaces));
- Telemetry::Accumulate(Telemetry::SANDBOX_CONTENT_ENABLED,
- sandboxInfo.Test(SandboxInfo::kEnabledForContent));
- Telemetry::Accumulate(Telemetry::SANDBOX_MEDIA_ENABLED,
- sandboxInfo.Test(SandboxInfo::kEnabledForMedia));
-#endif /* MOZ_SANDBOX && XP_LINUX && !MOZ_WIDGET_GONK */
-
{
rv = appStartup->Run();
if (NS_FAILED(rv)) {
@@ -3985,10 +3947,6 @@ XREMain::XRE_main(int argc, char* argv[], const nsXREAppData* aAppData)
// See bug 1279614.
XRE_CreateStatsObject();
-#if defined(MOZ_SANDBOX) && defined(XP_LINUX) && !defined(ANDROID)
- SandboxInfo::ThreadingCheck();
-#endif
-
char aLocal;
GeckoProfilerInitRAII profilerGuard(&aLocal);
diff --git a/toolkit/xre/nsEmbedFunctions.cpp b/toolkit/xre/nsEmbedFunctions.cpp
index 5f5dda939..a59299c8b 100644
--- a/toolkit/xre/nsEmbedFunctions.cpp
+++ b/toolkit/xre/nsEmbedFunctions.cpp
@@ -75,11 +75,6 @@
#include "mozilla/Telemetry.h"
-#if defined(MOZ_SANDBOX) && defined(XP_WIN)
-#include "mozilla/sandboxTarget.h"
-#include "mozilla/sandboxing/loggingCallbacks.h"
-#endif
-
#ifdef MOZ_IPDL_TESTS
#include "mozilla/_ipdltest/IPDLUnitTests.h"
#include "mozilla/_ipdltest/IPDLUnitTestProcessChild.h"
@@ -295,11 +290,6 @@ XRE_InitChildProcess(int aArgc,
freopen("CONIN$", "r", stdin);
}
-#if defined(MOZ_SANDBOX)
- if (aChildData->sandboxTargetServices) {
- SandboxTarget::Instance()->SetTargetServices(aChildData->sandboxTargetServices);
- }
-#endif
#endif
// NB: This must be called before profiler_init
@@ -565,12 +555,6 @@ XRE_InitChildProcess(int aArgc,
::SetProcessShutdownParameters(0x280 - 1, SHUTDOWN_NORETRY);
#endif
-#if defined(MOZ_SANDBOX) && defined(XP_WIN)
- // We need to do this after the process has been initialised, as
- // InitLoggingIfRequired may need access to prefs.
- mozilla::sandboxing::InitLoggingIfRequired(aChildData->ProvideLogFunction);
-#endif
-
OverrideDefaultLocaleIfNeeded();
// Run the UI event loop on the main thread.