From 58a4edd294b855057bedb97c302a681f4544c385 Mon Sep 17 00:00:00 2001 From: aszlig Date: Mon, 8 Oct 2012 07:30:16 +0200 Subject: [PATCH] chromium: Drop seccomp patch for version 21. Version 22 is the current version of the stable channel, so we don't need to carry around a patch for earlier versions. Signed-off-by: aszlig --- .../networking/browsers/chromium/default.nix | 4 +--- .../browsers/chromium/enable_seccomp.patch | 22 +++++++++---------- .../browsers/chromium/enable_seccomp22.patch | 20 ----------------- 3 files changed, 12 insertions(+), 34 deletions(-) delete mode 100644 pkgs/applications/networking/browsers/chromium/enable_seccomp22.patch diff --git a/pkgs/applications/networking/browsers/chromium/default.nix b/pkgs/applications/networking/browsers/chromium/default.nix index b3a149c8105..b34e13c920e 100644 --- a/pkgs/applications/networking/browsers/chromium/default.nix +++ b/pkgs/applications/networking/browsers/chromium/default.nix @@ -81,10 +81,8 @@ let ]; maybeSeccompPatch = let - pre22 = versionOlder sourceInfo.version "22.0.0.0"; pre23 = versionOlder sourceInfo.version "23.0.0.0"; - patch = if pre22 then ./enable_seccomp.patch else ./enable_seccomp22.patch; - in optional pre23 patch; + in optional pre23 ./enable_seccomp.patch; maybeBpfTemporaryFix = let patch = fetchurl { diff --git a/pkgs/applications/networking/browsers/chromium/enable_seccomp.patch b/pkgs/applications/networking/browsers/chromium/enable_seccomp.patch index edeee37f19c..f947d796f18 100644 --- a/pkgs/applications/networking/browsers/chromium/enable_seccomp.patch +++ b/pkgs/applications/networking/browsers/chromium/enable_seccomp.patch @@ -1,12 +1,12 @@ -diff --git a/content/common/seccomp_sandbox.h b/content/common/seccomp_sandbox.h -index a07d6f3..a622a35 100644 ---- a/content/common/seccomp_sandbox.h -+++ b/content/common/seccomp_sandbox.h -@@ -29,15 +29,9 @@ static bool SeccompSandboxEnabled() { - // TODO(evan): turn on for release too once we've flushed out all the bugs, - // allowing us to delete this file entirely and just rely on the "disabled" - // switch. --#ifdef NDEBUG +diff --git a/content/common/sandbox_linux.cc b/content/common/sandbox_linux.cc +index d4618e5..108f846 100644 +--- a/content/common/sandbox_linux.cc ++++ b/content/common/sandbox_linux.cc +@@ -38,15 +38,9 @@ void LogSandboxStarted(const std::string& sandbox_name) { + // Implement the command line enabling logic for seccomp-legacy. + bool IsSeccompLegacyDesired() { + #if defined(SECCOMP_SANDBOX) +-#if defined(NDEBUG) - // Off by default; allow turning on with a switch. - return CommandLine::ForCurrentProcess()->HasSwitch( - switches::kEnableSeccompSandbox); @@ -15,6 +15,6 @@ index a07d6f3..a622a35 100644 return !CommandLine::ForCurrentProcess()->HasSwitch( switches::kDisableSeccompSandbox); -#endif // NDEBUG - } #endif // SECCOMP_SANDBOX - + return false; + } diff --git a/pkgs/applications/networking/browsers/chromium/enable_seccomp22.patch b/pkgs/applications/networking/browsers/chromium/enable_seccomp22.patch deleted file mode 100644 index f947d796f18..00000000000 --- a/pkgs/applications/networking/browsers/chromium/enable_seccomp22.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/content/common/sandbox_linux.cc b/content/common/sandbox_linux.cc -index d4618e5..108f846 100644 ---- a/content/common/sandbox_linux.cc -+++ b/content/common/sandbox_linux.cc -@@ -38,15 +38,9 @@ void LogSandboxStarted(const std::string& sandbox_name) { - // Implement the command line enabling logic for seccomp-legacy. - bool IsSeccompLegacyDesired() { - #if defined(SECCOMP_SANDBOX) --#if defined(NDEBUG) -- // Off by default; allow turning on with a switch. -- return CommandLine::ForCurrentProcess()->HasSwitch( -- switches::kEnableSeccompSandbox); --#else - // On by default; allow turning off with a switch. - return !CommandLine::ForCurrentProcess()->HasSwitch( - switches::kDisableSeccompSandbox); --#endif // NDEBUG - #endif // SECCOMP_SANDBOX - return false; - }