From eb4103488f2987bd52b6dd4cc96a37e999475b63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Fri, 6 Aug 2004 15:58:27 +0000 Subject: [PATCH] (krb5_cc_set_default_name): allow setting the default cc name, this is 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 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/krb5/cache.c b/lib/krb5/cache.c index 92b0e7ea1..7245dc00c 100644 --- a/lib/krb5/cache.c +++ b/lib/krb5/cache.c @@ -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