Commit 607f9aea authored by Ray Strode's avatar Ray Strode

identity: don't register new identity to list if sign in unsuccessful

If we add an identity to the list when sign in fails, then we're going
to prune it from the list immediately resulting in an identity-removed
signal right away. This will leads to an ensure credentials call
(which is needed in most cases on identity removal to synchronize state
 with the daemon, but not in this case), which may cause it to sign
in again. This can lead to a sign in attempt every 5 seconds.

https://bugzilla.gnome.org/show_bug.cgi?id=768808
parent f7f6576f
......@@ -860,10 +860,6 @@ sign_in_identity (GoaKerberosIdentityManager *self,
g_object_ref (identity);
}
g_hash_table_replace (self->priv->identities,
g_strdup (operation->identifier),
g_object_ref (identity));
if (!goa_kerberos_identity_sign_in (GOA_KERBEROS_IDENTITY (identity),
operation->identifier,
operation->initial_password,
......@@ -888,6 +884,10 @@ sign_in_identity (GoaKerberosIdentityManager *self,
g_object_ref (identity),
(GDestroyNotify)
g_object_unref);
g_hash_table_replace (self->priv->identities,
g_strdup (operation->identifier),
g_object_ref (identity));
}
g_object_unref (identity);
......
Subproject commit 0bad64b02bf3e9fd1c0d24c249951f15c4114b60
Subproject commit 2c9df052d8993590f9d2cc2bf596a07241a59ad4
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment