polkit_authority_check_authorization oddity
Richard Hughes
hughsient at gmail.com
Wed Jul 15 14:50:28 PDT 2009
In PackageKit, I do the PolicyKit authentication by setting up a
PolkitDetails object with some custom data, and then call
polkit_authority_check_authorization. When this gets actioned, I get
the GAsyncReadyCallback, and in the case of failure,
polkit_authorization_result_get_is_authorized returns false.
If I then do:
details = polkit_authorization_result_get_details (result);
keys = polkit_details_get_keys (details);
keys is a zero length array. I was at least expecting the action_id of
what I was trying to authenticate, and hopefully the custom details
that I had populated before I asked for authentication.
I'm trying to get some details about the failure so that I can display
something more helpful than "failed to obtain auth".
The code is here if you want context:
http://cgit.freedesktop.org/packagekit/plain/src/pk-transaction.c
Any help welcomed. Thanks.
Richard.
More information about the polkit-devel
mailing list