After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 654425 - Item type is ignored
Item type is ignored
Status: RESOLVED FIXED
Product: libgnome-keyring
Classification: Core
Component: General
3.0.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME keyring maintainer(s)
GNOME keyring maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2011-07-11 22:37 UTC by Vsevolod
Modified: 2019-02-22 11:46 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Vsevolod 2011-07-11 22:37:10 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).
Comment 1 Stef Walter 2011-09-15 10:02:10 UTC
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