webkit-gtk-2.28.1-bubblewrap_launcher-allow-sndio.patch (1601B)
- commit bb27bdec2efb886c309144d3f755d1490c26dcfe
- Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
- Date: 2020-05-25T22:27:59 GMT
- BubblewrapLauncher.cpp: Allows to use sndio
- diff --git a/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp b/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp
- index ad301ab2..06dcd41b 100644
- --- 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);