diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2012-09-20 15:07:13 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2012-09-20 15:07:13 +0100 |
commit | 5b5ee4862e11ab2b12d8f652d06b45600dc358af (patch) | |
tree | 0fe10dcba6efdf8a43bf0b996afbf2738244235d | |
parent | 0bb531d7856f4b79edd7d328cef59e58f7f08ac8 (diff) | |
parent | ef2ea07d1b27dabd87e0ae028396138f78d1970a (diff) | |
download | telepathy-mission-control-5b5ee4862e11ab2b12d8f652d06b45600dc358af.tar.gz |
Merge branch 'telepathy-mission-control-5.12' into master
Conflicts:
NEWS
configure.ac
-rw-r--r-- | NEWS | 7 | ||||
-rw-r--r-- | mission-control-plugins/Makefile.am | 6 | ||||
-rw-r--r-- | src/mcd-account-manager-default.c | 55 |
3 files changed, 66 insertions, 2 deletions
@@ -1,7 +1,12 @@ telepathy-mission-control 5.13.2 (UNRELEASED) ============================================= -... +Fixes: + +• Recover from incomplete password migrations caused by upgrading to + Empathy 3 while running MC 5.12.1 or older, by deleting the old (MC) copy + of the password if Empathy has already copied it (fd.o #42088, Simon) +• Omit generated file mcp-signals-marshal.h from tarballs (Simon) telepathy-mission-control 5.13.1 (2012-09-06) ============================================= diff --git a/mission-control-plugins/Makefile.am b/mission-control-plugins/Makefile.am index 3bc24836..1c6abf15 100644 --- a/mission-control-plugins/Makefile.am +++ b/mission-control-plugins/Makefile.am @@ -28,7 +28,11 @@ plugins_include_HEADERS = \ loader.h \ request.h \ request-policy.h \ - mcp-signals-marshal.h + $(NULL) + +nodist_plugins_include_HEADERS = \ + mcp-signals-marshal.h \ + $(NULL) libmission_control_plugins_la_LDFLAGS = \ -export-symbols-regex "^(mcp_)" \ diff --git a/src/mcd-account-manager-default.c b/src/mcd-account-manager-default.c index 603ecd8b..ffd522fb 100644 --- a/src/mcd-account-manager-default.c +++ b/src/mcd-account-manager-default.c @@ -20,7 +20,11 @@ */ #include "config.h" + #include <string.h> + +#include <telepathy-glib/telepathy-glib.h> + #include "mcd-account-manager-default.h" #include "mcd-debug.h" @@ -286,6 +290,57 @@ _get_secrets_from_keyring (const McpAccountStorage *self, g_warning ("Unsupported value type for %s.%s", account, name); } + if (!tp_strdiff (param, "password")) + { + /* Empathy 3.0 was meant to migrate passwords from MC to + * itself, but it couldn't complete the migration by + * deleting the password from MC, because MC had several + * bugs that meant deleting passwords didn't work. To atone + * for our past sins, detect an incomplete migration and + * complete it. */ + GnomeKeyringResult empathy_ok = + GNOME_KEYRING_RESULT_NO_KEYRING_DAEMON; + GnomeKeyringAttributeList *empathy_match = + gnome_keyring_attribute_list_new (); + GList *empathy_items = NULL; + + gnome_keyring_attribute_list_append_string (empathy_match, + "account-id", account); + gnome_keyring_attribute_list_append_string (empathy_match, + "param-name", "password"); + + empathy_ok = gnome_keyring_find_items_sync ( + GNOME_KEYRING_ITEM_GENERIC_SECRET, empathy_match, + &empathy_items); + + if (empathy_ok == GNOME_KEYRING_RESULT_OK && + empathy_items != NULL) + { + KeyringSetData *ksd = g_slice_new0 (KeyringSetData); + + DEBUG ("An Empathy 3.0 password migration wasn't finished " + "due to fd.o #42088. Finishing it now by deleting the " + "password for %s", account); + + ksd->account = g_strdup (account); + ksd->name = g_strdup ("password"); + ksd->set = FALSE; + + gnome_keyring_delete_password (&keyring_schema, + _keyring_set_cb, ksd, NULL, + "account", account, + "param", "password", + NULL); + } + + gnome_keyring_found_list_free (empathy_items); + + /* behave as if it had already been deleted, i.e. we never + * actually found it... */ + param = NULL; + value = NULL; + } + if (param != NULL && value != NULL) { gchar *key = g_strdup_printf ("param-%s", param); |