From 776f89a879b54fa907fa8f1f4e02444d4e3c1d7f Mon Sep 17 00:00:00 2001 From: Dan Nicholson Date: Wed, 29 Nov 2023 13:46:59 -0700 Subject: [PATCH] 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 9e58442804def3937081da9994b796bd79bbee43) --- common/flatpak-run.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/flatpak-run.c b/common/flatpak-run.c index e00151a4..5e8000a5 100644 --- a/common/flatpak-run.c +++ b/common/flatpak-run.c @@ -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,