Comment 38 for bug 275432

Revision history for this message
In , Martin Pitt (pitti) wrote :

Created an attachment (id=24268)
patch

This patch implements the suggested behaviour. If PK fails to initialize, pol_ctx is unref'ed and kept as NULL. polkit_context_is_caller_authorized() defaults to "NO" if the passed context is NULL, thus when trying to call CK's .Stop() function over D-Bus, the caller gets a proper "not authorized" response.