[liboobs] Add comment about the meaning of DBUS_ERROR_ACCESS_DENIED returned by Platform



commit 1ca8e7abb26b02fa96a1891ba2805be73b2c7468
Author: Milan Bouchet-Valat <nalimilan club fr>
Date:   Tue Aug 18 23:41:44 2009 +0200

    Add comment about the meaning of DBUS_ERROR_ACCESS_DENIED returned by Platform
    
    DBUS_ERROR_ACCESS_DENIED is used by the backends to signal that PolicyKit denied authorization. This can be confused with D-Bus system policy preventing the user from sending messages to the backends at all. Could obviously be improved, but a comment is better than nothing.

 oobs/oobs-session.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/oobs/oobs-session.c b/oobs/oobs-session.c
index 3ceaea1..8b3246e 100644
--- a/oobs/oobs-session.c
+++ b/oobs/oobs-session.c
@@ -308,6 +308,7 @@ oobs_session_get_platform (OobsSession  *session,
   if (dbus_error_is_set (&priv->dbus_error))
     {
       if (dbus_error_has_name (&priv->dbus_error, DBUS_ERROR_ACCESS_DENIED))
+        /* Warning: this can mean that D-Bus policy denied access, but also that PolicyKit refused it */
 	result = OOBS_RESULT_ACCESS_DENIED;
       else
 	result = OOBS_RESULT_ERROR;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]