(krb5_cc_set_default_name): allow setting the default cc name, this is
authorLove Hörnquist Åstrand <lha@kth.se>
Fri, 6 Aug 2004 15:58:27 +0000 (15:58 +0000)
committerLove Hörnquist Åstrand <lha@kth.se>
Fri, 6 Aug 2004 15:58:27 +0000 (15:58 +0000)
not very useful for general purpose glue since its not possible to
glue in user information (like uid), but for CCAPI it works just fine

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14091 ec53bebd-3082-4978-b11e-865c3cabbd6b

lib/krb5/cache.c

index 92b0e7ea121dcf62d2d305b8638ca9cd61316fb1..7245dc00cbea3dc99d2e33e66811f5d659a42f7d 100644 (file)
@@ -200,9 +200,13 @@ krb5_cc_set_default_name(krb5_context context, const char *name)
     char *p;
 
     if (name == NULL) {
-       char *e = NULL;
+       const char *e = NULL;
+
        if(!issuid())
            e = getenv("KRB5CCNAME");
+       if (e == NULL)
+           e = krb5_config_get_string(context, NULL, "libdefault",
+                                      "default_cc_name", NULL);
        if (e)
            p = strdup(e);
        else