[PATCH] unset dbus error if AuthenticationAgent is not available

Ludwig Nussel ludwig.nussel at suse.de
Wed Nov 5 07:56:29 PST 2008


if the error is set _auth_show_dialog_text may abort() the calling application

the patch is for 0.9

Signed-off-by: Ludwig Nussel <ludwig.nussel at suse.de>
---
 src/polkit-dbus/polkit-simple.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/polkit-dbus/polkit-simple.c b/src/polkit-dbus/polkit-simple.c
index 8365b93..953d167 100644
--- a/src/polkit-dbus/polkit-simple.c
+++ b/src/polkit-dbus/polkit-simple.c
@@ -375,6 +375,7 @@ polkit_auth_obtain (const char *action_id, polkit_uint32_t xid, pid_t pid, DBusE
                                   DBUS_TYPE_INVALID);
 	reply = dbus_connection_send_with_reply_and_block (bus, message, INT_MAX, error);
 	if (reply == NULL || dbus_error_is_set (error)) {
+                dbus_error_init (error);
                 ret = _auth_show_dialog_text (action_id, pid, error);
 		goto out;
 	}
-- 
1.5.6



More information about the polkit-devel mailing list