aboutsummaryrefslogtreecommitdiff
path: root/www/qt6-webengine/files/patch-src_3rdparty_chromium_services_audio_audio__sandbox__hook__linux.cc
blob: faadfc71d1b0d62d9a04efd2e8bab6e432f75b98 (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
27
28
29
30
31
--- src/3rdparty/chromium/services/audio/audio_sandbox_hook_linux.cc.orig	2022-02-07 13:39:41 UTC
+++ src/3rdparty/chromium/services/audio/audio_sandbox_hook_linux.cc
@@ -143,6 +143,7 @@ void AddPulseAudioFilePermissions(
 }
 #endif
 
+#if !defined(OS_BSD)
 std::vector<BrokerFilePermission> GetAudioFilePermissions() {
   std::vector<BrokerFilePermission> permissions{
       BrokerFilePermission::ReadOnly("/dev/urandom"),
@@ -171,10 +172,12 @@ void LoadAudioLibraries() {
     }
   }
 }
+#endif
 
 }  // namespace
 
 bool AudioPreSandboxHook(sandbox::policy::SandboxLinux::Options options) {
+#if !defined(OS_BSD)
   LoadAudioLibraries();
   auto* instance = sandbox::policy::SandboxLinux::GetInstance();
   instance->StartBrokerProcess(MakeBrokerCommandSet({
@@ -194,6 +197,7 @@ bool AudioPreSandboxHook(sandbox::policy::SandboxLinux
   // TODO(https://crbug.com/850878) enable namespace sandbox. Currently, if
   // enabled, connect() on pulse native socket fails with ENOENT (called from
   // pa_context_connect).
+#endif
 
   return true;
 }