]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Add 'Remember this principal' checkbox
authorKevin Wasserman <kevin.wasserman@painless-security.com>
Tue, 3 Jul 2012 14:19:40 +0000 (10:19 -0400)
committerTom Yu <tlyu@mit.edu>
Wed, 29 Aug 2012 18:56:37 +0000 (14:56 -0400)
Added to the 'Get Tickets' dialog.

Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com>
(cherry picked from commit 4c6bbfe0aa0faa166b1a1096a79dfc1d43e77023)

ticket: 7298
status: resolved

src/windows/leashdll/leashids.h
src/windows/leashdll/lsh_pwd.c
src/windows/leashdll/lsh_pwd.rc

index 7a8718ee427c49a5fb15d31d003033935a6afc3e..94e05b6b608aa3d482469cada85999210bd0b171 100644 (file)
 #define IDC_STATIC_RENEW                1090
 #define IDD_PASSWORD                    1091
 #define IDC_BUTTON_CLEAR_HISTORY        1092
+#define IDC_CHECK_REMEMBER_PRINCIPAL    1093
 #define IDC_EDIT_PASSWORD2              1192
 #define IDC_STATIC_PWD2                 1193
 #define IDC_EDIT_PASSWORD3              1194
index c45fa1c6829575a4aa8ae82bf6401b519b369f1f..0b753009391a0ad504e0d917b58098a742aed775 100644 (file)
@@ -1281,6 +1281,7 @@ AdjustOptions(HWND hDialog, int show, int hideDiff)
     ShowWindow(GetDlgItem(hDialog,IDC_CHECK_RENEWABLE),show);
     ShowWindow(GetDlgItem(hDialog,IDC_STATIC_KRB5),show);
     ShowWindow(GetDlgItem(hDialog,IDC_BUTTON_CLEAR_HISTORY),show);
+    ShowWindow(GetDlgItem(hDialog,IDC_CHECK_REMEMBER_PRINCIPAL),show);
 
     GetWindowRect( hDialog, &dlgRect );
     diff = dlgRect.top + GetSystemMetrics(SM_CYCAPTION)
@@ -1444,6 +1445,7 @@ AuthenticateProc(
                     Leash_get_default_life_max(),
                     lifetime );
 
+        CheckDlgButton(hDialog, IDC_CHECK_REMEMBER_PRINCIPAL, TRUE);
        /* Set Forwardable checkbox */
        CheckDlgButton(hDialog, IDC_CHECK_FORWARDABLE, forwardable);
        /* Set NoAddress checkbox */
@@ -1718,7 +1720,8 @@ AuthenticateProc(
                     lpdi->out.realm[LEASH_REALM_SZ-1] = 0;
                 }
 */
-                Leash_pec_add_principal(principal);
+                if (IsDlgButtonChecked(hDialog, IDC_CHECK_REMEMBER_PRINCIPAL))
+                    Leash_pec_add_principal(principal);
 
                 CloseMe(TRUE); /* success */
                 return FALSE;
index c12c5481e1167a9e52af8c94a167850869221da6..88f1a9725a2ac5ab9686f77bf36eaa9822c51fb1 100644 (file)
@@ -104,6 +104,8 @@ BEGIN
     PUSHBUTTON      "Cancel",IDCANCEL,249,219,49,14
     PUSHBUTTON      "Hide Advanced",IDC_BUTTON_OPTIONS,146,219,89,14
     PUSHBUTTON      "Clear History",IDC_BUTTON_CLEAR_HISTORY,288,42,60,14
+    CONTROL         "Remember this principal", IDC_CHECK_REMEMBER_PRINCIPAL,
+                    "Button", BS_AUTOCHECKBOX | WS_TABSTOP,248,78,100,14
     CONTROL         "Ticket Lifetime",IDC_SLIDER_LIFETIME,"msctls_trackbar32",
                     TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,90,97,258,15
     CONTROL         "Forwardable and Proxiable (can be forwarded to other machines)",