aboutsummaryrefslogtreecommitdiff
path: root/www/chromium/files/patch-content_renderer_renderer__main__platform__delegate__linux.cc
blob: 43c2b524d5cece288875636a6201b18f32aeef07 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--- content/renderer/renderer_main_platform_delegate_linux.cc.orig	2021-06-09 22:14:02 UTC
+++ content/renderer/renderer_main_platform_delegate_linux.cc
@@ -30,6 +30,11 @@ void RendererMainPlatformDelegate::PlatformUninitializ
 }
 
 bool RendererMainPlatformDelegate::EnableSandbox() {
+#if defined(OS_FREEBSD)
+  sandbox::policy::Sandbox::Initialize(
+      sandbox::policy::SandboxTypeFromCommandLine(
+          *base::CommandLine::ForCurrentProcess()));
+#else
   // The setuid sandbox is started in the zygote process: zygote_main_linux.cc
   // https://chromium.googlesource.com/chromium/src/+/master/docs/linux/suid_sandbox.md
   //
@@ -65,7 +70,7 @@ bool RendererMainPlatformDelegate::EnableSandbox() {
     CHECK_EQ(errno, EPERM);
   }
 #endif  // __x86_64__
-
+#endif  // OS_FREEBSD
   return true;
 }