WS_SYSMENU
EXSTYLE WS_EX_APPWINDOW
CAPTION "BIND 9 Installer"
-FONT 8, "MS Sans Serif"
+FONT 8, "MS Sans Serif",0,0,0x1
BEGIN
EDITTEXT IDC_TARGETDIR,7,62,196,14,ES_AUTOHSCROLL
EDITTEXT IDC_ACCOUNT_NAME,7,94,196,14,ES_AUTOHSCROLL
IDS_CREATEACCOUNT_FAILED "Unable to Create Account for the Service."
IDS_ERR_PASSWORD "Passwords entered did not match. Please reenter password."
IDS_ERR_UPDATE_SERVICE "Error updating service\n(%s)"
+ IDS_ERR_NULLPASSWORD "Service account password cannot be null"
+ IDS_ERR_WHITESPACE "Service account password has leading/trailing whitespace"
END
#endif // English (U.S.) resources
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: BINDInstallDlg.cpp,v 1.15.18.5 2005/09/07 14:25:16 marka Exp $ */
+/* $Id: BINDInstallDlg.cpp,v 1.15.18.6 2005/10/11 22:56:46 marka Exp $ */
/*
* Copyright (c) 1999-2000 by Nortel Networks Corporation
*/
void CBINDInstallDlg::OnInstall() {
BOOL success = FALSE;
+ int oldlen;
if (CheckBINDService())
StopBINDService();
UpdateData();
- /* Check that the Passwords entered match */
+ /*
+ * Check that the Passwords entered match.
+ */
if (m_accountPassword != m_accountPasswordConfirm) {
MsgBox(IDS_ERR_PASSWORD);
return;
}
- /* Check the entered account name */
+ /*
+ * Check that there is not leading / trailing whitespace.
+ * This is for compatability with the standard password dialog.
+ * Passwords really should be treated as opaque blobs.
+ */
+ oldlen = m_accountPassword.GetLength();
+ m_accountPassword.TrimLeft();
+ m_accountPassword.TrimRight();
+ if (m_accountPassword.GetLength() != oldlen) {
+ MsgBox(IDS_ERR_WHITESPACE);
+ return;
+ }
+
+ /*
+ * Check that the Password is not null.
+ */
+ if (m_accountPassword.GetLength() == 0) {
+ MsgBox(IDS_ERR_NULLPASSWORD);
+ return;
+ }
+
+ /*
+ * Check the entered account name.
+ */
if (ValidateServiceAccount() == FALSE)
return;
- /* For Registration we need to know if account was changed */
+ /*
+ * For Registration we need to know if account was changed.
+ */
if(m_accountName != m_currentAccount)
m_accountUsed = FALSE;
SetCurrent(IDS_ADD_REMOVE);
if (RegCreateKey(HKEY_LOCAL_MACHINE, BIND_UNINSTALL_SUBKEY,
- &hKey) == ERROR_SUCCESS) {
- char winDir[MAX_PATH];
+ &hKey) == ERROR_SUCCESS) {
CString buf(BIND_DISPLAY_NAME);
- GetWindowsDirectory(winDir, MAX_PATH);
RegSetValueEx(hKey, "DisplayName", 0, REG_SZ,
(LPBYTE)(LPCTSTR)buf, buf.GetLength());
- buf.Format("%s\\BINDInstall.exe", winDir);
+ buf.Format("%s\\BINDInstall.exe", m_binDir);
RegSetValueEx(hKey, "UninstallString", 0, REG_SZ,
(LPBYTE)(LPCTSTR)buf, buf.GetLength());
RegCloseKey(hKey);
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: thread.h,v 1.16.18.3 2005/09/18 07:58:09 marka Exp $ */
+/* $Id: thread.h,v 1.16.18.4 2005/10/11 22:56:47 marka Exp $ */
#ifndef ISC_THREAD_H
#define ISC_THREAD_H 1
isc_thread_key_create(isc_thread_key_t *key, void (*func)(void *));
int
-isc_thread_key_destroy(isc_thread_key_t key);
+isc_thread_key_delete(isc_thread_key_t key);
void *
isc_thread_key_getspecific(isc_thread_key);