diff options
author | Kevin Wasserman <kevin.wasserman@painless-security.com> | 2012-07-16 14:22:23 -0400 |
---|---|---|
committer | Ben Kaduk <kaduk@mit.edu> | 2012-08-28 18:25:24 -0400 |
commit | cc96011e055131c81f224e126260f25c5318d97b (patch) | |
tree | fa1a177377d285479d9b04233ebce26497863f69 /src/windows | |
parent | 84b0d77e7d9d8f4a733bc0d71afb7815584d1c12 (diff) | |
download | krb5-cc96011e055131c81f224e126260f25c5318d97b.tar.gz krb5-cc96011e055131c81f224e126260f25c5318d97b.tar.xz krb5-cc96011e055131c81f224e126260f25c5318d97b.zip |
'Destroy tickets on exit' destroys all tickets
Previously destroyed only default ccache and used obsolete functions.
Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com>
ticket: 7304 (new)
queue: kfw
target_version: 1.10.4
tags: pullup
Diffstat (limited to 'src/windows')
-rw-r--r-- | src/windows/leash/LeashView.cpp | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/src/windows/leash/LeashView.cpp b/src/windows/leash/LeashView.cpp index 881d5c16f..83134e488 100644 --- a/src/windows/leash/LeashView.cpp +++ b/src/windows/leash/LeashView.cpp @@ -1947,22 +1947,17 @@ VOID CLeashView::ResetTreeNodes() VOID CLeashView::OnDestroy() { + CCacheDisplayData *elem; SetTrayIcon(NIM_DELETE); - CListView::OnDestroy(); - if (WaitForSingleObject( ticketinfo.lockObj, INFINITE ) != WAIT_OBJECT_0) - throw("Unable to lock ticketinfo"); - BOOL b_destroy = m_destroyTicketsOnExit && ticketinfo.Krb5.btickets; - ReleaseMutex(ticketinfo.lockObj); - - if (b_destroy) - { - if (pLeash_kdestroy()) - { - AfxMessageBox("There is a problem destroying tickets!", - MB_OK|MB_ICONSTOP); + if (m_destroyTicketsOnExit) { + elem = m_ccacheDisplay; + while (elem != NULL) { + kdestroy(elem->m_ccacheName); + elem = elem->m_next; } } + CListView::OnDestroy(); } VOID CLeashView::OnUpdateDestroyTicket(CCmdUI* pCmdUI) |