From: Jeffrey Altman Date: Mon, 28 Jun 2004 17:33:20 +0000 (+0000) Subject: afscreds-aklog-only-20040626 X-Git-Tag: openafs-devel-1_3_66~71 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=a193405623427b9c0de034ebd3f6e982c745853b;p=packages%2Fo%2Fopenafs.git 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) --- 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); }