summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhaedrus Leeds <mwleeds@protonmail.com>2021-11-17 10:33:15 -0800
committerPhaedrus Leeds <mwleeds@protonmail.com>2021-11-17 10:37:05 -0800
commitdd9fe190661bce70adf4e3df972b8033a656d48a (patch)
tree1b9af6db32f6193352d75c042aff5f577a6cc902
parentd63279d4bfeb6265ea27456d1eb03646dcac3cb5 (diff)
downloadflatpak-fix-history-command.tar.gz
app: Don't use polkit agent in history commandfix-history-command
There's no need to use polkit in the history command, so don't start the agent in flatpak-main.c. This means we can avoid a test failure in test-history.sh which was caused by old versions of valgrind being unaware of syscall sched_getattr, which is used in g_bus_get_sync(), itself called by install_polkit_agent().
-rw-r--r--app/flatpak-main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/flatpak-main.c b/app/flatpak-main.c
index ae2b6fc1..d49317f7 100644
--- a/app/flatpak-main.c
+++ b/app/flatpak-main.c
@@ -817,10 +817,11 @@ flatpak_run (int argc,
check_environment ();
/* Don't talk to dbus in enter, as it must be thread-free to setns, also
- skip run/build for performance reasons (no need to connect to dbus). */
+ skip run/build/history for performance reasons (no need to connect to dbus). */
if (g_strcmp0 (command->name, "enter") != 0 &&
g_strcmp0 (command->name, "run") != 0 &&
- g_strcmp0 (command->name, "build") != 0)
+ g_strcmp0 (command->name, "build") != 0 &&
+ g_strcmp0 (command->name, "history") != 0)
polkit_agent = install_polkit_agent ();
/* g_vfs_get_default can spawn threads */