From 6376bc16cd7c89b36120e90ee7e9dfef48c60532 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 30 Aug 2012 16:03:08 +0100 Subject: [PATCH 3/8] _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 Bug: https://bugs.freedesktop.org/show_bug.cgi?id=42088 --- 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 1d90142..726db5d 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