[GTK][WPE] Add more websitedatastore directories to web process sandbox
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 1 Apr 2019 19:51:09 +0000 (19:51 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 1 Apr 2019 19:51:09 +0000 (19:51 +0000)
https://bugs.webkit.org/show_bug.cgi?id=196447

Patch by Patrick Griffis <pgriffis@igalia.com> on 2019-04-01
Reviewed by Michael Catanzaro.

* UIProcess/Launcher/glib/BubblewrapLauncher.cpp:
(WebKit::bubblewrapSpawn):
* UIProcess/glib/WebProcessProxyGLib.cpp:
(WebKit::WebProcessProxy::platformGetLaunchOptions):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243708 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/ChangeLog
Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp
Source/WebKit/UIProcess/glib/WebProcessProxyGLib.cpp

index 0f3f84f..a30be45 100644 (file)
@@ -1,3 +1,15 @@
+2019-04-01  Patrick Griffis  <pgriffis@igalia.com>
+
+        [GTK][WPE] Add more websitedatastore directories to web process sandbox
+        https://bugs.webkit.org/show_bug.cgi?id=196447
+
+        Reviewed by Michael Catanzaro.
+
+        * UIProcess/Launcher/glib/BubblewrapLauncher.cpp:
+        (WebKit::bubblewrapSpawn):
+        * UIProcess/glib/WebProcessProxyGLib.cpp:
+        (WebKit::WebProcessProxy::platformGetLaunchOptions):
+
 2019-04-01  Per Arne Vollan  <pvollan@apple.com>
 
         [macOS] Crash when loading Twitter with autoplay video enabled.
index 989e6a6..8b310bd 100644 (file)
@@ -765,7 +765,7 @@ GRefPtr<GSubprocess> bubblewrapSpawn(GSubprocessLauncher* launcher, const Proces
             }));
         }
 
-        Vector<String> extraPaths = { "applicationCacheDirectory", "waylandSocket"};
+        Vector<String> extraPaths = { "applicationCacheDirectory", "mediaKeysDirectory", "waylandSocket", "webSQLDatabaseDirectory" };
         for (const auto& path : extraPaths) {
             String extraPath = launchOptions.extraInitializationData.get(path);
             if (!extraPath.isEmpty())
index 03ef6d8..6436505 100644 (file)
@@ -42,6 +42,8 @@ void WebProcessProxy::platformGetLaunchOptions(ProcessLauncher::LaunchOptions& l
     launchOptions.extraInitializationData.set("enable-sandbox", m_processPool->sandboxEnabled() ? "true" : "false");
 
     websiteDataStore().resolveDirectoriesIfNecessary();
+    launchOptions.extraInitializationData.set("webSQLDatabaseDirectory", websiteDataStore().resolvedDatabaseDirectory());
+    launchOptions.extraInitializationData.set("mediaKeysDirectory", websiteDataStore().resolvedMediaKeysDirectory());
     launchOptions.extraInitializationData.set("applicationCacheDirectory", websiteDataStore().resolvedApplicationCacheDirectory());
 
     launchOptions.extraWebProcessSandboxPaths = m_processPool->sandboxPaths();