polkit: when authorizing via PK let's re-resolve callback/userdata instead of caching it
authorLennart Poettering <lennart@poettering.net>
Wed, 22 Jan 2020 16:07:47 +0000 (17:07 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 4 Feb 2020 17:47:32 +0000 (18:47 +0100)
commit637486261528e8aa3da9f26a4487dc254f4b7abb
tree52bc59d202b17f78d72686a168df289ad3250e3a
parent1068447e6954dc6ce52f099ed174c442cb89ed54
polkit: when authorizing via PK let's re-resolve callback/userdata instead of caching it

Previously, when doing an async PK query we'd store the original
callback/userdata pair and call it again after the PK request is
complete. This is problematic, since PK queries might be slow and in the
meantime the userdata might be released and re-acquired. Let's avoid
this by always traversing through the message handlers so that we always
re-resolve the callback and userdata pair and thus can be sure it's
up-to-date and properly valid.
src/shared/bus-polkit.c