diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2012-08-30 18:50:41 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2012-08-31 13:12:24 +0100 |
commit | 1d9e8f5cfb9e7b426a99ae6e16c35c1101d55a91 (patch) | |
tree | 3c6e79b49754798dac7cc57034c8dd6ac5ebedd7 | |
parent | 16e4507c5001f6f45158ef3d0b46998fa8c1ca2a (diff) | |
download | telepathy-mission-control-1d9e8f5cfb9e7b426a99ae6e16c35c1101d55a91.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
-rw-r--r-- | src/mcd-account-manager-default.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mcd-account-manager-default.c b/src/mcd-account-manager-default.c index 71531a8a..603ecd8b 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); } |