Files
cromite/build/patches/Improve-the-browser-sandbox.patch
2024-05-11 12:28:55 +02:00

38 lines
1.5 KiB
Diff

From: uazo <uazo@users.noreply.github.com>
Date: Fri, 17 Feb 2023 16:23:20 +0000
Subject: Improve the browser sandbox
by enabling network service sandbox and CIG in windows and
using the new flags on android
License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
---
.../common/features_cc/Improve-the-browser-sandbox.inc | 1 +
sandbox/policy/features.cc | 8 ++++++++
2 files changed, 9 insertions(+)
create mode 100644 cromite_flags/third_party/blink/common/features_cc/Improve-the-browser-sandbox.inc
diff --git a/cromite_flags/third_party/blink/common/features_cc/Improve-the-browser-sandbox.inc b/cromite_flags/third_party/blink/common/features_cc/Improve-the-browser-sandbox.inc
new file mode 100644
--- /dev/null
+++ b/cromite_flags/third_party/blink/common/features_cc/Improve-the-browser-sandbox.inc
@@ -0,0 +1 @@
+SET_CROMITE_FEATURE_ENABLED(kEnableMojoJSProtectedMemory);
diff --git a/sandbox/policy/features.cc b/sandbox/policy/features.cc
--- a/sandbox/policy/features.cc
+++ b/sandbox/policy/features.cc
@@ -215,4 +215,12 @@ bool IsNetworkSandboxEnabled() {
#endif // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA)
}
+#if BUILDFLAG(IS_ANDROID)
+SET_CROMITE_FEATURE_ENABLED(kUseRendererProcessPolicy);
+SET_CROMITE_FEATURE_ENABLED(kRestrictRendererPoliciesInBaseline);
+#endif
+#if BUILDFLAG(IS_WIN)
+SET_CROMITE_FEATURE_ENABLED(kNetworkServiceSandbox);
+SET_CROMITE_FEATURE_ENABLED(kNetworkServiceCodeIntegrity);
+#endif
} // namespace sandbox::policy::features
--