Re: gnome-keyring Error using a newly created keyring



On 11/23/2011 06:52 PM, Stef Walter wrote:
> On 2011-11-21 13:02, Alberto Mardegan wrote:
>> I just went to the GNOME keyring UI and checked the situation: I had a
>> few keyrings named signon-test_<number>  (indeed, I executed my
>> application several times -- though I wouldn't expect many keyrings to
>> be created); I could delete all of them, but two ("signon-test" and
>> "signon-test_2"), which had a different icon, no name, and the key IDs
>> are "signon-test" and "signon-test2". I couldn't delete them from the UI.
> 
> Which UI is it? 'Passwords and Keys' (ie: seahorse)?

Yes. Actually this seems to be reproducible. I'm attaching a test
application: I ran it four times, and now seahorse shows me four
keyrings: "deleteme", "deleteme_1", "deleteme_2", "deleteme_3". But they
seem to be normal, in the sense that I can delete them without problems.

> It should work. Although there are some issues matching the old crufty
> libgnome-keyring API, with the new Secret Service DBus API. See the
> comment in create_keyring_start(). Could you share your test
> application? I can try and reproduce your problem.

Unfortunately I cannot share it yet, but it's reproducible with the
attached code.
Uh, I think I noticed the problem just while writing this e-mail: the
keyring name gets converted to lowercase! Indeed, if I modify the
attached app and rename the keyring from "deleteMe" to "deleteme", then
it works. And the other code I was testing had "signon-test" as keyring
name; maybe also "-" is an invalid character?

Is this the intended behaviour, or should I file a bug?
I didn't find it documented, so maybe I should at least file a bug to
have it documented?

> I'd like to work with you to figure this out. Can you join us on
> gimp.net #keyring some time?

If necessary I will. :-) If you happen to be somewhere in freenode as
well, that will lower the bar for my lazyness. ;-)

Ciao,
  Alberto

-- 
http://blog.mardy.it <- geek in un lingua international!
/* gcc create-keyring.c -o create-keyring `pkg-config --cflags --libs gnome-keyring-1` */
#include <gnome-keyring.h>
#include <stdlib.h>

static const gchar keyring_name[] = "deleteMe";

int main(int argc, char **argv)
{
    GnomeKeyringResult ret;
    ret = gnome_keyring_create_sync(keyring_name, "testt3st");
    if (ret == GNOME_KEYRING_RESULT_OK) {
        ret = gnome_keyring_unlock_sync(keyring_name, "testt3st");
        g_debug("gnome_keyring_unlock_sync returned %u", ret);
    } else {
        g_warning("gnome_keyring_create_sync failed (%u)", ret);
    }
    return EXIT_SUCCESS;
}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]