aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffrey Altman <jaltman@secure-endpoints.com>2006-08-23 02:18:00 +0000
committerJeffrey Altman <jaltman@secure-endpoints.com>2006-08-23 02:18:00 +0000
commitab8a52bf085d13537d1c39f04139c10254e15b2b (patch)
treee86ced6ef6a9caf8d73fb558a4cad094931847bd
parent78ed38bd8bc1e74aedea35deff3cc598ae1c79e4 (diff)
downloadkrb5-ab8a52bf085d13537d1c39f04139c10254e15b2b.zip
krb5-ab8a52bf085d13537d1c39f04139c10254e15b2b.tar.gz
krb5-ab8a52bf085d13537d1c39f04139c10254e15b2b.tar.bz2
* newcredwnd.c - erase the password field on error
during new credential acquisition ticket: 4172 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18497 dc483132-0cff-0310-8789-dd5450dbe970
-rw-r--r--src/windows/identity/ui/newcredwnd.c28
1 files changed, 27 insertions, 1 deletions
diff --git a/src/windows/identity/ui/newcredwnd.c b/src/windows/identity/ui/newcredwnd.c
index a12942a..1c5d194 100644
--- a/src/windows/identity/ui/newcredwnd.c
+++ b/src/windows/identity/ui/newcredwnd.c
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2005 Massachusetts Institute of Technology
+ * Copyright (c) 2006 Secure Endpoints Inc.
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
@@ -239,6 +240,30 @@ nc_notify_types(khui_new_creds * c, UINT uMsg,
}
}
+static void
+nc_clear_password_fields(khui_nc_wnd_data * d)
+{
+ khm_size i;
+ khm_boolean need_sync = FALSE;
+
+ khui_cw_lock_nc(d->nc);
+
+ for (i=0; i < d->nc->n_prompts; i++) {
+ if ((d->nc->prompts[i]->flags & KHUI_NCPROMPT_FLAG_HIDDEN) &&
+ d->nc->prompts[i]->hwnd_edit) {
+ SetWindowText(d->nc->prompts[i]->hwnd_edit,
+ L"");
+ need_sync = TRUE;
+ }
+ }
+
+ khui_cw_unlock_nc(d->nc);
+
+ if (need_sync) {
+ khui_cw_sync_prompt_values(d->nc);
+ }
+}
+
#define NC_MAXCCH_CREDTEXT 16384
#define NC_MAXCB_CREDTEXT (NC_MAXCCH_CREDTEXT * sizeof(wchar_t))
@@ -271,7 +296,6 @@ nc_update_credtext(khui_nc_wnd_data * d)
khm_size cbbuf;
khm_int32 flags;
-
LoadString(khm_hInstance, IDS_NC_CREDTEXT_ID_ONE,
main_fmt, (int) ARRAYLENGTH(main_fmt));
@@ -1674,6 +1698,8 @@ static LRESULT nc_handle_wm_nc_notify(HWND hwnd,
hw = GetDlgItem(d->dlg_bb, IDCANCEL);
EnableWindow(hw, TRUE);
+ nc_clear_password_fields(d);
+
return TRUE;
}