[gnome-keyring] dbus: Don't leave unlocked keyring as consequence of changing password



commit 2454e2d4f53472b502abcac8bab9ded03f269d62
Author: Stef Walter <stefw gnome org>
Date:   Sat Oct 13 14:54:34 2012 +0200

    dbus: Don't leave unlocked keyring as consequence of changing password
    
     * When changing the keyring for a password, we left the credential
       for the new password set for the keyring. This means that the
       keyring could be unlocked at that point. Clear it correctly.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=686085

 daemon/dbus/gkd-secret-change.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/daemon/dbus/gkd-secret-change.c b/daemon/dbus/gkd-secret-change.c
index 2c4ff1d..9c7a7e9 100644
--- a/daemon/dbus/gkd-secret-change.c
+++ b/daemon/dbus/gkd-secret-change.c
@@ -512,9 +512,8 @@ cleanup:
 		g_object_unref (ocred);
 	}
 	if (mcred) {
-		/* Destroy the master credential if failed */
-		if (!result)
-			gck_object_destroy (mcred, NULL, NULL);
+		/* Always destroy the master credential */
+		gck_object_destroy (mcred, NULL, NULL);
 		g_object_unref (mcred);
 	}
 



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