Title: [272179] trunk/Source/WebKit
- Revision
- 272179
- Author
- [email protected]
- Date
- 2021-02-01 16:09:40 -0800 (Mon, 01 Feb 2021)
Log Message
[WPE][GTK] flatpak-spawn subsandbox clears environment variables, breaks EphyPermissionsManager
https://bugs.webkit.org/show_bug.cgi?id=219325
Patch by Michael Catanzaro <[email protected]> on 2021-02-01
Reviewed by Adrian Perez de Castro.
Manually forward all environment variables from the web process to the UI process.
EphyPermissionsManager is breaking because XDG directories are not set in the web process,
because flatpak-spawn launches subprocesses with the environment of the host system rather
than the environment of the parent process. But also, we really need to forward the entire
environment, because otherwise basic expected features like GST_DEBUG, G_MESSAGES_DEBUG, and
such will be broken.
* UIProcess/Launcher/glib/FlatpakLauncher.cpp:
(WebKit::flatpakSpawn):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (272178 => 272179)
--- trunk/Source/WebKit/ChangeLog 2021-02-01 22:56:01 UTC (rev 272178)
+++ trunk/Source/WebKit/ChangeLog 2021-02-02 00:09:40 UTC (rev 272179)
@@ -1,3 +1,20 @@
+2021-02-01 Michael Catanzaro <[email protected]>
+
+ [WPE][GTK] flatpak-spawn subsandbox clears environment variables, breaks EphyPermissionsManager
+ https://bugs.webkit.org/show_bug.cgi?id=219325
+
+ Reviewed by Adrian Perez de Castro.
+
+ Manually forward all environment variables from the web process to the UI process.
+ EphyPermissionsManager is breaking because XDG directories are not set in the web process,
+ because flatpak-spawn launches subprocesses with the environment of the host system rather
+ than the environment of the parent process. But also, we really need to forward the entire
+ environment, because otherwise basic expected features like GST_DEBUG, G_MESSAGES_DEBUG, and
+ such will be broken.
+
+ * UIProcess/Launcher/glib/FlatpakLauncher.cpp:
+ (WebKit::flatpakSpawn):
+
2021-02-01 Antoine Quint <[email protected]>
Allow support for CAAnimationGroup
Modified: trunk/Source/WebKit/UIProcess/Launcher/glib/FlatpakLauncher.cpp (272178 => 272179)
--- trunk/Source/WebKit/UIProcess/Launcher/glib/FlatpakLauncher.cpp 2021-02-01 22:56:01 UTC (rev 272178)
+++ trunk/Source/WebKit/UIProcess/Launcher/glib/FlatpakLauncher.cpp 2021-02-02 00:09:40 UTC (rev 272179)
@@ -66,6 +66,13 @@
}
}
+ // We need to pass our full environment to the subprocess.
+ GUniquePtr<char*> environ(g_get_environ());
+ for (char** variable = environ.get(); variable && *variable; variable++) {
+ GUniquePtr<char> arg(g_strconcat("--env=", *variable, nullptr));
+ flatpakArgs.append(arg.get());
+ }
+
char** newArgv = g_newa(char*, g_strv_length(argv) + flatpakArgs.size() + 1);
size_t i = 0;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes