[PATCH] unset dbus error if caller has no ConsoleKit session
Ludwig Nussel
ludwig.nussel at suse.de
Wed Nov 5 07:56:28 PST 2008
A non existing ConsoleKit session is no fatal error and a caller is constructed
nevertheless. Therefore don't leave the error set to prevent applications from
thinking something went wrong.
the patch is for 0.9
Signed-off-by: Ludwig Nussel <ludwig.nussel at suse.de>
---
src/polkit-dbus/polkit-dbus.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/polkit-dbus/polkit-dbus.c b/src/polkit-dbus/polkit-dbus.c
index f7be03f..509415e 100644
--- a/src/polkit-dbus/polkit-dbus.c
+++ b/src/polkit-dbus/polkit-dbus.c
@@ -479,6 +479,7 @@ polkit_caller_new_from_dbus_name (DBusConnection *con, const char *dbus_name, DB
/* OK, this is not a catastrophe; just means the caller is not a
* member of any session or that ConsoleKit is not available..
*/
+ dbus_error_free (error);
goto not_in_session;
}
dbus_message_iter_init (reply, &iter);
@@ -682,6 +683,7 @@ polkit_caller_new_from_pid (DBusConnection *con, pid_t pid, DBusError *error)
/* OK, this is not a catastrophe; just means the caller is not a
* member of any session or that ConsoleKit is not available..
*/
+ dbus_error_free (error);
goto not_in_session;
}
dbus_message_iter_init (reply, &iter);
--
1.5.6
More information about the polkit-devel
mailing list