aboutsummaryrefslogtreecommitdiff
path: root/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_network_network__sandbox__hook__linux.cc
blob: ea09515f23531b94b4821ad4001d1ed86efe9d2c (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
24
25
26
--- src/3rdparty/chromium/services/network/network_sandbox_hook_linux.cc.orig	2022-03-19 12:56:15 UTC
+++ src/3rdparty/chromium/services/network/network_sandbox_hook_linux.cc
@@ -26,12 +26,15 @@ sandbox::syscall_broker::BrokerCommandSet GetNetworkBr
   });
 }
 
+#if !defined(OS_BSD)
 std::vector<BrokerFilePermission> GetNetworkFilePermissions() {
   // TODO(tsepez): remove universal permission under filesystem root.
   return {BrokerFilePermission::ReadWriteCreateRecursive("/")};
 }
+#endif
 
 bool NetworkPreSandboxHook(sandbox::policy::SandboxLinux::Options options) {
+#if !defined(OS_BSD)
   auto* instance = sandbox::policy::SandboxLinux::GetInstance();
 
   instance->StartBrokerProcess(
@@ -39,6 +42,7 @@ bool NetworkPreSandboxHook(sandbox::policy::SandboxLin
       sandbox::policy::SandboxLinux::PreSandboxHook(), options);
 
   instance->EngageNamespaceSandboxIfPossible();
+#endif
   return true;
 }