diff options
author | Kevin Wasserman <kevin.wasserman@painless-security.com> | 2012-07-17 13:51:46 -0400 |
---|---|---|
committer | Ben Kaduk <kaduk@mit.edu> | 2012-08-28 18:25:24 -0400 |
commit | 84b0d77e7d9d8f4a733bc0d71afb7815584d1c12 (patch) | |
tree | b23cfd93759e99321611e89b78fb5fd99693d94f /src/windows | |
parent | eb952e349c4e37b81b3f1f30faba6fb707f67dca (diff) | |
download | krb5-84b0d77e7d9d8f4a733bc0d71afb7815584d1c12.tar.gz krb5-84b0d77e7d9d8f4a733bc0d71afb7815584d1c12.tar.xz krb5-84b0d77e7d9d8f4a733bc0d71afb7815584d1c12.zip |
Use cc_user_set_default_name to 'make default'
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
Diffstat (limited to 'src/windows')
-rw-r--r-- | src/windows/leash/LeashView.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/windows/leash/LeashView.cpp b/src/windows/leash/LeashView.cpp index 7b5ba17d28..881d5c16fa 100644 --- a/src/windows/leash/LeashView.cpp +++ b/src/windows/leash/LeashView.cpp @@ -1016,6 +1016,14 @@ VOID CLeashView::OnMakeDefault() 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; |