gnome-keyring r1196 - in trunk: . daemon/pk
- From: nnielsen svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-keyring r1196 - in trunk: . daemon/pk
- Date: Thu, 24 Jul 2008 01:22:14 +0000 (UTC)
Author: nnielsen
Date: Thu Jul 24 01:22:13 2008
New Revision: 1196
URL: http://svn.gnome.org/viewvc/gnome-keyring?rev=1196&view=rev
Log:
* daemon/pk/gkr-pk-storage.c: Try storage of SSH and other key
passwords in the old 2.22 style, so that user's desktops
continue to work as expected.
Modified:
trunk/ChangeLog
trunk/daemon/pk/gkr-pk-storage.c
Modified: trunk/daemon/pk/gkr-pk-storage.c
==============================================================================
--- trunk/daemon/pk/gkr-pk-storage.c (original)
+++ trunk/daemon/pk/gkr-pk-storage.c Thu Jul 24 01:22:13 2008
@@ -745,6 +745,7 @@
GkrAskRequest *ask;
gchar *stype, *secondary;
gchar *display = NULL;
+ const gchar *password;
gboolean ret;
GkrPkIndex *index;
gint st;
@@ -800,6 +801,19 @@
if (*result != NULL)
return TRUE;
+ /*
+ * COMPATIBILITY: This is for compatibility with old versions 2.22, which
+ * stored a location/filename based password in the login keyring.
+ * This is wrong for locations with more than one password, so we
+ * migrate transparently to the new style (above).
+ */
+ password = gkr_keyring_login_lookup_secret (GNOME_KEYRING_ITEM_ENCRYPTION_KEY_PASSWORD,
+ "pk-object", gkr_location_to_string (location), NULL);
+ if (password != NULL) {
+ *result = gkr_secure_strdup (password);
+ return TRUE;
+ }
+
/* If we've already tried this password unsuccesfully, then clear */
} else {
gkr_pk_index_set_secret (index, digest, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]