Changeset 249569 in webkit


Ignore:
Timestamp:
Sep 6, 2019 2:00:04 AM (5 years ago)
Author:
Patrick Griffis
Message:

[GTK][WPE] Do not enable the sandbox in Snap
https://bugs.webkit.org/show_bug.cgi?id=201486

Reviewed by Carlos Garcia Campos.

Running inside of Snap adds its own complications and is simply
not supported for now.

Also update isInsideFlatpak() for consistency.

  • UIProcess/Launcher/glib/ProcessLauncherGLib.cpp:

(WebKit::isInsideFlatpak):
(WebKit::isInsideSnap):
(WebKit::ProcessLauncher::launchProcess):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r249567 r249569  
     12019-09-06  Patrick Griffis  <pgriffis@igalia.com>
     2
     3        [GTK][WPE] Do not enable the sandbox in Snap
     4        https://bugs.webkit.org/show_bug.cgi?id=201486
     5
     6        Reviewed by Carlos Garcia Campos.
     7
     8        Running inside of Snap adds its own complications and is simply
     9        not supported for now.
     10
     11        Also update isInsideFlatpak() for consistency.
     12
     13        * UIProcess/Launcher/glib/ProcessLauncherGLib.cpp:
     14        (WebKit::isInsideFlatpak):
     15        (WebKit::isInsideSnap):
     16        (WebKit::ProcessLauncher::launchProcess):
     17
    1182019-09-05  Joseph Pecoraro  <pecoraro@apple.com>
    219
  • trunk/Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp

    r247096 r249569  
    5353static bool isInsideFlatpak()
    5454{
    55     static int ret = -1;
    56     if (ret != -1)
    57         return ret;
     55    static Optional<bool> ret;
     56    if (ret)
     57        return *ret;
    5858
    5959    ret = g_file_test("/.flatpak-info", G_FILE_TEST_EXISTS);
    60     return ret;
     60    return *ret;
     61}
     62
     63static bool isInsideSnap()
     64{
     65    static Optional<bool> ret;
     66    if (ret)
     67        return *ret;
     68
     69    ret = g_getenv("SNAP");
     70    return *ret;
    6171}
    6272#endif
     
    138148
    139149    // You cannot use bubblewrap within Flatpak so lets ensure it never happens.
    140     if (sandboxEnabled && !isInsideFlatpak())
     150    // Snap can allow it but has its own limitations that require workarounds.
     151    if (sandboxEnabled && !isInsideFlatpak() && !isInsideSnap())
    141152        process = bubblewrapSpawn(launcher.get(), m_launchOptions, argv, &error.outPtr());
    142153    else
Note: See TracChangeset for help on using the changeset viewer.