From a193405623427b9c0de034ebd3f6e982c745853b Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Mon, 28 Jun 2004 17:33:20 +0000 Subject: [PATCH] afscreds-aklog-only-20040626 Modify the Obtain Tokens dialog to allow a blank password if a full principal name is provided. (for aklog only requests) --- src/WINNT/client_creds/credstab.cpp | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/src/WINNT/client_creds/credstab.cpp b/src/WINNT/client_creds/credstab.cpp index f6bfc444c..2ab0949fb 100644 --- a/src/WINNT/client_creds/credstab.cpp +++ b/src/WINNT/client_creds/credstab.cpp @@ -329,19 +329,20 @@ void NewCreds_OnInitDialog (HWND hDlg) void NewCreds_OnEnable (HWND hDlg) { - BOOL fEnable = TRUE; - - TCHAR szUser[ cchRESOURCE ]; - GetDlgItemText (hDlg, IDC_NEWCREDS_USER, szUser, cchRESOURCE); - if (!szUser[0]) - fEnable = FALSE; - - TCHAR szPassword[ cchRESOURCE ]; - GetDlgItemText (hDlg, IDC_NEWCREDS_PASSWORD, szPassword, cchRESOURCE); - if (!szPassword[0]) - fEnable = FALSE; - - EnableWindow (GetDlgItem (hDlg, IDOK), fEnable); + BOOL fEnable = TRUE; + + TCHAR szUser[ cchRESOURCE ]; + GetDlgItemText (hDlg, IDC_NEWCREDS_USER, szUser, cchRESOURCE); + if (!szUser[0]) + fEnable = FALSE; + + if ( !strchr(szUser, '@') ) { + TCHAR szPassword[ cchRESOURCE ]; + GetDlgItemText (hDlg, IDC_NEWCREDS_PASSWORD, szPassword, cchRESOURCE); + if (!szPassword[0]) + fEnable = FALSE; + } + EnableWindow (GetDlgItem (hDlg, IDOK), fEnable); } -- 2.39.5