⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 243449 in webkit


Ignore:
Timestamp:
Mar 25, 2019, 1:38:16 PM (7 years ago)
Author:
commit-queue@webkit.org
Message:

[GTK][WPE] Remove network access from web process sandbox
https://bugs.webkit.org/show_bug.cgi?id=189967

Patch by Patrick Griffis <Patrick Griffis> on 2019-03-25
Reviewed by Michael Catanzaro.

  • UIProcess/Launcher/glib/BubblewrapLauncher.cpp:

(WebKit::createFlatpakInfo):
(WebKit::bubblewrapSpawn):

  • UIProcess/Launcher/glib/FlatpakLauncher.cpp:

(WebKit::flatpakSpawn):

Location:
trunk/Source/WebKit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r243447 r243449  
     12019-03-25  Patrick Griffis  <pgriffis@igalia.com>
     2
     3        [GTK][WPE] Remove network access from web process sandbox
     4        https://bugs.webkit.org/show_bug.cgi?id=189967
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        * UIProcess/Launcher/glib/BubblewrapLauncher.cpp:
     9        (WebKit::createFlatpakInfo):
     10        (WebKit::bubblewrapSpawn):
     11        * UIProcess/Launcher/glib/FlatpakLauncher.cpp:
     12        (WebKit::flatpakSpawn):
     13
    1142019-03-25  Andy Estes  <aestes@apple.com>
    215
  • trunk/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp

    r242709 r243449  
    642642    GUniquePtr<GKeyFile> keyFile(g_key_file_new());
    643643
    644     const char* sharedPermissions[] = { "network", nullptr };
    645     g_key_file_set_string_list(keyFile.get(), "Context", "shared", sharedPermissions, sizeof(sharedPermissions));
    646 
    647644    // xdg-desktop-portal relates your name to certain permissions so we want
    648645    // them to be application unique which is best done via GApplication.
     
    687684        "--unshare-pid",
    688685        "--unshare-uts",
     686        "--unshare-net",
    689687
    690688        // We assume /etc has safe permissions.
     
    749747    }
    750748
    751     // NOTE: This has network access for HLS via GStreamer.
    752749    if (launchOptions.processType == ProcessLauncher::ProcessType::Web) {
    753750        static XDGDBusProxyLauncher proxy;
  • trunk/Source/WebKit/UIProcess/Launcher/glib/FlatpakLauncher.cpp

    r239204 r243449  
    5252    };
    5353
     54    if (launchOptions.processType == ProcessLauncher::ProcessType::Web)
     55        flatpakArgs.append("--no-network");
     56
    5457    char** newArgv = g_newa(char*, g_strv_length(argv) + flatpakArgs.size() + 1);
    5558    size_t i = 0;
Note: See TracChangeset for help on using the changeset viewer.