logo

WebKitGTK

Unnamed repository; edit this file 'description' to name the repository.
commit: bb27bdec2efb886c309144d3f755d1490c26dcfe
parent: c8faf3475d192f25cf6da32f9c65182d63bd4d55
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Mon, 25 May 2020 22:27:59 +0200

BubblewrapLauncher.cpp: Allows to use sndio

Diffstat:

MSource/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp13+++++++++++++
1 file changed, 13 insertions(+), 0 deletions(-)

diff --git a/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp b/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp @@ -381,6 +381,18 @@ static void bindPulse(Vector<CString>& args) bindIfExists(args, "/dev/snd", BindFlags::Device); } +static void bindSndio(Vector<CString>& args) +{ + bindIfExists(args, "/tmp/sndio", BindFlags::ReadWrite); + + GUniquePtr<char> sndioUidDir(g_strdup_printf("/tmp/sndio-%d", getuid())); + bindIfExists(args, sndioUidDir.get(), BindFlags::ReadWrite); + + const char* homeDir = g_get_home_dir(); + GUniquePtr<char> sndioHomeDir(g_build_filename(homeDir, ".sndio", nullptr)); + bindIfExists(args, sndioHomeDir.get(), BindFlags::ReadWrite); +} + static void bindFonts(Vector<CString>& args) { const char* configDir = g_get_user_config_dir(); @@ -807,6 +819,7 @@ GRefPtr<GSubprocess> bubblewrapSpawn(GSubprocessLauncher* launcher, const Proces bindDBusSession(sandboxArgs, proxy); // FIXME: We should move to Pipewire as soon as viable, Pulse doesn't restrict clients atm. bindPulse(sandboxArgs); + bindSndio(sandboxArgs); bindFonts(sandboxArgs); bindGStreamerData(sandboxArgs); bindOpenGL(sandboxArgs);