GNOME Bugzilla – Bug 679855
libsecret migration
Last modified: 2013-01-05 11:54:17 UTC
Created attachment 218724 [details] [review] WIP patch to migrate to libsecret libsecret is a new client for the Secret Service DBus API. The Secret Service allows storage of passwords in a common way on the desktop. Supported by gnome-keyring and ksecretservice. libsecret solves many problems with libgnome-keyring. Relevant to evince: it solves threading issues, uses GDBus instead of dbus-glib. A future GNOME goal will be to migrate away from libgnome-keyring to libsecret: https://live.gnome.org/GnomeGoals/LibsecretMigration I've done a rough WIP patch in order to make sure that the libsecret API covered all the use cases. I'll attach that patch here. I hope the patch is a help for the migration, but I don't plan to iterate on it at the current time. Some notes about the patch: * I chose an arbitrary schema name for the stored items, you may want to change it to something better: org.gnome.Evince.Document * I haven't tested the patch. I'm not familiar with how to trigger all the various code paths and logic.
Maybe now is the time to use the async variants of the API instead of sync ones :-)
Per r-t: Targetting GNOME 3.6
Yeah, async is always nice, especially since those sync methods can block for a long time due to prompts. Now that prompting is usually in the shell, some of the problems are mitigated, but blocking on a sync call to another process can still cause unexpected results. Just a heads up: Please look at the patch critically. I did the patch as a way to try out the API, and it's not ready to commit. There may be memory leaks or other logic errors. Most libsecret getters return data that must be unreferenced or freed.
Does libsecret need a new version of gnome-keyring? I get this error when trying to save a password in the session: ** Message: Remote error from secret service: org.freedesktop.Secret.Error.NoSuchObject: The '/org/freedesktop/secrets/aliases/session' object does not exist
Yes it does. Unfortunately, the /org/freedesktop/secrets/aliases/session alias did not exist in previous versions of gnome-keyring.
Ok, I think it's already too late in the cycle, so I'll postpone this for 3.8
would be nice to get this done for 3.8
Comment on attachment 218724 [details] [review] WIP patch to migrate to libsecret Committed with some fixes. Thanks