GNOME Bugzilla – Bug 709103
Shows 2 Kerberos entries for one kinit
Last modified: 2013-10-01 15:54:07 UTC
If I grab a ticket using kinit, then both accounts.conf and the UI shows two Kerberos accounts when there should only be one. This wasn't the case before the latest round of Kerberos changes. I tested using a new Fedora 19 VM without any updates.
okay i'll attach a patch that fixes this and two patches for other problems i noticed along the way.
Created attachment 256127 [details] [review] identity: Fix occasional warning spew It's possible to unschedule a timer when the timer is already dispatched, but not yet holding the lock. If this happens, a precondition check for the timer type may fail, leading to warning on the console. This commit moves that precondition check to within the lock, and also adds an explicit check to see if the timer has been unscheduled, shortly after dispatch.
Created attachment 256128 [details] [review] identity: user g_hash_table_unref not g_clear_object the identity service finalize function is using g_clear_object on hash tables, which is incorrect. This commit changes the g_clear_object calls to use g_clear_pointer and g_hash_table_unref instead.
Created attachment 256129 [details] [review] identity: don't queue two temporary accounts for one identity There are cases where more than one temporary g-o-a account can get created on kinit. That is because creating a temporary account is asynchronous, and kinit can trigger multiple refreshes of the credential cache in one go. This commit accounts for all pending temporary account additions in a hash table, and filters out duplicates.
Review of attachment 256127 [details] [review]: Looks good to me.
Review of attachment 256128 [details] [review]: Looks good to me. ::: src/goaidentity/goaidentityservice.c @@ +698,3 @@ + (GDestroyNotify) g_hash_table_unref); + g_clear_pointer (&self->priv->key_holders, + (GDestroyNotify) g_hash_table_unref); Since this is finalize you could have only used g_hash_table_unref, but, I guess, this is better if we ever want to move it to dispose.
Review of attachment 256129 [details] [review]: Looks good to me. ::: src/goaidentity/goaidentityservice.c @@ +683,3 @@ + g_free, + (GDestroyNotify) + g_object_unref); The GDestroyNotify type casts are not needed because g_free and g_object_unref both satisfy the type. Not a big deal. We can remove them later.
Comment on attachment 256127 [details] [review] identity: Fix occasional warning spew Attachment 256127 [details] pushed as 1a06c9c - identity: Fix occasional warning spew
Attachment 256129 [details] pushed as 3341979 - identity: don't queue two temporary accounts for one identity