Bug 1909616 - Do not report userns notification on Flatpak/Snap/Deb r=gcp

Differential Revision: https://phabricator.services.mozilla.com/D217558
This commit is contained in:
Alexandre Lissy 2024-07-24 16:16:08 +00:00
parent d56e01c3d6
commit ceb01bc285

View File

@ -17,6 +17,15 @@ export var SandboxUtils = {
return;
}
// This would cover Flatpak, Snap or any "Packaged App" (e.g., Debian package)
// Showing the notification on Flatpak would not be correct because of
// existing Flatpak isolation (see Bug 1882881). And for Snap and
// Debian packages it would be irrelevant as well.
const isPackagedApp = Services.sysinfo.getPropertyAsBool("isPackagedApp");
if (isPackagedApp) {
return;
}
const kSandboxUserNamespacesPref =
"security.sandbox.warn_unprivileged_namespaces";
const kSandboxUserNamespacesPrefValue = Services.prefs.getBoolPref(