Browse Source

fix sandbox dll blocklist

Bill Gianopoulos 1 month ago
parent
commit
5cdd74d370

+ 11 - 9
mozilla-central/patches/9999999-allow-sandbox-null-dll-blocklist-suite.patch.

@@ -1,12 +1,12 @@
 # HG changeset patch
-# User Bill Gianopoulos <wgianopoulos@gmail.com>
-# Date 1725364198 0
-Bug 9999999 - Allow sandbox null dll blocklist if suite.
+# User Matt A. Tobin <email@mattatobin.com>
+# Date 1722343983 0
+No Bug - Unrestrict comm apps and account for them
 
 diff --git a/python/mozbuild/mozbuild/base.py b/python/mozbuild/mozbuild/base.py
 --- a/python/mozbuild/mozbuild/base.py
 +++ b/python/mozbuild/mozbuild/base.py
-@@ -968,16 +968,23 @@ class MachCommandConditions(object):
+@@ -968,16 +968,25 @@ class MachCommandConditions(object):
      @staticmethod
      def is_jsshell(cls):
          """Must have a jsshell build."""
@@ -15,10 +15,12 @@ diff --git a/python/mozbuild/mozbuild/base.py b/python/mozbuild/mozbuild/base.py
          return False
  
      @staticmethod
-+    def is_comm_suite(cls):
-+        """Must have a comm suite build"""
++    def is_other_comm_app(cls):
++        """Must have a non-Thunderbird comm build"""
 +        if hasattr(cls, "substs"):
-+            return cls.substs.get("MOZ_BUILD_APP") == "comm/suite"
++            build_app = cls.substs.get("MOZ_BUILD_APP")
++            if build_app.startswith("comm/") and not MachCommandConditions.is_thunderbird(cls):
++               return True
 +        return False
 +
 +    @staticmethod
@@ -42,7 +44,7 @@ diff --git a/python/mozbuild/mozbuild/base.py b/python/mozbuild/mozbuild/base.py
 -        ) or MachCommandConditions.is_thunderbird(cls)
 +        ) or MachCommandConditions.is_thunderbird(
 +            cls
-+        ) or MachCommandConditions.is_comm_suite(cls)
++        ) or MachCommandConditions.is_other_comm_app(cls)
  
      @staticmethod
      def has_build_or_shell(cls):
@@ -66,7 +68,7 @@ diff --git a/security/sandbox/win/src/sandboxbroker/sandboxBroker.cpp b/security
 -#ifdef MOZ_THUNDERBIRD
 -  // In Thunderbird, mInitDllBlocklistOOP is null, so InitDllBlocklistOOP would
 +#if defined(MOZ_THUNDERBIRD) || defined(MOZ_SUITE)
-+  // In Thunderbird and SeaMonkey, mInitDllBlocklistOOP is null, so InitDllBlocklistOOP would
++  // In Thunderbird and other comm apps, mInitDllBlocklistOOP is null, so InitDllBlocklistOOP would
    // hit MOZ_RELEASE_ASSERT.
 -  constexpr bool isThunderbird = true;
 +  constexpr bool hasNullDllBlocklistOOP = true;