From e18aaa1b2ed211802ea8f01446406c247c6857ea Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 30 Aug 2012 18:50:41 +0100 Subject: [PATCH 5/8] Default account backend: when deleting passwords, delete the same thing we will look for Deleting secrets with param="param-password" isn't a whole lot of use when we save, and look up, param="password". Signed-off-by: Simon McVittie --- src/mcd-account-manager-default.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/mcd-account-manager-default.c b/src/mcd-account-manager-default.c index 71531a8..603ecd8 100644 --- a/src/mcd-account-manager-default.c +++ b/src/mcd-account-manager-default.c @@ -197,15 +197,21 @@ _keyring_commit (const McpAccountStorage *self, for (j = 0; j < k; j++) { KeyringSetData *ksd = g_slice_new0 (KeyringSetData); + const gchar *key = keys[j]; + + /* for compatibility with old gnome keyring code we must strip * + * the param- prefix from the name before saving to the keyring */ + if (g_str_has_prefix (key, "param-")) + key += strlen ("param-"); ksd->account = g_strdup (accts[i]); - ksd->name = g_strdup (keys[j]); + ksd->name = g_strdup (key); ksd->set = FALSE; gnome_keyring_delete_password (&keyring_schema, _keyring_set_cb, ksd, NULL, "account", accts[i], - "param", keys[j], + "param", key, NULL); } -- 1.7.10.4