[gnome-online-accounts] goaidentity: prefer default cache if no cache available



commit 7d84943e8de8f57b5a6d2bd6508c2756bf2f1055
Author: Ray Strode <rstrode redhat com>
Date:   Wed Oct 10 14:41:01 2012 -0400

    goaidentity: prefer default cache if no cache available
    
    This ensures we get a cache named tkt which the kerberos
    libraries use by default.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=685876

 src/goaidentity/goakerberosidentitymanager.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/src/goaidentity/goakerberosidentitymanager.c b/src/goaidentity/goakerberosidentitymanager.c
index 2712be9..3b7f6c6 100644
--- a/src/goaidentity/goakerberosidentitymanager.c
+++ b/src/goaidentity/goakerberosidentitymanager.c
@@ -760,7 +760,16 @@ get_new_credentials_cache (GoaKerberosIdentityManager *self,
 {
   krb5_error_code error_code;
 
-  if (g_strcmp0 (self->priv->credentials_cache_type, "FILE") == 0)
+  /* If we're configured for FILE based credentials, then we only
+   * have one ccache, and we need to use it always.
+   *
+   * If we're configured for DIR based credentials, then we need
+   * to use the default name "tkt" the first time around, and
+   * then need to use unique names for subsequent tickets.
+   */
+  if (g_strcmp0 (self->priv->credentials_cache_type, "FILE") == 0 ||
+      (g_strcmp0 (self->priv->credentials_cache_type, "DIR") == 0 &&
+       g_hash_table_size (self->priv->identities) == 0))
     {
       krb5_ccache default_cache;
 



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