GNOME Bugzilla – Bug 356897
infinite loop when creating a keyring with an existant name
Last modified: 2007-01-04 19:57:49 UTC
That bug has been opened on https://launchpad.net/distros/ubuntu/+source/gnome-keyring/+bug/60765 "... Here is the trace below. (gdb) thread apply all bt
+ Trace 72826
Thread 1 (Thread 47598724759328 (LWP 6312))
I think I've spotted where the problem is. Somehow I already had a (broken) default.keyring file, and in the gnome-keyring-daemon, it loops looking for a defaultX.keyring, where X is a version number. Source file : gnome-keyring-daemon-file.c, lines 194 through 205. version = 0; do { if (version == 0) { filename = g_strdup_printf ("%s.keyring", base); } else { filename = g_strdup_printf ("%s%d.keyring", base, version); } path = g_build_filename (dir, filename, NULL); g_free (filename); } while (g_file_test (path, G_FILE_TEST_EXISTS)); Unfortunately, there's no incrementation of the "version" integer in that loop, so it might be looping forever if there's already such a file (as version always ==0). A simple patch would be to increment the version number at the end of loop corpse. ..."
Created attachment 73084 [details] [review] patch to fix the issue
Thanks. Committed. 2007-01-04 Sebastien Bacher <seb128@ubuntu.com> * gnome-keyring-daemon-file.c: (get_default_keyring_file_for_name): fix infinite loop when creating a keyring with an already existant name, issue pointed by "Yachar" on https://launchpad.net/bugs/60765 (Closes: bug #356897)