[v9_8] fix win32 installer

3754.	[cleanup]	win32: Installer now places files in the
			Program Files area rather than system services.
			[RT #35361]

(cherry picked from commit bce9696c7a)
(cherry picked from commit 51dc1b4562)
This commit is contained in:
Evan Hunt
2014-02-20 10:19:19 -08:00
parent 8722167c53
commit 90d36aab62
8 changed files with 135 additions and 102 deletions
+4
View File
@@ -1,3 +1,7 @@
3754. [cleanup] win32: Installer now places files in the
Program Files area rather than system services.
[RT #35361]
3753. [bug] allow-notify was ignoring keys. [RT #35425]
3747. [bug] A race condition could lead to a core dump when
+8 -8
View File
@@ -139,8 +139,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 2,0,0,0
PRODUCTVERSION 2,0,0,0
FILEVERSION 3,0,0,0
PRODUCTVERSION 3,0,0,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -155,14 +155,14 @@ BEGIN
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "Internet Software Consortium"
VALUE "FileDescription", "ISC BIND Install Utility"
VALUE "FileVersion", "2.0.0"
VALUE "CompanyName", "Internet Systems Consortium"
VALUE "FileDescription", "ISC BIND 9 Install Utility"
VALUE "FileVersion", "3.0.0"
VALUE "InternalName", "BINDInstall"
VALUE "LegalCopyright", "Copyright © 2000"
VALUE "LegalCopyright", "Copyright © 2000,2014"
VALUE "OriginalFilename", "BINDInstall.EXE"
VALUE "ProductName", "ISC BIND"
VALUE "ProductVersion", "9.7.0"
VALUE "ProductName", "ISC BIND 9"
VALUE "ProductVersion", "9.10.0"
END
END
BLOCK "VarFileInfo"
+29 -14
View File
@@ -41,9 +41,10 @@
// #define BINARIES_INSTALL
/*
* msvcrt.dll is the release c-runtime library for MSVC. msvcrtd.dll is the debug
* c-runtime library for MSVC. If you have debug binaries you want to have DEBUG_BINARIES
* defined. If you have release binaries you want to have RELEASE_BINARIES defined.
* msvcrt.dll is the release c-runtime library for MSVC. msvcrtd.dll
* is the debug c-runtime library for MSVC. If you have debug
* binaries you want to have DEBUG_BINARIES defined. If you have
* release binaries you want to have RELEASE_BINARIES defined.
* If you have both, then define them both.
* Of course, you need msvcrt[d].dll present to install it!
*/
@@ -57,6 +58,7 @@
#include "BINDInstallDlg.h"
#include "DirBrowse.h"
#include <winsvc.h>
#include <shlobj.h>
#include <named/ntservice.h>
#include <isc/bind_registry.h>
#include <isc/ntgroups.h>
@@ -194,7 +196,8 @@ const FileData installFiles[] =
CBINDInstallDlg::CBINDInstallDlg(CWnd* pParent /*=NULL*/)
: CDialog(CBINDInstallDlg::IDD, pParent) {
char buf[MAX_PATH];
char winsys[MAX_PATH];
char progfiles[MAX_PATH];
//{{AFX_DATA_INIT(CBINDInstallDlg)
m_targetDir = _T("");
@@ -208,13 +211,23 @@ CBINDInstallDlg::CBINDInstallDlg(CWnd* pParent /*=NULL*/)
m_accountPassword = _T("");
m_accountName = _T("");
//}}AFX_DATA_INIT
// Note that LoadIcon does not require a subsequent DestroyIcon in Win32
// Note that LoadIcon does not require a subsequent
// DestroyIcon in Win32
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
GetSystemDirectory(buf, MAX_PATH);
m_winSysDir = buf;
m_defaultDir = buf;
m_defaultDir += "\\dns";
GetSystemDirectory(winsys, MAX_PATH);
m_winSysDir = winsys;
#ifndef _WIN64
SHGetFolderPath(NULL, CSIDL_FLAG_CREATE|CSIDL_PROGRAM_FILESX86,
NULL, SHGFP_TYPE_CURRENT, progfiles);
#else
SHGetFolderPath(NULL, CSIDL_FLAG_CREATE|CSIDL_PROGRAM_FILES,
NULL, SHGFP_TYPE_CURRENT, progfiles);
#endif
m_defaultDir = progfiles;
m_defaultDir += "\\ISC BIND 9";
m_installed = FALSE;
m_accountExists = FALSE;
m_accountUsed = FALSE;
@@ -517,7 +530,7 @@ void CBINDInstallDlg::OnInstall() {
if (!m_toolsOnly) {
if (m_accountExists == FALSE) {
success = CreateServiceAccount(m_accountName.GetBuffer(30),
m_accountPassword.GetBuffer(30));
m_accountPassword.GetBuffer(30));
if (success == FALSE) {
MsgBox(IDS_CREATEACCOUNT_FAILED);
return;
@@ -670,9 +683,10 @@ void CBINDInstallDlg::CopyFiles() {
try {
/*
* Ignore Version checking. We need to make sure that all files get copied regardless
* of whether or not they are earlier or later versions since we cannot guarantee
* that we have either backward or forward compatibility between versions.
* Ignore Version checking. We need to make sure that all files get
* copied regardless of whether or not they are earlier or later
* versions since we cannot guarantee that we have either backward or
* forward compatibility between versions.
*/
bindFile.CopyFileNoVersion(origFile);
}
@@ -966,7 +980,8 @@ void CBINDInstallDlg::UnregisterService(BOOL uninstall) {
DWORD err = GetLastError();
if (err != ERROR_SERVICE_MARKED_FOR_DELETE &&
err != ERROR_SERVICE_DOES_NOT_EXIST) {
MsgBox(IDS_ERR_REMOVE_SERVICE, GetErrMessage());
MsgBox(IDS_ERR_REMOVE_SERVICE,
GetErrMessage());
break;
}
}
+2 -1
View File
@@ -1908,7 +1908,8 @@ if ($use_python ne "no") {
$configcond{"PYTHON"} = 1;
$configdefd{"USE_PYTHON"} = "USE_PYTHON";
$configvar{"PYTHON"} = "$python_command";
$configvar{"prefix"} = "C:\\Windows\\system32\\dns";
# Only a default!
$configvar{"prefix"} = "C:\\Program Files\Isc Bind 9";
}
# with-vcredist
+5 -5
View File
@@ -166,11 +166,11 @@ Step 5: Building BIND
Step 6: Install
Installation is accomplished by running the BINDInstall program. All
DLL's are copied to the system32 area and all applications (including
BINDInstall which may be necessary for uninstalling BIND 9) to the
dns/bin directory. If BIND 8 has previously been installed on the system
it must be uninstalled first by running it's own BINDInstall program.
The BIND 9 installer does not yet do this.
DLL's are copied to the Program Files area and all applications
(including BINDInstall which may be necessary for uninstalling BIND
9) to the bin directory. If BIND 8 has previously been installed on
the system it must be uninstalled first by running it's own
BINDInstall program. The BIND 9 installer does not yet do this.
Note: BINDInstall.exe requires the MFC (Microsoft Foundation Class).
This is only distributed with non-free (i.e., not "Express") versions of
+28 -6
View File
@@ -30,10 +30,10 @@
# Search String: ^(([_a-z0-9])*( ))*prefix_[_a-z0-9]+_[a-z0-9]+( )*\(
# List of directories
@prefixlist = ("isc", "isccfg","dns", "isccc", "libres");
@prefixlist = ("isccc");
@iscdirlist = ("isc/include/isc","isc/win32/include/isc");
@iscprefixlist = ("isc", "isc", "cfg");
@prefixlist = ("isc", "isccfg", "dns", "isccc", "bind9", "lwres", "irs");
@iscdirlist = ("isc/include/isc","isc/win32/include/isc","isc/include/pk11",
"isc/include/pkcs11","isc/win32/include/pkcs11");
@iscprefixlist = ("isc", "pk11", "pkcs");
@isccfgdirlist = ("isccfg/include/isccfg");
@isccfgprefixlist = ("cfg");
@@ -41,12 +41,18 @@
@iscccdirlist = ("isccc/include/isccc");
@iscccprefixlist = ("isccc");
@dnsdirlist = ("dns/include/dns","dns/sec/dst/include/dst");
@dnsdirlist = ("dns/include/dns","dns/include/dst");
@dnsprefixlist = ("dns", "dst");
@lwresdirlist = ("lwres/include/lwres");
@lwresdirlist = ("lwres/include/lwres","lwres/win32/include/lwres");
@lwresprefixlist = ("lwres");
@bind9dirlist = ("bind9/include/bind9");
@bind9prefixlist = ("bind9");
@irsdirlist = ("irs/include/irs","irs/win32/include/irs");
@irsprefixlist = ("irs");
# Run the changes for each directory in the directory list
$ind = 0;
@@ -89,6 +95,22 @@ foreach $dir (@lwresdirlist) {
}
close OUTDEFFILE;
$ind = 0;
createoutfile($bind9prefixlist[0]);
foreach $dir (@bind9dirlist) {
createdeffile($dir, $bind9prefixlist[$ind]);
$ind++;
}
close OUTDEFFILE;
$ind = 0;
createoutfile($irsprefixlist[0]);
foreach $dir (@irsdirlist) {
createdeffile($dir, $irsprefixlist[$ind]);
$ind++;
}
close OUTDEFFILE;
exit;
#
+6 -6
View File
@@ -93,12 +93,12 @@ After the build has completed, run the BuildPost.bat file:
...which does post-build processing.
Installation is accomplished by running the BINDInstall program. All DLL's
are copied to the system32 area and all applications (including BINDInstall
which may be necessary for uninstalling BIND 9) to the dns/bin directory.
If BIND 8 has previously been installed on the system it must be uninstalled
first by running it's own BINDInstall program. The BIND 9 installer does
not yet do this.
Installation is accomplished by running the BINDInstall program. All
DLL's are copied to the Program Files area and all applications
(including BINDInstall which may be necessary for uninstalling BIND 9)
to the bin directory. If BIND 8 has previously been installed on the
system it must be uninstalled first by running it's own BINDInstall
program. The BIND 9 installer does not yet do this.
All bugs found, whether in the process of building the application or
running BIND or the tools should be reported to the bind9 bugs email
+53 -62
View File
@@ -1,25 +1,28 @@
Copyright (C) 2004, 2005, 2007-2009, 2012 Internet Systems Consortium, Inc. ("ISC")
Copyright (C) 2004, 2005, 2007-2009, 2012-2014 Internet Systems Consortium, Inc. ("ISC")
Copyright (C) 2001, 2003 Internet Software Consortium.
See COPYRIGHT in the source root or http://isc.org/copyright.html for terms.
$Id$
NOTES ON BIND 9.8 FOR WINDOWS:
Release of BIND 9.7 for Windows and later.
This is a release of BIND 9.7 for Windows XP and later.
BIND 9.8 is known to run on Windows XP, Vista, Windows 7,
and Windows Server 2003 and higher.
Important Kit Installation Information
KIT INSTALLATION:
As of release 9.3.0, BINDInstall requires that you install it under
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
required to run BIND. If the account does exist it will check that
it has only the one privilege required: "Log on as a service". If
it has too many privileges it will prompt you if you want to continue.
Unpack the kit into any convenient directory and run the BINDInstall
program. This will install the named and associated programs into
the correct directories and set up the required registry keys.
With BIND running under an account name it is necessary for all
BINDInstall requires that you install it under an 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 required to run
BIND. If the account does exist it will check that it has only the
one privilege required: "Log on as a service". If it has too many
privileges it will prompt you if you want to continue.
With BIND running under an account name, it is necessary for all
files and directories that BIND uses to have permissions set up for
the named account if the files are on an NTFS disk. BIND requires
that the account have read and write access to the directory for
@@ -28,45 +31,37 @@ or for master zones supporting dynamic updates. The account will
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.
"NT AUTHORITY\LocalService" is also an acceptable account
(and the only acceptable on some recent versions of Windows).
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).
named.conf (default %ProgramFiles%\ISC BIND 9\etc\named.conf). For
example:
e.g.
options {
directory "C:\WINDOWS\system32\dns\etc";
directory "C:\Program Files (x86)\ISC BIND 9\etc";
};
If you have previously installed BIND 8 or BIND 4 on the system
that you wish to install this kit, you MUST use the BIND 8 or BIND
4 installer to uninstall the previous kit. For BIND 8.2.x, you can
use the BINDInstall that comes with the BIND 8 kit to uninstall it.
The BIND 9 installer will NOT uninstall the BIND 8 binaries. That
will be fixed in a future release.
Unpack the kit into any convenient directory and run the BINDInstall
program. This will install the named and associated programs into
the correct directories and set up the required registry keys.
for a 32 bit BIND on a 64 bit US Domestic indows system.
Messages are logged to the Application log in the EventViewer.
Controlling BIND
CONTROLLING BIND:
Windows uses the same rndc program as is used on Unix systems. The
rndc.conf file must be configured for your system in order to work.
You will need to generate a key for this. To do this use the
rndc-confgen program. The program will be installed in the same
directory as named: dns/bin/. From the DOS prompt, use the command
directory as named: dns\bin. From the DOS prompt, use the command
this way:
rndc-confgen -a
which will create a rndc.key file in the dns/etc directory. This will
which will create a rndc.key file in the dns\etc directory. This will
allow you to run rndc without an explicit rndc.conf file or key and
control entry in named.conf file. See section 3.4.1.2 of the ARM for
details of this. An rndc.conf can also be generated by running:
@@ -74,13 +69,13 @@ details of this. An rndc.conf can also be generated by running:
rndc-confgen > rndc.conf
which will create the rndc.conf file in the current directory, but
not copy it to the dns/etc directory where it needs to reside. If
not copy it to the dns\etc directory where it needs to reside. If
you create rndc.conf this way you will need to copy the same key
statement into named.conf.
The additions look like the following:
key "rndc-key" { algorithm hmac-md5; secret "xxxxxxxxx=="; };
key "rndc-key" { algorithm hmac-sha256; secret "xxxxxxxxx=="; };
controls {
inet 127.0.0.1 port 953 allow { localhost; } keys { "rndc-key"; };
@@ -96,7 +91,7 @@ servers you wish to control, specifically the IP address and key
in both named.conf and rndc.conf. Again see section 3.4.1.2 of the
ARM for details.
In order to you rndc from a different system it is important to
In order to run rndc from a different system it is important to
ensure that the clocks are synchronized. The clocks must be kept
within 5 minutes of each other or the rndc commands will fail
authentication. Use NTP or other time synchronization software to
@@ -112,7 +107,7 @@ working directory when started as a service. If you wish to use
relative files in named.conf you will need to specify a working
directory using the directory directive options.
Documentation
DOCUMENTATION:
This kit includes Documentation in HTML format. The documentation
is not copied during the installation process so you should move
@@ -121,39 +116,35 @@ importance is the BIND 9 Administrator's Reference Manual (Bv9ARM*.html)
which provides detailed information on BIND 9. In addition, there
are HTML pages for each of the BIND 9 applications.
DNS Tools
INCLUDED TOOLS:
The following tools have been built for Windows: dig, nslookup,
host, nsupdate, rndc, rndc-confgen, named-checkconf, named-checkzone,
dnssec-keygen, dnssec-signzone, dnssec-dsfromkey and dnssec-keyfromlabel.
The latter tools are for use with DNSSEC. All tools are installed
in the dns/bin directory.
host, nsupdate, ddns-confgen, rndc, rndc-confgen, named-checkconf,
named-checkzone, named-compilezone, named-journalprint,
dnssec-keygen, dnssec-signzone, dnssec-dsfromkey, dnssec-keyfromlabel,
dnssec-revoke, dnssec-settime. The latter tools are for use with DNSSEC.
All tools are installed in the dns\bin directory.
IMPORTANT NOTE ON USING THE TOOLS:
It is no longer necessary to create a resolv.conf file on Windows
as the tools will look in the registry for the required nameserver
information. However if you wish to create a resolv.conf file as
follows it will use it in preference to the registry nameserver
as the tools will look in the registry for the required name server
information. However, if you do create a resolv.conf file as follows,
the tools will use it in preference to the registry name server
entries.
To create a resolv.conf you need to place it in the System32\Drivers\etc
directory and it needs to contain a list of nameserver addresses
to use to find the nameserver authoritative for the zone. The format
of this file is:
Place resolv.conf the "ISC BIND 9"\etc directory. It must
contain a list of recursive server addresses. The format of this
file is:
nameserver 1.2.3.4
nameserver 5.6.7.8
Replace the IP addresses with your real addresses. 127.0.0.1 is a
valid address if you are running a nameserver on the localhost.
Replace the above IP addresses with the real name server addresses.
127.0.0.1 is a valid address if you are running a recursive name
server on the localhost.
Problems
Please report all problems to bind9-bugs@isc.org and not to me. All
other questions should go to the bind-users@isc.org mailing list
or the comp.protocol.dns.bind news group.
Danny Mayer
mayer@ntp.isc.org
PROBLEMS:
Please report bugs to bind9-bugs@isc.org. Other questions can go
to the bind-users@isc.org mailing list.