In addition to calling krb5_cc_switch(), use
krb5int_cc_user_set_default_name() in CLeashView::OnMakeDefault()
to set the default ccache for all processes for the current user.
Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com>
ticket: 7303 (new)
queue: kfw
subject: 'Make default' should apply to all processes of the user
target_version: 1.10.4
tags: pullup
code = pkrb5_cc_resolve(ctx, elem->m_ccacheName, &cc);
if (!code)
code = pkrb5_cc_switch(ctx, cc);
+ if (!code) {
+ const char *cctype = pkrb5_cc_get_type(ctx, cc);
+ if (cctype != NULL) {
+ char defname[20];
+ sprintf_s(defname, "%s:", cctype);
+ code = pkrb5int_cc_user_set_default_name(ctx, defname);
+ }
+ }
pkrb5_free_context(ctx);
CLeashApp::m_bUpdateDisplay = TRUE;
break;