run: Ensure container environment variable is used

If flatpak is run within a container manager that sets the `container`
environment variable, it will override the attempted `flatpak` value.

(cherry picked from commit 9e58442804)
This commit is contained in:
Dan Nicholson
2023-11-29 13:46:59 -07:00
committed by Simon McVittie
parent 52b7e384a5
commit 776f89a879

View File

@@ -1882,6 +1882,9 @@ static const ExportData default_exports[] = {
* outside the sandbox is somewhere else. Don't allow a different
* setting from outside the sandbox to overwrite this. */
{"XDG_RUNTIME_DIR", NULL},
/* Ensure our container environment variable takes precedence over the one
* set by a container manager. */
{"container", NULL},
/* Some env vars are common enough and will affect the sandbox badly
if set on the host. We clear these always. If updating this list,