Files
cromite/build/patches/Improve-the-browser-sandbox.patch
2024-03-15 16:24:42 +01:00

30 lines
964 B
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
---
sandbox/policy/features.cc | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/sandbox/policy/features.cc b/sandbox/policy/features.cc
--- a/sandbox/policy/features.cc
+++ b/sandbox/policy/features.cc
@@ -201,4 +201,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
--