[gnome-online-accounts/gnome-3-16] identity: Don't ever nullify identifier
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-online-accounts/gnome-3-16] identity: Don't ever nullify identifier
- Date: Wed, 14 Oct 2015 11:59:01 +0000 (UTC)
commit cd1e2eaa184b194ef0620922f31a68ede34c6371
Author: Ray Strode <rstrode redhat com>
Date: Tue Sep 22 14:41:05 2015 -0400
identity: Don't ever nullify identifier
Credentials stored in the kernel keyring disappear after they expire.
This is different from other credential caches, which hang around but
maintain an expired timestamp until kdestroy. Because the credentials
vanish, trying to read the principal from an previously existing
credential cache will yield NULL.
This can lead to a crash because we never expect the identifier of an
identity object to be NULL. So make sure we retain the old identifier
in the event the credential cache gets wiped.
https://bugzilla.gnome.org/show_bug.cgi?id=756494
src/goaidentity/goakerberosidentity.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/goaidentity/goakerberosidentity.c b/src/goaidentity/goakerberosidentity.c
index d501a59..365ced9 100644
--- a/src/goaidentity/goakerberosidentity.c
+++ b/src/goaidentity/goakerberosidentity.c
@@ -1284,7 +1284,7 @@ update_identifier (GoaKerberosIdentity *self, GoaKerberosIdentity *new_identity)
char *new_identifier;
new_identifier = get_identifier (self, NULL);
- if (g_strcmp0 (self->priv->identifier, new_identifier) != 0)
+ if (g_strcmp0 (self->priv->identifier, new_identifier) != 0 && new_identifier != NULL)
{
g_free (self->priv->identifier);
self->priv->identifier = new_identifier;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]