summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2012-08-30 18:50:41 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2012-09-06 10:50:23 +0100
commit1ce1e32bc7f83b5dfc3b75407e896c7bd7e6cbdb (patch)
tree904aa953c2856774b22d12d82d250c8bc0dc0fa0
parentbd56ee0e36a681ee50d3e02d4f158bbc5df462f1 (diff)
downloadtelepathy-mission-control-1ce1e32bc7f83b5dfc3b75407e896c7bd7e6cbdb.tar.gz
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 <simon.mcvittie@collabora.co.uk> Reviewed-by: Jonny Lamb <jonny.lamb@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=42088 Cherry-picked-from: 1d9e8f5cfb9e7b426a99ae6e16c35c1101d55a91
-rw-r--r--src/mcd-account-manager-default.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mcd-account-manager-default.c b/src/mcd-account-manager-default.c
index 22eb29eb..cd6d0191 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);
}