GNOME Bugzilla – Bug 654425
Item type is ignored
Last modified: 2019-02-22 11:46:07 UTC
Writing Qt bindings for libgnome-keyring I've faced some problem: item types are just ignored during item creation. First I've tried to use gnome_keyring_set_network_password(), which, as stated in reference, should create item of type GNOME_KEYRING_ITEM_NETWORK_PASSWORD. Next I tried gnome_keyring_item_create, providing GNOME_KEYRING_ITEM_NETWORK_PASSWORD as a param. In both cases freshly created had type GNOME_KEYRING_ITEM_GENERIC_SECRET. Then I supposed that my code is wrong. Seahorse confirmed, that items created by me had type "generic secret", and I also found, that all the keys have "generic secret" type. Only a couple of sftp items, created by nautilus in Aug 2009, were of "network password" type. I forced nautilus to create new key for similar sftp connection — new one is also is a "generic secret". So I suppose, that this behavior is a definite bug. The versions of libgnome-keyring tested: 2.32.0-1ubuntu2 (available in Ubuntu Natty) and 3.0.3-1 (available in Debian).
Thanks for catching this. I've now patched this in libgnome-keyring master, which will soon be released as 3.2. Here's the commit: commit 231045523eb6f17ee942b359af4c200e65a3fd00 Author: Stef Walter <stefw@collabora.co.uk> Date: Thu Sep 15 12:00:40 2011 +0200 Properly send the Type property when a new item is created. * Previously items were all being created as generic secret. https://bugzilla.gnome.org/show_bug.cgi?id=654425