summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorPhaedrus Leeds <mwleeds@protonmail.com>2021-11-17 10:33:15 -0800
committerPhaedrus Leeds <mwl458@gmail.com>2022-01-04 11:42:00 -0800
commite6702161da0a24e9d1be9cdb409cb6bc603bf662 (patch)
tree62b8e23a8d9f9112dbaec7e0f477bfdb3c554682 /app
parentdfda3f09ecb4ba3db5305042217a414aacd23636 (diff)
downloadflatpak-e6702161da0a24e9d1be9cdb409cb6bc603bf662.tar.gz
app: Don't use polkit agent in 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().
Diffstat (limited to 'app')
-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 b2a4b14e..88e9d5af 100644
--- a/app/flatpak-main.c
+++ b/app/flatpak-main.c
@@ -827,10 +827,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 */