From 6aa94aa902f437defcfdaf160bd4478b4f1a0c41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Tue, 4 Dec 2007 00:54:37 +0000 Subject: [PATCH] Flag if default_cc_name was set by the user, ignore envirnoment updates then. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22127 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/krb5/cache.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/krb5/cache.c b/lib/krb5/cache.c index 9500c582b..66b3a08ab 100644 --- a/lib/krb5/cache.c +++ b/lib/krb5/cache.c @@ -382,6 +382,10 @@ environment_changed(krb5_context context) { const char *e; + /* if the cc name was set, don't change it */ + if (context->default_cc_name_set) + return 0; + if(issuid()) return 0; @@ -441,8 +445,11 @@ krb5_cc_set_default_name(krb5_context context, const char *name) return ret; } } - } else + context->default_cc_name_set = 0; + } else { p = strdup(name); + context->default_cc_name_set = 1; + } if (p == NULL) { krb5_set_error_string(context, "malloc - out of memory");