summaryrefslogtreecommitdiffstats
path: root/src/windows
diff options
context:
space:
mode:
authorJeffrey Altman <jaltman@secure-endpoints.com>2007-10-01 05:19:05 +0000
committerJeffrey Altman <jaltman@secure-endpoints.com>2007-10-01 05:19:05 +0000
commit3049880351ffffb3df327dc845807b9611dd0f47 (patch)
tree7a6d65e54de7d14499df072d349e7a3bc89b8f03 /src/windows
parent3c67ca0a927ce73e61ec9c9c1b036ae1aed9e72b (diff)
downloadkrb5-3049880351ffffb3df327dc845807b9611dd0f47.tar.gz
krb5-3049880351ffffb3df327dc845807b9611dd0f47.tar.xz
krb5-3049880351ffffb3df327dc845807b9611dd0f47.zip
NIM: BUG: APP: leaking prompts in obtain new credentials dialog
The Kerberos v5 plug-in for Network Identity Manager was not clearing the list of prompts properly when a user changes the active identity in the new credentials dialog. The stale prompts would be visible to the user if the newly selected identity is invalid or the new identity cannot be validated. This patch clears the prompts if there is an identity change. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20028 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/windows')
-rw-r--r--src/windows/identity/plugins/krb5/krb5newcreds.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/windows/identity/plugins/krb5/krb5newcreds.c b/src/windows/identity/plugins/krb5/krb5newcreds.c
index 410393caf..6b64302c3 100644
--- a/src/windows/identity/plugins/krb5/krb5newcreds.c
+++ b/src/windows/identity/plugins/krb5/krb5newcreds.c
@@ -2039,10 +2039,22 @@ k5_msg_cred_dialog(khm_int32 msg_type,
/* if the fiber is already in a kinit, cancel it */
if(g_fjob.state == FIBER_STATE_KINIT) {
+ khm_boolean clear_prompts = TRUE;
+
+ khui_cw_lock_nc(nc);
+ if (nc->n_identities > 0 &&
+ kcdb_identity_is_equal(nc->identities[0], g_fjob.identity)) {
+ clear_prompts = FALSE;
+ }
+ khui_cw_unlock_nc(nc);
+
g_fjob.command = FIBER_CMD_CANCEL;
SwitchToFiber(k5_kinit_fiber);
/* we get here when the cancel operation completes */
k5_free_kinit_job();
+
+ if (clear_prompts)
+ khui_cw_clear_prompts(nc);
}
khui_cw_lock_nc(nc);