* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: BINDInstallDlg.cpp,v 1.37.24.3 2009/09/02 00:29:56 marka Exp $ */
+/* $Id: BINDInstallDlg.cpp,v 1.37.24.4 2009/09/02 00:30:44 marka Exp $ */
/*
* Copyright (c) 1999-2000 by Nortel Networks Corporation
#define MAX_GROUPS 100
#define MAX_PRIVS 50
+#define LOCAL_SERVICE "NT AUTHORITY\\LocalService"
+
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
UpdateData();
- if (!m_toolsOnly) {
+ if (!m_toolsOnly && m_accountName != LOCAL_SERVICE) {
/*
* Check that the Passwords entered match.
*/
return;
}
}
+ } else if (m_accountName == LOCAL_SERVICE) {
+ /* The LocalService always exists. */
+ m_accountExists = TRUE;
+ if (m_accountName != m_currentAccount)
+ m_accountUsed = FALSE;
}
/* Directories */
}
RegCloseKey(hKey);
- if(keyFound == FALSE)
+ if (keyFound == FALSE)
m_accountName = "";
- else {
- /*
- * LocalSystem is not a regular account and is equivalent
- * to no account but with lots of privileges
- */
+ else if (!strcmp(accountName, LOCAL_SERVICE)) {
+ m_accountName = LOCAL_SERVICE;
+ m_accountUsed = TRUE;
+ } else {
+ /*
+ * LocalSystem is not a regular account and is equivalent
+ * to no account but with lots of privileges
+ */
Tmp = accountName;
if (Tmp == ".\\LocalSystem")
m_accountName = "";
CBINDInstallDlg::RegisterService() {
SC_HANDLE hSCManager;
SC_HANDLE hService;
- CString StartName = ".\\" + m_accountName;
-
- if(m_toolsOnly)
- return;
+ CString StartName;
+ if (m_accountName == LOCAL_SERVICE)
+ StartName = LOCAL_SERVICE;
+ else
+ StartName = ".\\" + m_accountName;
/*
* We need to change the service rather than create it
* if the service already exists. Do nothing if we are already
* using that account
*/
- if(m_serviceExists == TRUE) {
- if(m_accountUsed == FALSE) {
- UpdateService();
+ if (m_serviceExists == TRUE) {
+ if (m_accountUsed == FALSE) {
+ UpdateService(StartName);
SetItemStatus(IDC_REG_SERVICE);
return;
- }
- else {
+ } else {
SetItemStatus(IDC_REG_SERVICE);
return;
}
}
void
-CBINDInstallDlg::UpdateService() {
+CBINDInstallDlg::UpdateService(CString StartName) {
SC_HANDLE hSCManager;
SC_HANDLE hService;
- CString StartName = ".\\" + m_accountName;
if(m_toolsOnly)
return;
if (hSCManager)
CloseServiceHandle(hSCManager);
return;
- }
- else {
+ } else {
if (ChangeServiceConfig(hService, dwServiceType, dwStart,
SERVICE_ERROR_NORMAL, namedLoc, NULL, NULL, NULL,
- StartName, m_accountPassword,BIND_DISPLAY_NAME)
+ StartName, m_accountPassword, BIND_DISPLAY_NAME)
!= TRUE) {
DWORD err = GetLastError();
MsgBox(IDS_ERR_UPDATE_SERVICE, GetErrMessage());
Copyright (C) 2001, 2003 Internet Software Consortium.
See COPYRIGHT in the source root or http://isc.org/copyright.html for terms.
-$Id: readme1st.txt,v 1.18.168.4 2009/06/22 23:46:43 tbox Exp $
+$Id: readme1st.txt,v 1.18.168.5 2009/09/02 00:30:44 marka Exp $
Release of BIND 9.5 for Windows XP and later.
Important Kit Installation Information
As of release 9.3.0, BINDInstall requires that you install it under
-an account with restricted privileges. The installer will prompt
+a account with restricted privileges. The installer will prompt
you for an account name, the default is "named", and a password for
that account. It will also check for the existence of that account.
If it does not exist is will create it with only the privileges
also need read access to the named.conf and any other file that it
needs to read.
+"NT AUTHORITY\LocalService" is also an acceptable account. This
+account is built into Windows and no password is required. Appropriate
+file permissions will also need to be set for "NT AUTHORITY\LocalService"
+similar to those that would have been required for the "named" account.
+
It is important that on Windows the directory directive is used in
the options section to tell BIND where to find the files used in
named.conf (default %WINDOWS%\system32\dns\etc\named.conf).