From acf3a06e55f9ca8a7f7bfa012c24e8794d27c85f Mon Sep 17 00:00:00 2001 From: David Zeuthen Date: Fri, 8 Jun 2012 13:38:53 -0400 Subject: Update guidance on situations where there is no polkit authority Now that GDBusProxy does something reasonable for a masked systemd service, see https://bugzilla.gnome.org/show_bug.cgi?id=677718 construction of the PolkitAuthority object does not fail anymore. That doesn't mean the authority is available, though, so mention that users should check the result of the CheckAuthorization() call as well. Or in the case of PolkitAuthority, that the error is not a POLKIT_ERROR. This is actually a nice feature, it means that if you unmask polkit.service then mechanisms using PolkitAuthority will start using it without a restart. Signed-off-by: David Zeuthen --- docs/polkit/overview.xml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/polkit/overview.xml b/docs/polkit/overview.xml index 0639d30..45cdba0 100644 --- a/docs/polkit/overview.xml +++ b/docs/polkit/overview.xml @@ -118,7 +118,12 @@ polkit_authority_get_sync() or polkit_authority_get_finish() - returning NULL. + returning NULL or + polkit_authority_check_authorization() / + polkit_authority_check_authorization_sync() + failing with an error not in the + POLKIT_ERROR + domain. An appropriate way of dealing with the polkit authority not being available, could be to allow only uid 0 to perform operations, forbid all operations or something -- cgit v1.2.1