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
This commit is contained in:
@@ -382,6 +382,10 @@ environment_changed(krb5_context context)
|
|||||||
{
|
{
|
||||||
const char *e;
|
const char *e;
|
||||||
|
|
||||||
|
/* if the cc name was set, don't change it */
|
||||||
|
if (context->default_cc_name_set)
|
||||||
|
return 0;
|
||||||
|
|
||||||
if(issuid())
|
if(issuid())
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
@@ -441,8 +445,11 @@ krb5_cc_set_default_name(krb5_context context, const char *name)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else
|
context->default_cc_name_set = 0;
|
||||||
|
} else {
|
||||||
p = strdup(name);
|
p = strdup(name);
|
||||||
|
context->default_cc_name_set = 1;
|
||||||
|
}
|
||||||
|
|
||||||
if (p == NULL) {
|
if (p == NULL) {
|
||||||
krb5_set_error_string(context, "malloc - out of memory");
|
krb5_set_error_string(context, "malloc - out of memory");
|
||||||
|
Reference in New Issue
Block a user