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)
committerMichael Biebl <biebl@debian.org>
Sat, 24 Oct 2020 18:44:48 +0000 (19:44 +0100)
commit366d850d5bc88a9f24e0d6fea122fbf58384ff4c
tree7d8c24b39c7d81a42feb12d6b6013e8d5f76b0bc
parentc46b0c7ec6b34a683fe80eddc8edad4222f53993
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.

(cherry picked from commit 637486261528e8aa3da9f26a4487dc254f4b7abb)
(cherry picked from commit e2d4cb9843c50eff76e9104fec6b448c0d7c8814)
(cherry picked from commit fb21e13e8ecbe25d80c1219b14e6495795df18ef)
(cherry picked from commit c3141774dfb84b1526c4991bb775457c739eb179)

Gbp-Pq: Name polkit-when-authorizing-via-PK-let-s-re-resolve-callback-.patch
src/shared/bus-polkit.c