GNOME Bugzilla – Bug 664454
gnome_keyring_get_default_keyring_sync() returns NULL
Last modified: 2011-12-01 12:27:08 UTC
I'm using Ubuntu 11.10, which ships GNOME keyring 3.2.1. The gnome_keyring_get_default_keyring_sync() function returns a NULL string for the keyring (and no error). But when I store some passwords and specify NULL as the keyring to be used, they end up into the "login" keyring. This is a problem, because when I want to find them back, I compare the "keyring" field from the GnomeKeyringFound structure (which is "login") with the name of the keyring I'm using (NULL) and they don't match. I would expect the gnome_keyring_get_default_keyring_sync() to return me "login", instead.
Found the problem. This is regression due to recent refactoring for the Secret Service implementation [1]. There was an appropriately located "TODO:" :S Committed fix to gnome-3-2 branch, and will bring that into master soon. The patch applies to both branches. commit 1436c6bedd0fb7b0a81ab9d7d59766f24d03f745 Author: Stef Walter <stefw@collabora.co.uk> Date: Wed Nov 23 17:38:09 2011 +0100 daemon: Fix ReadAlias() returning null when 'login' keyring exists * Internally we use the 'login' keyring as the automatic default when no default is explicitly set. * However this logic was not reflected in the result of the ReadAlias() secret serivce API call. https://bugzilla.gnome.org/show_bug.cgi?id=664454 Let me know if this patch does the trick for you. [1] http://standards.freedesktop.org/secret-service/
Stef, you rock! That commit definitely fixes the issue. I see that it's not in the master, yet. Please don't forget about it. :-)