Title: [261605] trunk/Tools
Revision
261605
Author
[email protected]
Date
2020-05-13 01:33:46 -0700 (Wed, 13 May 2020)

Log Message

[Flatpak] *PROCESS_CMD_PREFIX are ignored
https://bugs.webkit.org/show_bug.cgi?id=211830

Patch by Víctor Manuel Jáquez Leal <[email protected]> on 2020-05-13
Reviewed by Philippe Normand.

Checking the last slice of the splitted environment variable won't
match with any of the list of suffixes since they are composed by
several slices if they are splitted too.

A new internal function is defined where the suffixes list is
traversed and matched with the end of the passend enviroment
variable.

* flatpak/flatpakutils.py:
(WebkitFlatpak.run_in_sandbox.envvar_in_suffixes_to_keep):
(WebkitFlatpak.run_in_sandbox):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (261604 => 261605)


--- trunk/Tools/ChangeLog	2020-05-13 08:11:18 UTC (rev 261604)
+++ trunk/Tools/ChangeLog	2020-05-13 08:33:46 UTC (rev 261605)
@@ -1,3 +1,22 @@
+2020-05-13  Víctor Manuel Jáquez Leal  <[email protected]>
+
+        [Flatpak] *PROCESS_CMD_PREFIX are ignored
+        https://bugs.webkit.org/show_bug.cgi?id=211830
+
+        Reviewed by Philippe Normand.
+
+        Checking the last slice of the splitted environment variable won't
+        match with any of the list of suffixes since they are composed by
+        several slices if they are splitted too.
+
+        A new internal function is defined where the suffixes list is
+        traversed and matched with the end of the passend enviroment
+        variable.
+
+        * flatpak/flatpakutils.py:
+        (WebkitFlatpak.run_in_sandbox.envvar_in_suffixes_to_keep):
+        (WebkitFlatpak.run_in_sandbox):
+
 2020-05-12  Alex Christensen  <[email protected]>
 
         [iOS Simulator] TestWebKitAPI._WKDownload.Resume is a flaky crash

Modified: trunk/Tools/flatpak/flatpakutils.py (261604 => 261605)


--- trunk/Tools/flatpak/flatpakutils.py	2020-05-13 08:11:18 UTC (rev 261604)
+++ trunk/Tools/flatpak/flatpakutils.py	2020-05-13 08:33:46 UTC (rev 261605)
@@ -747,11 +747,17 @@
             "SSLKEYLOGFILE",
         ]
 
+        def envvar_in_suffixes_to_keep(envvar):
+            for env_var in env_var_suffixes_to_keep:
+                if envvar.endswith(env_var):
+                    return True
+            return False
+
         env_vars = os.environ
         env_vars.update(extra_env_vars)
         for envvar, value in env_vars.items():
             var_tokens = envvar.split("_")
-            if var_tokens[0] in env_var_prefixes_to_keep or envvar in env_vars_to_keep or var_tokens[-1] in env_var_suffixes_to_keep:
+            if var_tokens[0] in env_var_prefixes_to_keep or envvar in env_vars_to_keep or envvar_in_suffixes_to_keep(envvar):
                 sandbox_environment[envvar] = value
 
         share_network_option = "--share=network"
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to