[Pkg-telepathy-commits] [SCM] MC 5 packaging branch, debian, updated. debian/1%5.12.1-2-4-g07a42a9

Simon McVittie smcv at debian.org
Thu Sep 6 17:21:20 UTC 2012


The following commit has been merged in the debian branch:
commit ed9dfb126d763d3faae18044ce3a73ba41df5a27
Author: Simon McVittie <smcv at debian.org>
Date:   Thu Sep 6 17:05:59 2012 +0100

    Add patches from upstream stable release 5.12.2 to fix deletion of passwords from gnome-keyring, in particular when upgrading Empathy from squeeze to wheezy triggers a format migration. (Closes: #686836)

diff --git a/debian/changelog b/debian/changelog
index d1df5fb..7b7af16 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+telepathy-mission-control-5 (1:5.12.1-3) UNRELEASED; urgency=low
+
+  * Add patches from upstream stable release 5.12.2 to fix deletion of
+    passwords from gnome-keyring, in particular when upgrading Empathy
+    from squeeze to wheezy triggers a format migration. (Closes: #686836)
+
+ -- Simon McVittie <smcv at debian.org>  Thu, 06 Sep 2012 09:41:30 +0100
+
 telepathy-mission-control-5 (1:5.12.1-2) unstable; urgency=low
 
   * Upload to unstable
diff --git a/debian/patches/0010-Default-account-backend-when-deleting-always-delete-.patch b/debian/patches/0010-Default-account-backend-when-deleting-always-delete-.patch
new file mode 100644
index 0000000..ac81a43
--- /dev/null
+++ b/debian/patches/0010-Default-account-backend-when-deleting-always-delete-.patch
@@ -0,0 +1,71 @@
+From: Simon McVittie <simon.mcvittie at collabora.co.uk>
+Date: Thu, 30 Aug 2012 18:09:21 +0100
+Subject: [PATCH 10/16] Default account backend: when deleting, always delete
+ from both places
+
+Our tracking of whether something is "secret" (in the gnome-keyring) is
+pretty shaky, and in particular, we can forget that things are meant
+to be "secret" sometimes (we lose that information when deleting
+parameters).
+
+Happily, when we're deleting things, it doesn't actually matter: the
+right thing to do is clearly to delete from both locations, regardless
+of where we think it ought to be.
+
+Similarly, when we're setting a property to a new value, it's appropriate
+to delete it from both locations, then put it in the right location
+(only).
+
+Signed-off-by: Simon McVittie <simon.mcvittie at collabora.co.uk>
+Reviewed-by: Jonny Lamb <jonny.lamb at collabora.co.uk>
+Bug: https://bugs.freedesktop.org/show_bug.cgi?id=42088
+Cherry-picked-from: 5b4954d2c959c4ba7f6c67b7d8e16eaa5ab272dd
+Origin: upstream, 5.12.2, commit:dbba880903def15bc7bb5fdb9d05ee310f1a5bfe
+---
+ src/mcd-account-manager-default.c |   15 +++++++--------
+ 1 file changed, 7 insertions(+), 8 deletions(-)
+
+diff --git a/src/mcd-account-manager-default.c b/src/mcd-account-manager-default.c
+index e156de1..221c5d0 100644
+--- a/src/mcd-account-manager-default.c
++++ b/src/mcd-account-manager-default.c
+@@ -411,6 +411,10 @@ _set (const McpAccountStorage *self,
+   /* if we have a keyring, secrets are segregated */
+   secret = mcp_account_manager_parameter_is_secret (am, account, key);
+ 
++  /* remove it from both sets, then re-add it to the right one if non-null */
++  g_key_file_remove_key (amd->secrets, account, key, NULL);
++  g_key_file_remove_key (amd->keyfile, account, key, NULL);
++
+   if (val != NULL)
+     {
+       if (secret)
+@@ -418,13 +422,6 @@ _set (const McpAccountStorage *self,
+       else
+         g_key_file_set_value (amd->keyfile, account, key, val);
+     }
+-  else
+-    {
+-      if (secret)
+-        g_key_file_remove_key (amd->secrets, account, key, NULL);
+-      else
+-        g_key_file_remove_key (amd->keyfile, account, key, NULL);
+-    }
+ 
+   /* if we removed the account before, it now exists again, so... */
+   g_hash_table_remove (amd->removed_accounts, account);
+@@ -561,8 +558,10 @@ _delete (const McpAccountStorage *self,
+           g_key_file_remove_group (amd->keyfile, account, NULL);
+           _delete_from_keyring (self, am, account, NULL);
+         }
+-      else if (mcp_account_manager_parameter_is_secret (am, account, key))
++      else
+         {
++          /* always delete from keyring, even if we didn't previously
++           * think it was secret - we might have been wrong */
+           _delete_from_keyring (self, am, account, key);
+         }
+ 
+-- 
+1.7.10.4
+
diff --git a/debian/patches/0011-_keyring_commit-perform-deletions-for-keys-in-remove.patch b/debian/patches/0011-_keyring_commit-perform-deletions-for-keys-in-remove.patch
new file mode 100644
index 0000000..8117287
--- /dev/null
+++ b/debian/patches/0011-_keyring_commit-perform-deletions-for-keys-in-remove.patch
@@ -0,0 +1,47 @@
+From: Simon McVittie <simon.mcvittie at collabora.co.uk>
+Date: Thu, 30 Aug 2012 16:03:08 +0100
+Subject: [PATCH 11/16] _keyring_commit: perform deletions for keys in
+ removed, not in secrets
+
+'removed' is essentially a set of (account, key) tuples that should
+be deleted. What we were doing was:
+
+    foreach account in removed
+        foreach key in secrets[account]
+            delete (account, key)
+
+which makes little sense - if we have param-password and
+param-proxy-password and we want to unset Parameters['password'],
+the current implementation would delete both. This commit changes it to:
+
+    foreach account in removed
+        foreach key in removed[account]
+            delete (account, key)
+
+which has the advantage of actually making sense.
+
+Signed-off-by: Simon McVittie <simon.mcvittie at collabora.co.uk>
+Reviewed-by: Jonny Lamb <jonny.lamb at collabora.co.uk>
+Bug: https://bugs.freedesktop.org/show_bug.cgi?id=42088
+Cherry-picked-from: d4ca35cffea9d0093e127e0be633501d22ded35f
+Origin: upstream, 5.12.2, commit:efc15381535a2d94eeec2b19651302768f65d0ad
+---
+ src/mcd-account-manager-default.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/mcd-account-manager-default.c b/src/mcd-account-manager-default.c
+index 221c5d0..6989d62 100644
+--- a/src/mcd-account-manager-default.c
++++ b/src/mcd-account-manager-default.c
+@@ -187,7 +187,7 @@ _keyring_commit (const McpAccountStorage *self,
+     {
+       gsize j;
+       gsize k;
+-      GStrv keys = g_key_file_get_keys (amd->secrets, accts[i], &k, NULL);
++      GStrv keys = g_key_file_get_keys (amd->removed, accts[i], &k, NULL);
+ 
+       if (keys == NULL)
+         k = 0;
+-- 
+1.7.10.4
+
diff --git a/debian/patches/0012-Default-account-backend-when-deleting-from-the-keyri.patch b/debian/patches/0012-Default-account-backend-when-deleting-from-the-keyri.patch
new file mode 100644
index 0000000..6e6c8de
--- /dev/null
+++ b/debian/patches/0012-Default-account-backend-when-deleting-from-the-keyri.patch
@@ -0,0 +1,38 @@
+From: Simon McVittie <simon.mcvittie at collabora.co.uk>
+Date: Thu, 30 Aug 2012 18:12:06 +0100
+Subject: [PATCH 12/16] Default account backend: when deleting from the
+ keyring, remove from secrets
+
+Otherwise we'd just delete it, then (because it's still in secrets)
+re-commit it!
+
+Signed-off-by: Simon McVittie <simon.mcvittie at collabora.co.uk>
+Reviewed-by: Jonny Lamb <jonny.lamb at collabora.co.uk>
+Bug: https://bugs.freedesktop.org/show_bug.cgi?id=42088
+Cherry-picked-from: 16e4507c5001f6f45158ef3d0b46998fa8c1ca2a
+Origin: upstream, 5.12.2, commit:bd56ee0e36a681ee50d3e02d4f158bbc5df462f1
+---
+ src/mcd-account-manager-default.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/mcd-account-manager-default.c b/src/mcd-account-manager-default.c
+index 6989d62..22eb29e 100644
+--- a/src/mcd-account-manager-default.c
++++ b/src/mcd-account-manager-default.c
+@@ -78,11 +78,13 @@ _delete_from_keyring (const McpAccountStorage *self,
+       /* flag the whole account as purged */
+       gchar *removed = g_strdup (account);
+       g_hash_table_replace (amd->removed_accounts, removed, removed);
++      g_key_file_remove_group (amd->secrets, removed, NULL);
+     }
+   else
+     {
+       /* remember to forget this one param */
+       g_key_file_set_value (amd->removed, account, key, "");
++      g_key_file_remove_key (amd->secrets, account, key, NULL);
+     }
+ }
+ 
+-- 
+1.7.10.4
+
diff --git a/debian/patches/0013-Default-account-backend-when-deleting-passwords-dele.patch b/debian/patches/0013-Default-account-backend-when-deleting-passwords-dele.patch
new file mode 100644
index 0000000..edd09a9
--- /dev/null
+++ b/debian/patches/0013-Default-account-backend-when-deleting-passwords-dele.patch
@@ -0,0 +1,48 @@
+From: Simon McVittie <simon.mcvittie at collabora.co.uk>
+Date: Thu, 30 Aug 2012 18:50:41 +0100
+Subject: [PATCH 13/16] 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 at collabora.co.uk>
+Reviewed-by: Jonny Lamb <jonny.lamb at collabora.co.uk>
+Bug: https://bugs.freedesktop.org/show_bug.cgi?id=42088
+Cherry-picked-from: 1d9e8f5cfb9e7b426a99ae6e16c35c1101d55a91
+Origin: upstream, 5.12.2, commit:1ce1e32bc7f83b5dfc3b75407e896c7bd7e6cbdb
+---
+ 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 22eb29e..cd6d019 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
+
diff --git a/debian/patches/series b/debian/patches/series
index 3e3bf03..2569a55 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,5 @@
 0001-Revert-stop-using-deprecated-tp-glib-functions.patch
+0010-Default-account-backend-when-deleting-always-delete-.patch
+0011-_keyring_commit-perform-deletions-for-keys-in-remove.patch
+0012-Default-account-backend-when-deleting-from-the-keyri.patch
+0013-Default-account-backend-when-deleting-passwords-dele.patch

-- 
MC 5 packaging



More information about the Pkg-telepathy-commits mailing list