trusted-keys Statement Definition
+trusted-keys Statement Grammar
+trusted-keys Statement Definition
and Usage
view Statement Grammar
-view Statement Definition and Usage
+view Statement Definition and Usage
zone
Statement Grammar
-zone Statement Definition and Usage
+zone Statement Definition and Usage
-Zone File
+Zone File
- Types of Resource Records and When to Use Them
-- Discussion of MX Records
+- Discussion of MX Records
- Setting TTLs
-- Inverse Mapping in IPv4
-- Other Zone File Directives
-- BIND Master File Extension: the $GENERATE Directive
+- Inverse Mapping in IPv4
+- Other Zone File Directives
+- BIND Master File Extension: the $GENERATE Directive
- Additional File Formats
7. BIND 9 Security Considerations
- Access Control Lists
-- chroot and setuid
+- chroot and setuid
-- The chroot Environment
-- Using the setuid Function
+- The chroot Environment
+- Using the setuid Function
- Dynamic Update Security
8. Troubleshooting
-- Common Problems
-- It's not working; how can I figure out what's wrong?
-- Incrementing and Changing the Serial Number
-- Where Can I Get Help?
+- Common Problems
+- It's not working; how can I figure out what's wrong?
+- Incrementing and Changing the Serial Number
+- Where Can I Get Help?
A. Appendices
-- Acknowledgments
+- Acknowledgments
- A Brief History of the DNS and BIND
-- General DNS Reference Information
+- General DNS Reference Information
- IPv6 addresses (AAAA)
- Bibliography (and Suggested Reading)
- Request for Comments (RFCs)
- Internet Drafts
-- Other Documents About BIND
+- Other Documents About BIND
I. Manual pages
diff --git a/doc/arm/man.dig.html b/doc/arm/man.dig.html
index 99585a90f6..fed8ea416b 100644
--- a/doc/arm/man.dig.html
+++ b/doc/arm/man.dig.html
@@ -14,7 +14,7 @@
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-->
-
+
@@ -52,7 +52,7 @@
dig [global-queryopt...] [query...]
-
DESCRIPTION
+
DESCRIPTION
dig
(domain information groper) is a flexible tool
for interrogating DNS name servers. It performs DNS lookups and
@@ -91,7 +91,7 @@
-
SIMPLE USAGE
+
SIMPLE USAGE
A typical invocation of dig looks like:
@@ -137,7 +137,7 @@
-
OPTIONS
+
OPTIONS
The -b option sets the source IP address of the query
to address. This must be a valid
@@ -237,7 +237,7 @@
-
QUERY OPTIONS
+
QUERY OPTIONS
dig
provides a number of query options which affect
the way in which lookups are made and the results displayed. Some of
@@ -556,7 +556,7 @@
-
MULTIPLE QUERIES
+
MULTIPLE QUERIES
The BIND 9 implementation of dig
supports
@@ -602,7 +602,7 @@ dig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr
-
IDN SUPPORT
+
IDN SUPPORT
If dig has been built with IDN (internationalized
domain name) support, it can accept and display non-ASCII domain names.
@@ -616,14 +616,14 @@ dig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr
-
FILES
+
FILES
/etc/resolv.conf
${HOME}/.digrc
-
SEE ALSO
+
SEE ALSO
host(1),
named(8),
dnssec-keygen(8),
@@ -631,7 +631,7 @@ dig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr
-
BUGS
+
BUGS
There are probably too many query options.
diff --git a/doc/arm/man.dnssec-keygen.html b/doc/arm/man.dnssec-keygen.html
index d36024afaf..14f1aece73 100644
--- a/doc/arm/man.dnssec-keygen.html
+++ b/doc/arm/man.dnssec-keygen.html
@@ -14,7 +14,7 @@
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-->
-
+
@@ -50,7 +50,7 @@
dnssec-keygen {-a algorithm} {-b keysize} {-n nametype} [-c class] [-e] [-f flag] [-g generator] [-h] [-k] [-p protocol] [-r randomdev] [-s strength] [-t type] [-v level] {name}
-
DESCRIPTION
+
DESCRIPTION
dnssec-keygen
generates keys for DNSSEC (Secure DNS), as defined in RFC 2535
and RFC <TBA\>. It can also generate keys for use with
@@ -58,7 +58,7 @@
-
OPTIONS
+
OPTIONS
- -a
algorithm
-
@@ -166,7 +166,7 @@
-
GENERATED KEYS
+
GENERATED KEYS
When dnssec-keygen completes
successfully,
@@ -212,7 +212,7 @@
-
EXAMPLE
+
EXAMPLE
To generate a 768-bit DSA key for the domain
example.com, the following command would be
@@ -233,7 +233,7 @@
-
SEE ALSO
+
SEE ALSO
dnssec-signzone(8),
BIND 9 Administrator Reference Manual,
RFC 2535,
@@ -242,7 +242,7 @@
-
AUTHOR
+
AUTHOR
Internet Systems Consortium
diff --git a/doc/arm/man.dnssec-signzone.html b/doc/arm/man.dnssec-signzone.html
index 31d0b4c1e9..889f4f9b4c 100644
--- a/doc/arm/man.dnssec-signzone.html
+++ b/doc/arm/man.dnssec-signzone.html
@@ -14,7 +14,7 @@
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-->
-
+
@@ -50,7 +50,7 @@
dnssec-signzone [-a] [-c class] [-d directory] [-e end-time] [-f output-file] [-g] [-h] [-k key] [-l domain] [-i interval] [-I input-format] [-j jitter] [-n nthreads] [-o origin] [-O output-format] [-p] [-r randomdev] [-s start-time] [-t] [-v level] [-z] {zonefile} [key...]
-
DESCRIPTION
+
DESCRIPTION
dnssec-signzone
signs a zone. It generates
NSEC and RRSIG records and produces a signed version of the
@@ -61,7 +61,7 @@
-
EXAMPLE
+
EXAMPLE
The following command signs the example.com
zone with the DSA key generated in the dnssec-keygen
@@ -264,14 +264,14 @@
-
SEE ALSO
+
SEE ALSO
dnssec-keygen(8),
BIND 9 Administrator Reference Manual,
RFC 2535.
-
AUTHOR
+
AUTHOR
Internet Systems Consortium
diff --git a/doc/arm/man.host.html b/doc/arm/man.host.html
index ac8561c82a..ea7608884d 100644
--- a/doc/arm/man.host.html
+++ b/doc/arm/man.host.html
@@ -14,7 +14,7 @@
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-->
-
+
@@ -50,7 +50,7 @@
host [-aCdlnrsTwv] [-c class] [-N ndots] [-R number] [-t type] [-W wait] [-m flag] [-4] [-6] {name} [server]
-
DESCRIPTION
+
DESCRIPTION
host
is a simple utility for performing DNS lookups.
It is normally used to convert names to IP addresses and vice versa.
@@ -202,7 +202,7 @@
-
IDN SUPPORT
+
IDN SUPPORT
If host has been built with IDN (internationalized
domain name) support, it can accept and display non-ASCII domain names.
@@ -216,12 +216,12 @@
-
FILES
+
FILES
/etc/resolv.conf
-
SEE ALSO
+
SEE ALSO
dig(1),
named(8).
diff --git a/doc/arm/man.named-checkconf.html b/doc/arm/man.named-checkconf.html
index d568329efb..2737ab24c9 100644
--- a/doc/arm/man.named-checkconf.html
+++ b/doc/arm/man.named-checkconf.html
@@ -14,7 +14,7 @@
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-->
-
+
@@ -50,14 +50,14 @@
named-checkconf [-v] [-j] [-t directory] {filename} [-z]
-
DESCRIPTION
+
DESCRIPTION
named-checkconf
checks the syntax, but not the semantics, of a named
configuration file.
-
OPTIONS
+
OPTIONS
- -t
directory
@@ -88,20 +88,20 @@
-
RETURN VALUES
+
RETURN VALUES
named-checkconf
returns an exit status of 1 if
errors were detected and 0 otherwise.
-
SEE ALSO
+
SEE ALSO
named(8),
BIND 9 Administrator Reference Manual.
-
AUTHOR
+
AUTHOR
Internet Systems Consortium
diff --git a/doc/arm/man.named-checkzone.html b/doc/arm/man.named-checkzone.html
index d5a6b683d0..ec17b59925 100644
--- a/doc/arm/man.named-checkzone.html
+++ b/doc/arm/man.named-checkzone.html
@@ -14,7 +14,7 @@
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-->
-
+
@@ -51,7 +51,7 @@
named-compilezone [-d] [-j] [-q] [-v] [-c class] [-C mode] [-f format] [-F format] [-i mode] [-k mode] [-m mode] [-n mode] [-o filename] [-s style] [-t directory] [-w directory] [-D] [-W mode] {zonename} {filename}
-
DESCRIPTION
+
DESCRIPTION
named-checkzone
checks the syntax and integrity of a zone file. It performs the
same checks as named does when loading a
@@ -71,7 +71,7 @@
-
RETURN VALUES
+
RETURN VALUES
named-checkzone
returns an exit status of 1 if
errors were detected and 0 otherwise.
-
SEE ALSO
+
SEE ALSO
named(8),
RFC 1035,
BIND 9 Administrator Reference Manual.
-
AUTHOR
+
AUTHOR
Internet Systems Consortium
diff --git a/doc/arm/man.named.html b/doc/arm/man.named.html
index 21a0e180d9..ff6a1f4b14 100644
--- a/doc/arm/man.named.html
+++ b/doc/arm/man.named.html
@@ -14,7 +14,7 @@
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-->
-
+
@@ -50,7 +50,7 @@
named [-4] [-6] [-c config-file] [-d debug-level] [-f] [-g] [-n #cpus] [-p port] [-s] [-t directory] [-u user] [-v] [-x cache-file]
-
DESCRIPTION
+
DESCRIPTION
named
is a Domain Name System (DNS) server,
part of the BIND 9 distribution from ISC. For more
@@ -65,7 +65,7 @@
-
SIGNALS
+
SIGNALS
In routine operation, signals should not be used to control
the nameserver; rndc should be used
@@ -219,7 +219,7 @@
-
CONFIGURATION
+
CONFIGURATION
The named configuration file is too complex
to describe in detail here. A complete description is provided
@@ -228,7 +228,7 @@
-
FILES
+
FILES
/etc/named.conf
@@ -241,7 +241,7 @@
-
SEE ALSO
+
SEE ALSO
RFC 1033,
RFC 1034,
RFC 1035,
@@ -251,7 +251,7 @@
-
AUTHOR
+
AUTHOR
Internet Systems Consortium
diff --git a/doc/arm/man.rndc-confgen.html b/doc/arm/man.rndc-confgen.html
index fbd8ead682..5cc468e90d 100644
--- a/doc/arm/man.rndc-confgen.html
+++ b/doc/arm/man.rndc-confgen.html
@@ -14,7 +14,7 @@
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-->
-
+
@@ -48,7 +48,7 @@
rndc-confgen [-a] [-b keysize] [-c keyfile] [-h] [-k keyname] [-p port] [-r randomfile] [-s address] [-t chrootdir] [-u user]
-
DESCRIPTION
+
DESCRIPTION
rndc-confgen
generates configuration files
for rndc. It can be used as a
@@ -64,7 +64,7 @@
-
EXAMPLES
+
EXAMPLES
To allow rndc to be used with
no manual configuration, run
@@ -188,7 +188,7 @@
-
SEE ALSO
+
SEE ALSO
rndc(8),
rndc.conf(5),
named(8),
@@ -196,7 +196,7 @@
-
AUTHOR
+
AUTHOR
Internet Systems Consortium
diff --git a/doc/arm/man.rndc.conf.html b/doc/arm/man.rndc.conf.html
index 0b4db4db3b..82db8b60fe 100644
--- a/doc/arm/man.rndc.conf.html
+++ b/doc/arm/man.rndc.conf.html
@@ -14,7 +14,7 @@
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-->
-
+
@@ -50,7 +50,7 @@
-
DESCRIPTION
+
DESCRIPTION
rndc.conf is the configuration file
for rndc, the BIND 9 name server control
utility. This file has a similar structure and syntax to
@@ -135,7 +135,7 @@
-
EXAMPLE
+
EXAMPLE
options {
default-server localhost;
@@ -209,7 +209,7 @@
-
NAME SERVER CONFIGURATION
+
NAME SERVER CONFIGURATION
The name server must be configured to accept rndc connections and
to recognize the key specified in the rndc.conf
@@ -219,7 +219,7 @@
-
SEE ALSO
+
SEE ALSO
rndc(8),
rndc-confgen(8),
mmencode(1),
@@ -227,7 +227,7 @@
-
AUTHOR
+
AUTHOR
Internet Systems Consortium
diff --git a/doc/arm/man.rndc.html b/doc/arm/man.rndc.html
index 2175195758..10c4626a01 100644
--- a/doc/arm/man.rndc.html
+++ b/doc/arm/man.rndc.html
@@ -14,7 +14,7 @@
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-->
-
+
@@ -50,7 +50,7 @@
rndc [-b source-address] [-c config-file] [-k key-file] [-s server] [-p port] [-V] [-y key_id] {command}
-
DESCRIPTION
+
DESCRIPTION
rndc
controls the operation of a name
server. It supersedes the ndc utility
@@ -79,7 +79,7 @@
-
OPTIONS
+
OPTIONS
- -b
source-address
@@ -152,7 +152,7 @@
-
LIMITATIONS
+
LIMITATIONS
rndc
does not yet support all the commands of
the BIND 8 ndc utility.
@@ -166,7 +166,7 @@
-
SEE ALSO
+
SEE ALSO
rndc.conf(5),
named(8),
named.conf(5)
@@ -175,7 +175,7 @@
-
AUTHOR
+
AUTHOR
Internet Systems Consortium
diff --git a/doc/misc/options b/doc/misc/options
index f24dcd84fc..78ff106530 100644
--- a/doc/misc/options
+++ b/doc/misc/options
@@ -262,6 +262,12 @@ view
{
edns ;
edns-udp-size ;
max-udp-size ;
+ notify-source ( | * ) [ port ( | *
+ ) ];
+ notify-source-v6 ( | * ) [ port (
+ | * ) ];
+ query-source ;
+ query-source-v6 ;
transfer-source ( | * ) [ port ( |
* ) ];
transfer-source-v6 ( | * ) [ port (
@@ -457,6 +463,10 @@ server {
edns ;
edns-udp-size ;
max-udp-size ;
+ notify-source ( | * ) [ port ( | * ) ];
+ notify-source-v6 ( | * ) [ port ( | * ) ];
+ query-source ;
+ query-source-v6 ;
transfer-source ( | * ) [ port ( | * ) ];
transfer-source-v6 ( | * ) [ port ( | * ) ];
};
From 78b7d41deb6a6db28696e83260dbd1ccfe6b96fa Mon Sep 17 00:00:00 2001
From: Mark Andrews
Date: Fri, 17 Feb 2006 23:30:22 +0000
Subject: [PATCH 029/465] newcopyrights
---
util/copyrights | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/util/copyrights b/util/copyrights
index f70bead5fe..422d68d4b3 100644
--- a/util/copyrights
+++ b/util/copyrights
@@ -1822,8 +1822,8 @@
./lib/dns/rdata/generic/cert_37.h C 1999,2000,2001,2004,2005
./lib/dns/rdata/generic/cname_5.c C 1998,1999,2000,2001,2004
./lib/dns/rdata/generic/cname_5.h C 1998,1999,2000,2001,2004
-./lib/dns/rdata/generic/dlv_32769.c C 2004
-./lib/dns/rdata/generic/dlv_32769.h C 2004
+./lib/dns/rdata/generic/dlv_32769.c C 2004,2006
+./lib/dns/rdata/generic/dlv_32769.h C 2004,2006
./lib/dns/rdata/generic/dname_39.c C 1999,2000,2001,2004
./lib/dns/rdata/generic/dname_39.h C 1999,2000,2001,2004,2005
./lib/dns/rdata/generic/dnskey_48.c C 2003,2004,2005
@@ -2259,13 +2259,13 @@
./lib/isccfg/include/isccfg/Makefile.in MAKE 2001,2002,2004,2005
./lib/isccfg/include/isccfg/aclconf.h C 1999,2000,2001,2004,2005
./lib/isccfg/include/isccfg/cfg.h C 2000,2001,2002,2004,2005
-./lib/isccfg/include/isccfg/grammar.h C 2002,2003,2004,2005
+./lib/isccfg/include/isccfg/grammar.h C 2002,2003,2004,2005,2006
./lib/isccfg/include/isccfg/log.h C 2001,2004,2005
./lib/isccfg/include/isccfg/namedconf.h C 2002,2004,2005
./lib/isccfg/include/isccfg/version.h C 2001,2004,2005
./lib/isccfg/log.c C 2001,2004,2005
./lib/isccfg/namedconf.c C 2002,2003,2004,2005,2006
-./lib/isccfg/parser.c C 2000,2001,2002,2003,2004,2005
+./lib/isccfg/parser.c C 2000,2001,2002,2003,2004,2005,2006
./lib/isccfg/version.c C 1998,1999,2000,2001,2004,2005
./lib/isccfg/win32/DLLMain.c C 2001,2004
./lib/isccfg/win32/libisccfg.def X 2001,2005
From 0cfc2b930ce8b1fd2d7bb25e00bbfcc45a92d9a8 Mon Sep 17 00:00:00 2001
From: Mark Andrews
Date: Sun, 19 Feb 2006 06:50:48 +0000
Subject: [PATCH 030/465] update copyright notice
---
lib/dns/rdata/generic/dlv_32769.c | 4 ++--
lib/dns/rdata/generic/dlv_32769.h | 4 ++--
lib/isccfg/include/isccfg/grammar.h | 4 ++--
lib/isccfg/parser.c | 4 ++--
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/lib/dns/rdata/generic/dlv_32769.c b/lib/dns/rdata/generic/dlv_32769.c
index 2f83879590..0be365a80f 100644
--- a/lib/dns/rdata/generic/dlv_32769.c
+++ b/lib/dns/rdata/generic/dlv_32769.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: dlv_32769.c,v 1.2 2006/02/17 01:04:14 marka Exp $ */
+/* $Id: dlv_32769.c,v 1.3 2006/02/19 06:50:48 marka Exp $ */
/* draft-ietf-dnsext-delegation-signer-05.txt */
diff --git a/lib/dns/rdata/generic/dlv_32769.h b/lib/dns/rdata/generic/dlv_32769.h
index acffe29d80..050a628333 100644
--- a/lib/dns/rdata/generic/dlv_32769.h
+++ b/lib/dns/rdata/generic/dlv_32769.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: dlv_32769.h,v 1.2 2006/02/17 01:04:14 marka Exp $ */
+/* $Id: dlv_32769.h,v 1.3 2006/02/19 06:50:48 marka Exp $ */
/* draft-ietf-dnsext-delegation-signer-05.txt */
#ifndef GENERIC_DLV_32769_H
diff --git a/lib/isccfg/include/isccfg/grammar.h b/lib/isccfg/include/isccfg/grammar.h
index 9d7f4cceb3..5ffca2c8c1 100644
--- a/lib/isccfg/include/isccfg/grammar.h
+++ b/lib/isccfg/include/isccfg/grammar.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2002, 2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: grammar.h,v 1.10 2006/02/17 00:24:21 marka Exp $ */
+/* $Id: grammar.h,v 1.11 2006/02/19 06:50:48 marka Exp $ */
#ifndef ISCCFG_GRAMMAR_H
#define ISCCFG_GRAMMAR_H 1
diff --git a/lib/isccfg/parser.c b/lib/isccfg/parser.c
index 9d55acde8f..4af8f3806d 100644
--- a/lib/isccfg/parser.c
+++ b/lib/isccfg/parser.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: parser.c,v 1.121 2006/02/17 00:24:21 marka Exp $ */
+/* $Id: parser.c,v 1.122 2006/02/19 06:50:48 marka Exp $ */
/*! \file */
From d00e58d4814b45c13434721b5771782e485dcb73 Mon Sep 17 00:00:00 2001
From: Mark Andrews
Date: Tue, 21 Feb 2006 23:12:27 +0000
Subject: [PATCH 031/465] 1986. [func] Report when a zone is
removed. [RT #15849]
---
CHANGES | 2 +
bin/named/server.c | 101 +++++++++++++++++++++++++++++++++----
lib/dns/include/dns/zone.h | 18 ++++++-
lib/dns/zone.c | 38 +++++++++++++-
4 files changed, 146 insertions(+), 13 deletions(-)
diff --git a/CHANGES b/CHANGES
index 914bf3ce0a..aa88f7fcda 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,5 @@
+1986. [func] Report when a zone is removed. [RT #15849]
+
1985. [protocol] DLV has now been assigned a official type code of
32769. [RT #15807]
diff --git a/bin/named/server.c b/bin/named/server.c
index 6541c3cf51..43ab0dcdf9 100644
--- a/bin/named/server.c
+++ b/bin/named/server.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: server.c,v 1.456 2006/02/17 00:24:20 marka Exp $ */
+/* $Id: server.c,v 1.457 2006/02/21 23:12:27 marka Exp $ */
/*! \file */
@@ -215,10 +215,6 @@ static const struct {
{ NULL, ISC_FALSE }
};
-static const char *empty_dbtype[] = { "_builtin", "empty", NULL, NULL };
-static unsigned int empty_dbtypec =
- (sizeof(empty_dbtype) / sizeof(empty_dbtype[0]));
-
static void
fatal(const char *msg, isc_result_t result);
@@ -847,6 +843,38 @@ on_disable_list(cfg_obj_t *disablelist, dns_name_t *zonename) {
return (ISC_FALSE);
}
+static void
+check_dbtype(dns_zone_t **zonep, unsigned int dbtypec, const char **dbargv,
+ isc_mem_t *mctx)
+{
+ char **argv = NULL;
+ unsigned int i;
+ isc_result_t result;
+
+ result = dns_zone_getdbtype(*zonep, &argv, mctx);
+ if (result != ISC_R_SUCCESS) {
+ dns_zone_detach(zonep);
+ return;
+ }
+
+ /*
+ * Check that all the arguments match.
+ */
+ for (i = 0; i < dbtypec; i++)
+ if (argv[i] == NULL || strcmp(argv[i], dbargv[i]) != 0) {
+ dns_zone_detach(zonep);
+ break;
+ }
+
+ /*
+ * Check that there are not extra arguments.
+ */
+ if (i == dbtypec && argv[i] != NULL)
+ dns_zone_detach(zonep);
+ isc_mem_free(mctx, argv);
+}
+
+
/*
* Configure 'view' according to 'vconfig', taking defaults from 'config'
* where values are missing in 'vconfig'.
@@ -1598,6 +1626,9 @@ configure_view(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig,
char server[DNS_NAME_FORMATSIZE + 1];
char contact[DNS_NAME_FORMATSIZE + 1];
isc_boolean_t logit;
+ const char *empty_dbtype[4] =
+ { "_builtin", "empty", NULL, NULL };
+ int empty_dbtypec = 4;
dns_fixedname_init(&fixed);
name = dns_fixedname_name(&fixed);
@@ -1638,6 +1669,7 @@ configure_view(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig,
empty = empty_zones[++empty_zone].zone)
{
dns_forwarders_t *forwarders = NULL;
+ dns_view_t *pview = NULL;
isc_buffer_init(&buffer, empty, strlen(empty));
isc_buffer_add(&buffer, strlen(empty));
@@ -1686,6 +1718,29 @@ configure_view(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig,
continue;
}
+ /*
+ * See if we can re-use a existing zone.
+ */
+ result = dns_viewlist_find(&ns_g_server->viewlist,
+ view->name, view->rdclass,
+ &pview);
+ if (result != ISC_R_NOTFOUND &&
+ result != ISC_R_SUCCESS)
+ goto cleanup;
+
+ if (pview != NULL) {
+ (void)dns_view_findzone(pview, name, &zone);
+ dns_view_detach(&pview);
+ if (zone != NULL)
+ check_dbtype(&zone, empty_dbtypec,
+ empty_dbtype, mctx);
+ if (zone != NULL) {
+ dns_zone_setview(zone, view);
+ dns_zone_detach(&zone);
+ continue;
+ }
+ }
+
CHECK(dns_zone_create(&zone, mctx));
CHECK(dns_zone_setorigin(zone, name));
dns_zone_setview(zone, view);
@@ -2142,10 +2197,8 @@ configure_zone(cfg_obj_t *config, cfg_obj_t *zconfig, cfg_obj_t *vconfig,
result = dns_view_findzone(pview, origin, &zone);
if (result != ISC_R_NOTFOUND && result != ISC_R_SUCCESS)
goto cleanup;
- if (zone != NULL) {
- if (! ns_zone_reusable(zone, zconfig))
- dns_zone_detach(&zone);
- }
+ if (zone != NULL && !ns_zone_reusable(zone, zconfig))
+ dns_zone_detach(&zone);
if (zone != NULL) {
/*
@@ -2552,6 +2605,31 @@ portlist_fromconf(dns_portlist_t *portlist, unsigned int family,
return (result);
}
+static isc_result_t
+removed(dns_zone_t *zone, void *uap) {
+ const char *type;
+
+ if (dns_zone_getview(zone) != uap)
+ return (ISC_R_SUCCESS);
+
+ switch (dns_zone_gettype(zone)) {
+ case dns_zone_master:
+ type = "master";
+ break;
+ case dns_zone_slave:
+ type = "slave";
+ break;
+ case dns_zone_stub:
+ type = "stub";
+ break;
+ default:
+ type = "other";
+ break;
+ }
+ dns_zone_log(zone, ISC_LOG_INFO, "(%s) removed", type);
+ return (ISC_R_SUCCESS);
+}
+
static isc_result_t
load_configuration(const char *filename, ns_server_t *server,
isc_boolean_t first_time)
@@ -3186,8 +3264,11 @@ load_configuration(const char *filename, ns_server_t *server,
view = view_next) {
view_next = ISC_LIST_NEXT(view, link);
ISC_LIST_UNLINK(viewlist, view, link);
+ if (result == ISC_R_SUCCESS &&
+ strcmp(view->name, "_bind") != 0)
+ (void)dns_zt_apply(view->zonetable, ISC_FALSE,
+ removed, view);
dns_view_detach(&view);
-
}
/*
diff --git a/lib/dns/include/dns/zone.h b/lib/dns/include/dns/zone.h
index e39832734e..1637958799 100644
--- a/lib/dns/include/dns/zone.h
+++ b/lib/dns/include/dns/zone.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: zone.h,v 1.141 2006/01/06 00:01:44 marka Exp $ */
+/* $Id: zone.h,v 1.142 2006/02/21 23:12:27 marka Exp $ */
#ifndef DNS_ZONE_H
#define DNS_ZONE_H 1
@@ -356,6 +356,22 @@ dns_zone_setdbtype(dns_zone_t *zone,
*\li #ISC_R_SUCCESS
*/
+isc_result_t
+dns_zone_getdbtype(dns_zone_t *zone, char ***argv, isc_mem_t *mctx);
+/*%<
+ * Returns the current dbtype. isc_mem_free() should be used
+ * to free 'argv' after use.
+ *
+ * Require:
+ *\li 'zone' to be a valid zone.
+ *\li 'argv' to be non NULL and *argv to be NULL.
+ *\li 'mctx' to be valid.
+ *
+ * Returns:
+ *\li #ISC_R_NOMEMORY
+ *\li #ISC_R_SUCCESS
+ */
+
void
dns_zone_markdirty(dns_zone_t *zone);
/*%<
diff --git a/lib/dns/zone.c b/lib/dns/zone.c
index a954a1af49..1b19ac9888 100644
--- a/lib/dns/zone.c
+++ b/lib/dns/zone.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: zone.c,v 1.451 2006/02/17 00:24:21 marka Exp $ */
+/* $Id: zone.c,v 1.452 2006/02/21 23:12:27 marka Exp $ */
/*! \file */
@@ -799,6 +799,39 @@ zone_freedbargs(dns_zone_t *zone) {
zone->db_argv = NULL;
}
+isc_result_t
+dns_zone_getdbtype(dns_zone_t *zone, char ***argv, isc_mem_t *mctx) {
+ size_t size = 0;
+ unsigned int i;
+ isc_result_t result = ISC_R_SUCCESS;
+ void *mem;
+ char **tmp, *tmp2;
+
+ REQUIRE(DNS_ZONE_VALID(zone));
+ REQUIRE(argv != NULL && *argv == NULL);
+
+ LOCK_ZONE(zone);
+ size = (zone->db_argc + 1) * sizeof(char *);
+ for (i = 0; i < zone->db_argc; i++)
+ size += strlen(zone->db_argv[i]) + 1;
+ mem = isc_mem_allocate(mctx, size);
+ if (mem != NULL) {
+ tmp = mem;
+ tmp2 = mem;
+ tmp2 += (zone->db_argc + 1) * sizeof(char *);
+ for (i = 0; i < zone->db_argc; i++) {
+ *tmp++ = tmp2;
+ strcpy(tmp2, zone->db_argv[i]);
+ tmp2 += strlen(tmp2) + 1;
+ }
+ *tmp = NULL;
+ } else
+ result = ISC_R_NOMEMORY;
+ UNLOCK_ZONE(zone);
+ *argv = mem;
+ return (result);
+}
+
isc_result_t
dns_zone_setdbtype(dns_zone_t *zone,
unsigned int dbargc, const char * const *dbargv) {
@@ -5946,7 +5979,8 @@ dns_zone_getmaxxfrout(dns_zone_t *zone) {
return (zone->maxxfrout);
}
-dns_zonetype_t dns_zone_gettype(dns_zone_t *zone) {
+dns_zonetype_t
+dns_zone_gettype(dns_zone_t *zone) {
REQUIRE(DNS_ZONE_VALID(zone));
return (zone->type);
From c5387e694299c41361660e54f23e89c7da3ede1d Mon Sep 17 00:00:00 2001
From: Mark Andrews
Date: Tue, 21 Feb 2006 23:49:51 +0000
Subject: [PATCH 032/465] 1987. [func] DS/DLV SHA256 digest
algorithm support. [RT #15608]
---
CHANGES | 2 ++
bin/dnssec/dnssec-signzone.c | 25 ++++++++++++++-
lib/dns/ds.c | 42 ++++++++++++++++---------
lib/dns/include/dns/ds.h | 9 +++---
lib/dns/validator.c | 61 +++++++++++++++++++++++++++++++++++-
lib/dns/win32/libdns.def | 1 +
6 files changed, 120 insertions(+), 20 deletions(-)
diff --git a/CHANGES b/CHANGES
index aa88f7fcda..bc5e58647d 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,5 @@
+1987. [func] DS/DLV SHA256 digest algorithm support. [RT #15608]
+
1986. [func] Report when a zone is removed. [RT #15849]
1985. [protocol] DLV has now been assigned a official type code of
diff --git a/bin/dnssec/dnssec-signzone.c b/bin/dnssec/dnssec-signzone.c
index 433f9046fc..53f85c0be9 100644
--- a/bin/dnssec/dnssec-signzone.c
+++ b/bin/dnssec/dnssec-signzone.c
@@ -16,7 +16,7 @@
* IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: dnssec-signzone.c,v 1.196 2006/02/07 21:53:36 marka Exp $ */
+/* $Id: dnssec-signzone.c,v 1.197 2006/02/21 23:49:50 marka Exp $ */
/*! \file */
@@ -632,6 +632,16 @@ loadds(dns_name_t *name, isc_uint32_t ttl, dns_rdataset_t *dsset) {
ttl, &ds, &tuple);
check_result(result, "dns_difftuple_create");
dns_diff_append(&diff, &tuple);
+
+ dns_rdata_reset(&ds);
+ result = dns_ds_buildrdata(name, &key, DNS_DSDIGEST_SHA256,
+ dsbuf, &ds);
+ check_result(result, "dns_ds_buildrdata");
+
+ result = dns_difftuple_create(mctx, DNS_DIFFOP_ADD, name,
+ ttl, &ds, &tuple);
+ check_result(result, "dns_difftuple_create");
+ dns_diff_append(&diff, &tuple);
}
result = dns_diff_apply(&diff, db, ver);
check_result(result, "dns_diff_apply");
@@ -1585,6 +1595,19 @@ writeset(const char *prefix, dns_rdatatype_t type) {
ds.type = dns_rdatatype_dlv;
result = dns_difftuple_create(mctx, DNS_DIFFOP_ADD,
name, 0, &ds, &tuple);
+ check_result(result, "dns_difftuple_create");
+ dns_diff_append(&diff, &tuple);
+
+ dns_rdata_reset(&ds);
+ result = dns_ds_buildrdata(gorigin, &rdata,
+ DNS_DSDIGEST_SHA256,
+ dsbuf, &ds);
+ check_result(result, "dns_ds_buildrdata");
+ if (type == dns_rdatatype_dlv)
+ ds.type = dns_rdatatype_dlv;
+ result = dns_difftuple_create(mctx, DNS_DIFFOP_ADD,
+ name, 0, &ds, &tuple);
+
} else
result = dns_difftuple_create(mctx, DNS_DIFFOP_ADD,
gorigin, zonettl,
diff --git a/lib/dns/ds.c b/lib/dns/ds.c
index a952079ec0..38775401a5 100644
--- a/lib/dns/ds.c
+++ b/lib/dns/ds.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: ds.c,v 1.7 2005/04/27 04:56:45 sra Exp $ */
+/* $Id: ds.c,v 1.8 2006/02/21 23:49:51 marka Exp $ */
/*! \file */
@@ -26,6 +26,7 @@
#include
#include
#include
+#include
#include
#include
@@ -42,10 +43,9 @@ dns_ds_buildrdata(dns_name_t *owner, dns_rdata_t *key,
unsigned int digest_type, unsigned char *buffer,
dns_rdata_t *rdata)
{
- isc_sha1_t sha1;
dns_fixedname_t fname;
dns_name_t *name;
- unsigned char digest[ISC_SHA1_DIGESTLENGTH];
+ unsigned char digest[ISC_SHA256_DIGESTLENGTH];
isc_region_t r;
isc_buffer_t b;
dns_rdata_ds_t ds;
@@ -53,7 +53,7 @@ dns_ds_buildrdata(dns_name_t *owner, dns_rdata_t *key,
REQUIRE(key != NULL);
REQUIRE(key->type == dns_rdatatype_dnskey);
- if (digest_type != DNS_DSDIGEST_SHA1)
+ if (!dns_ds_digest_supported(digest_type))
return (ISC_R_NOTIMPLEMENTED);
dns_fixedname_init(&fname);
@@ -63,21 +63,34 @@ dns_ds_buildrdata(dns_name_t *owner, dns_rdata_t *key,
memset(buffer, 0, DNS_DS_BUFFERSIZE);
isc_buffer_init(&b, buffer, DNS_DS_BUFFERSIZE);
- isc_sha1_init(&sha1);
- dns_name_toregion(name, &r);
- isc_sha1_update(&sha1, r.base, r.length);
- dns_rdata_toregion(key, &r);
- INSIST(r.length >= 4);
- isc_sha1_update(&sha1, r.base, r.length);
- isc_sha1_final(&sha1, digest);
+ if (digest_type == DNS_DSDIGEST_SHA1) {
+ isc_sha1_t sha1;
+ isc_sha1_init(&sha1);
+ dns_name_toregion(name, &r);
+ isc_sha1_update(&sha1, r.base, r.length);
+ dns_rdata_toregion(key, &r);
+ INSIST(r.length >= 4);
+ isc_sha1_update(&sha1, r.base, r.length);
+ isc_sha1_final(&sha1, digest);
+ } else {
+ isc_sha256_t sha256;
+ isc_sha256_init(&sha256);
+ dns_name_toregion(name, &r);
+ isc_sha256_update(&sha256, r.base, r.length);
+ dns_rdata_toregion(key, &r);
+ INSIST(r.length >= 4);
+ isc_sha256_update(&sha256, r.base, r.length);
+ isc_sha256_final(digest, &sha256);
+ }
ds.mctx = NULL;
ds.common.rdclass = key->rdclass;
ds.common.rdtype = dns_rdatatype_ds;
ds.algorithm = r.base[3];
ds.key_tag = dst_region_computeid(&r, ds.algorithm);
- ds.digest_type = DNS_DSDIGEST_SHA1;
- ds.length = ISC_SHA1_DIGESTLENGTH;
+ ds.digest_type = digest_type;
+ ds.length = (digest_type == DNS_DSDIGEST_SHA1) ?
+ ISC_SHA1_DIGESTLENGTH : ISC_SHA256_DIGESTLENGTH;
ds.digest = digest;
return (dns_rdata_fromstruct(rdata, key->rdclass, dns_rdatatype_ds,
@@ -86,5 +99,6 @@ dns_ds_buildrdata(dns_name_t *owner, dns_rdata_t *key,
isc_boolean_t
dns_ds_digest_supported(unsigned int digest_type) {
- return (ISC_TF(digest_type == DNS_DSDIGEST_SHA1));
+ return (ISC_TF(digest_type == DNS_DSDIGEST_SHA1 ||
+ digest_type == DNS_DSDIGEST_SHA256));
}
diff --git a/lib/dns/include/dns/ds.h b/lib/dns/include/dns/ds.h
index 809c5cf6e4..424b6627bc 100644
--- a/lib/dns/include/dns/ds.h
+++ b/lib/dns/include/dns/ds.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: ds.h,v 1.6 2005/04/27 04:56:55 sra Exp $ */
+/* $Id: ds.h,v 1.7 2006/02/21 23:49:51 marka Exp $ */
#ifndef DNS_DS_H
#define DNS_DS_H 1
@@ -25,11 +25,12 @@
#include
#define DNS_DSDIGEST_SHA1 (1)
+#define DNS_DSDIGEST_SHA256 (2)
/*
- * Assuming SHA-1 digest type.
+ * Assuming SHA-256 digest type.
*/
-#define DNS_DS_BUFFERSIZE (24)
+#define DNS_DS_BUFFERSIZE (36)
ISC_LANG_BEGINDECLS
@@ -53,7 +54,7 @@ dns_ds_buildrdata(dns_name_t *owner, dns_rdata_t *key,
isc_boolean_t
dns_ds_digest_supported(unsigned int digest_type);
-/*
+/*%<
* Is this digest algorithm supported by dns_ds_buildrdata()?
*/
diff --git a/lib/dns/validator.c b/lib/dns/validator.c
index 47694cd680..5534f4eb62 100644
--- a/lib/dns/validator.c
+++ b/lib/dns/validator.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: validator.c,v 1.140 2006/01/04 23:50:24 marka Exp $ */
+/* $Id: validator.c,v 1.141 2006/02/21 23:49:51 marka Exp $ */
/*! \file */
@@ -1499,6 +1499,7 @@ dlv_validatezonekey(dns_validator_t *val) {
isc_boolean_t supported_algorithm;
isc_result_t result;
unsigned char dsbuf[DNS_DS_BUFFERSIZE];
+ isc_uint8_t digest_type;
validator_log(val, ISC_LOG_DEBUG(3), "dlv_validatezonekey");
@@ -1509,6 +1510,31 @@ dlv_validatezonekey(dns_validator_t *val) {
*/
supported_algorithm = ISC_FALSE;
+ /*
+ * If DNS_DSDIGEST_SHA256 is present we are required to prefer
+ * it over DNS_DSDIGEST_SHA1. This in practice means that we
+ * need to ignore DNS_DSDIGEST_SHA1 if a DNS_DSDIGEST_SHA256
+ * is present.
+ */
+ digest_type = DNS_DSDIGEST_SHA1;
+ for (result = dns_rdataset_first(val->dsset);
+ result == ISC_R_SUCCESS;
+ result = dns_rdataset_next(val->dsset)) {
+ dns_rdata_reset(&dlvrdata);
+ dns_rdataset_current(&val->dlv, &dlvrdata);
+ dns_rdata_tostruct(&dlvrdata, &dlv, NULL);
+
+ if (!dns_resolver_algorithm_supported(val->view->resolver,
+ val->event->name,
+ dlv.algorithm))
+ continue;
+
+ if (dlv.digest_type == DNS_DSDIGEST_SHA256) {
+ digest_type = DNS_DSDIGEST_SHA256;
+ break;
+ }
+ }
+
for (result = dns_rdataset_first(&val->dlv);
result == ISC_R_SUCCESS;
result = dns_rdataset_next(&val->dlv))
@@ -1520,6 +1546,10 @@ dlv_validatezonekey(dns_validator_t *val) {
if (!dns_resolver_digest_supported(val->view->resolver,
dlv.digest_type))
continue;
+
+ if (dlv.digest_type != digest_type)
+ continue;
+
if (!dns_resolver_algorithm_supported(val->view->resolver,
val->event->name,
dlv.algorithm))
@@ -1643,6 +1673,7 @@ validatezonekey(dns_validator_t *val) {
dst_key_t *dstkey;
isc_boolean_t supported_algorithm;
isc_boolean_t atsep = ISC_FALSE;
+ isc_uint8_t digest_type;
/*
* Caller must be holding the validator lock.
@@ -1812,6 +1843,31 @@ validatezonekey(dns_validator_t *val) {
supported_algorithm = ISC_FALSE;
+ /*
+ * If DNS_DSDIGEST_SHA256 is present we are required to prefer
+ * it over DNS_DSDIGEST_SHA1. This in practice means that we
+ * need to ignore DNS_DSDIGEST_SHA1 if a DNS_DSDIGEST_SHA256
+ * is present.
+ */
+ digest_type = DNS_DSDIGEST_SHA1;
+ for (result = dns_rdataset_first(val->dsset);
+ result == ISC_R_SUCCESS;
+ result = dns_rdataset_next(val->dsset)) {
+ dns_rdata_reset(&dsrdata);
+ dns_rdataset_current(val->dsset, &dsrdata);
+ dns_rdata_tostruct(&dsrdata, &ds, NULL);
+
+ if (!dns_resolver_algorithm_supported(val->view->resolver,
+ val->event->name,
+ ds.algorithm))
+ continue;
+
+ if (ds.digest_type == DNS_DSDIGEST_SHA256) {
+ digest_type = DNS_DSDIGEST_SHA256;
+ break;
+ }
+ }
+
for (result = dns_rdataset_first(val->dsset);
result == ISC_R_SUCCESS;
result = dns_rdataset_next(val->dsset))
@@ -1824,6 +1880,9 @@ validatezonekey(dns_validator_t *val) {
ds.digest_type))
continue;
+ if (ds.digest_type != digest_type)
+ continue;
+
if (!dns_resolver_algorithm_supported(val->view->resolver,
val->event->name,
ds.algorithm))
diff --git a/lib/dns/win32/libdns.def b/lib/dns/win32/libdns.def
index da8e61758d..2a85e20707 100644
--- a/lib/dns/win32/libdns.def
+++ b/lib/dns/win32/libdns.def
@@ -188,6 +188,7 @@ dns_dnssec_verify
dns_dnssec_verify2
dns_dnssec_verifymessage
dns_ds_buildrdata
+dns_ds_digest_supported
dns_dumpctx_detach
dns_fwdtable_add
dns_fwdtable_create
From fcbc5d2353971f65726a9e86c1f37c813f9c2176 Mon Sep 17 00:00:00 2001
From: Mark Andrews
Date: Wed, 22 Feb 2006 01:55:10 +0000
Subject: [PATCH 033/465] post merge problem
---
lib/dns/validator.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/dns/validator.c b/lib/dns/validator.c
index 5534f4eb62..f2ae4cfe6a 100644
--- a/lib/dns/validator.c
+++ b/lib/dns/validator.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: validator.c,v 1.141 2006/02/21 23:49:51 marka Exp $ */
+/* $Id: validator.c,v 1.142 2006/02/22 01:55:10 marka Exp $ */
/*! \file */
@@ -1517,9 +1517,9 @@ dlv_validatezonekey(dns_validator_t *val) {
* is present.
*/
digest_type = DNS_DSDIGEST_SHA1;
- for (result = dns_rdataset_first(val->dsset);
+ for (result = dns_rdataset_first(&val->dlv);
result == ISC_R_SUCCESS;
- result = dns_rdataset_next(val->dsset)) {
+ result = dns_rdataset_next(&val->dlv)) {
dns_rdata_reset(&dlvrdata);
dns_rdataset_current(&val->dlv, &dlvrdata);
dns_rdata_tostruct(&dlvrdata, &dlv, NULL);
From 8112eda1404b589fae1605f4c6a905c588904b75 Mon Sep 17 00:00:00 2001
From: Mark Andrews
Date: Wed, 22 Feb 2006 23:30:22 +0000
Subject: [PATCH 034/465] newcopyrights
---
util/copyrights | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/util/copyrights b/util/copyrights
index 422d68d4b3..cfb56ea214 100644
--- a/util/copyrights
+++ b/util/copyrights
@@ -1690,7 +1690,7 @@
./lib/dns/dispatch.c C 1999,2000,2001,2002,2003,2004,2005,2006
./lib/dns/dlz.c C.PORTION 1999,2000,2001,2005
./lib/dns/dnssec.c C 1999,2000,2001,2002,2003,2004,2005
-./lib/dns/ds.c C 2002,2003,2004,2005
+./lib/dns/ds.c C 2002,2003,2004,2005,2006
./lib/dns/dst_api.c C.NAI 1999,2000,2001,2002,2003,2004,2005,2006
./lib/dns/dst_internal.h C.NAI 2000,2001,2002,2004,2005,2006
./lib/dns/dst_lib.c C 1999,2000,2001,2004,2005
@@ -1725,7 +1725,7 @@
./lib/dns/include/dns/dispatch.h C 1999,2000,2001,2002,2003,2004,2005
./lib/dns/include/dns/dlz.h C.PORTION 1999,2000,2001,2005
./lib/dns/include/dns/dnssec.h C 1999,2000,2001,2002,2004,2005
-./lib/dns/include/dns/ds.h C 2002,2004,2005
+./lib/dns/include/dns/ds.h C 2002,2004,2005,2006
./lib/dns/include/dns/events.h C 1999,2000,2001,2002,2004,2005
./lib/dns/include/dns/fixedname.h C 1999,2000,2001,2004,2005
./lib/dns/include/dns/forward.h C 2000,2001,2004,2005
From 3432cd69798e25dfdf449cc857100a58135d3693 Mon Sep 17 00:00:00 2001
From: Mark Andrews
Date: Wed, 22 Feb 2006 23:50:10 +0000
Subject: [PATCH 035/465] update copyright notice
---
lib/dns/ds.c | 4 ++--
lib/dns/include/dns/ds.h | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/dns/ds.c b/lib/dns/ds.c
index 38775401a5..2f67c2a20c 100644
--- a/lib/dns/ds.c
+++ b/lib/dns/ds.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2002, 2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: ds.c,v 1.8 2006/02/21 23:49:51 marka Exp $ */
+/* $Id: ds.c,v 1.9 2006/02/22 23:50:10 marka Exp $ */
/*! \file */
diff --git a/lib/dns/include/dns/ds.h b/lib/dns/include/dns/ds.h
index 424b6627bc..baf392abc4 100644
--- a/lib/dns/include/dns/ds.h
+++ b/lib/dns/include/dns/ds.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: ds.h,v 1.7 2006/02/21 23:49:51 marka Exp $ */
+/* $Id: ds.h,v 1.8 2006/02/22 23:50:10 marka Exp $ */
#ifndef DNS_DS_H
#define DNS_DS_H 1
From 5bcf8f96cfec31d3c111db67a33579280ab2c559 Mon Sep 17 00:00:00 2001
From: Mark Andrews
Date: Thu, 23 Feb 2006 22:22:42 +0000
Subject: [PATCH 036/465] update example
---
FAQ | 443 +++++++++++++++++++++++++++-----------------------------
FAQ.xml | 6 +-
2 files changed, 216 insertions(+), 233 deletions(-)
diff --git a/FAQ b/FAQ
index 773e2b191b..4c4b7648f7 100644
--- a/FAQ
+++ b/FAQ
@@ -1,24 +1,23 @@
Frequently Asked Questions about BIND 9
---------------------------------------------------------------------------
+-------------------------------------------------------------------------------
Q: Why doesn't -u work on Linux 2.2.x when I build with --enable-threads?
-A: Linux threads do not fully implement the Posix threads (pthreads)
- standard. In particular, setuid() operates only on the current thread, not
- the full process. Because of this limitation, BIND 9 cannot use setuid()
- on Linux as it can on all other supported platforms. setuid() cannot be
- called before creating threads, since the server does not start listening
- on reserved ports until after threads have started.
+A: Linux threads do not fully implement the Posix threads (pthreads) standard. In
+ particular, setuid() operates only on the current thread, not the full process.
+ Because of this limitation, BIND 9 cannot use setuid() on Linux as it can on
+ all other supported platforms. setuid() cannot be called before creating
+ threads, since the server does not start listening on reserved ports until
+ after threads have started.
In the 2.2.18 or 2.3.99-pre3 and newer kernels, the ability to preserve
capabilities across a setuid() call is present. This allows BIND 9 to call
- setuid() early, while retaining the ability to bind reserved ports. This
- is a Linux-specific hack.
+ setuid() early, while retaining the ability to bind reserved ports. This is a
+ Linux-specific hack.
- On a 2.2 kernel, BIND 9 does drop many root privileges, so it should be
- less of a security risk than a root process that has not dropped
- privileges.
+ On a 2.2 kernel, BIND 9 does drop many root privileges, so it should be less of
+ a security risk than a root process that has not dropped privileges.
If Linux threads ever work correctly, this restriction will go away.
@@ -35,61 +34,60 @@ A: This is the result of a Linux kernel bug.
See: http://marc.theaimsgroup.com/?l=linux-netdev&m=113081708031466&w=2
-Q: Why does named log the warning message "no TTL specified - using SOA
- MINTTL instead"?
+Q: Why does named log the warning message "no TTL specified - using SOA MINTTL
+ instead"?
A: Your zone file is illegal according to RFC1035. It must either have a line
like:
$TTL 86400
- at the beginning, or the first record in it must have a TTL field, like
- the "84600" in this example:
+ at the beginning, or the first record in it must have a TTL field, like the
+ "84600" in this example:
example.com. 86400 IN SOA ns hostmaster ( 1 3600 1800 1814400 3600 )
Q: Why do I see 5 (or more) copies of named on Linux?
-A: Linux threads each show up as a process under ps. The approximate number
- of threads running is n+4, where n is the number of CPUs. Note that the
- amount of memory used is not cumulative; if each process is using 10M of
- memory, only a total of 10M is used.
+A: Linux threads each show up as a process under ps. The approximate number of
+ threads running is n+4, where n is the number of CPUs. Note that the amount of
+ memory used is not cumulative; if each process is using 10M of memory, only a
+ total of 10M is used.
Q: Why does BIND 9 log "permission denied" errors accessing its configuration
files or zones on my Linux system even though it is running as root?
-A: On Linux, BIND 9 drops most of its root privileges on startup. This
- including the privilege to open files owned by other users. Therefore, if
- the server is running as root, the configuration files and zone files
- should also be owned by root.
+A: On Linux, BIND 9 drops most of its root privileges on startup. This including
+ the privilege to open files owned by other users. Therefore, if the server is
+ running as root, the configuration files and zone files should also be owned by
+ root.
-Q: Why do I get errors like "dns_zone_load: zone foo/IN: loading master file
- bar: ran out of space"?
+Q: Why do I get errors like "dns_zone_load: zone foo/IN: loading master file bar:
+ ran out of space"?
-A: This is often caused by TXT records with missing close quotes. Check that
- all TXT records containing quoted strings have both open and close quotes.
+A: This is often caused by TXT records with missing close quotes. Check that all
+ TXT records containing quoted strings have both open and close quotes.
Q: How do I produce a usable core file from a multithreaded named on Linux?
A: If the Linux kernel is 2.4.7 or newer, multithreaded core dumps are usable
(that is, the correct thread is dumped). Otherwise, if using a 2.2 kernel,
- apply the kernel patch found in contrib/linux/coredump-patch and rebuild
- the kernel. This patch will cause multithreaded programs to dump the
- correct thread.
+ apply the kernel patch found in contrib/linux/coredump-patch and rebuild the
+ kernel. This patch will cause multithreaded programs to dump the correct
+ thread.
Q: How do I restrict people from looking up the server version?
-A: Put a "version" option containing something other than the real version in
- the "options" section of named.conf. Note doing this will not prevent
- attacks and may impede people trying to diagnose problems with your
- server. Also it is possible to "fingerprint" nameservers to determine
- their version.
+A: Put a "version" option containing something other than the real version in the
+ "options" section of named.conf. Note doing this will not prevent attacks and
+ may impede people trying to diagnose problems with your server. Also it is
+ possible to "fingerprint" nameservers to determine their version.
Q: How do I restrict only remote users from looking up the server version?
-A: The following view statement will intercept lookups as the internal view
- that holds the version information will be matched last. The caveats of
- the previous answer still apply, of course.
+A: The following view statement will intercept lookups as the internal view that
+ holds the version information will be matched last. The caveats of the previous
+ answer still apply, of course.
view "chaos" chaos {
match-clients { ; };
@@ -100,126 +98,120 @@ A: The following view statement will intercept lookups as the internal view
};
};
-Q: What do "no source of entropy found" or "could not open entropy source
- foo" mean?
+Q: What do "no source of entropy found" or "could not open entropy source foo"
+ mean?
-A: The server requires a source of entropy to perform certain operations,
- mostly DNSSEC related. These messages indicate that you have no source of
- entropy. On systems with /dev/random or an equivalent, it is used by
- default. A source of entropy can also be defined using the random-device
- option in named.conf.
+A: The server requires a source of entropy to perform certain operations, mostly
+ DNSSEC related. These messages indicate that you have no source of entropy. On
+ systems with /dev/random or an equivalent, it is used by default. A source of
+ entropy can also be defined using the random-device option in named.conf.
Q: I installed BIND 9 and restarted named, but it's still BIND 8. Why?
A: BIND 9 is installed under /usr/local by default. BIND 8 is often installed
under /usr. Check that the correct named is running.
-Q: I'm trying to use TSIG to authenticate dynamic updates or zone transfers.
- I'm sure I have the keys set up correctly, but the server is rejecting the
- TSIG. Why?
+Q: I'm trying to use TSIG to authenticate dynamic updates or zone transfers. I'm
+ sure I have the keys set up correctly, but the server is rejecting the TSIG.
+ Why?
-A: This may be a clock skew problem. Check that the the clocks on the client
- and server are properly synchronised (e.g., using ntp).
+A: This may be a clock skew problem. Check that the the clocks on the client and
+ server are properly synchronised (e.g., using ntp).
Q: I'm trying to compile BIND 9, and "make" is failing due to files not being
found. Why?
-A: Using a parallel or distributed "make" to build BIND 9 is not supported,
- and doesn't work. If you are using one of these, use normal make or gmake
- instead.
+A: Using a parallel or distributed "make" to build BIND 9 is not supported, and
+ doesn't work. If you are using one of these, use normal make or gmake instead.
-Q: I have a BIND 9 master and a BIND 8.2.3 slave, and the master is logging
- error messages like "notify to 10.0.0.1#53 failed: unexpected end of
- input". What's wrong?
+Q: I have a BIND 9 master and a BIND 8.2.3 slave, and the master is logging error
+ messages like "notify to 10.0.0.1#53 failed: unexpected end of input". What's
+ wrong?
-A: This error message is caused by a known bug in BIND 8.2.3 and is fixed in
- BIND 8.2.4. It can be safely ignored - the notify has been acted on by the
- slave despite the error message.
+A: This error message is caused by a known bug in BIND 8.2.3 and is fixed in BIND
+ 8.2.4. It can be safely ignored - the notify has been acted on by the slave
+ despite the error message.
Q: I keep getting log messages like the following. Why?
- Dec 4 23:47:59 client 10.0.0.1#1355: updating zone 'example.com/IN':
- update failed: 'RRset exists (value dependent)' prerequisite not satisfied
- (NXRRSET)
+ Dec 4 23:47:59 client 10.0.0.1#1355: updating zone 'example.com/IN': update
+ failed: 'RRset exists (value dependent)' prerequisite not satisfied (NXRRSET)
-A: DNS updates allow the update request to test to see if certain conditions
- are met prior to proceeding with the update. The message above is saying
- that conditions were not met and the update is not proceeding. See doc/rfc
- /rfc2136.txt for more details on prerequisites.
+A: DNS updates allow the update request to test to see if certain conditions are
+ met prior to proceeding with the update. The message above is saying that
+ conditions were not met and the update is not proceeding. See doc/rfc/
+ rfc2136.txt for more details on prerequisites.
Q: I keep getting log messages like the following. Why?
Jun 21 12:00:00.000 client 10.0.0.1#1234: update denied
A: Someone is trying to update your DNS data using the RFC2136 Dynamic Update
- protocol. Windows 2000 machines have a habit of sending dynamic update
- requests to DNS servers without being specifically configured to do so. If
- the update requests are coming from a Windows 2000 machine, see http://
- support.microsoft.com/support/kb/articles/q246/8/04.asp for information
- about how to turn them off.
+ protocol. Windows 2000 machines have a habit of sending dynamic update requests
+ to DNS servers without being specifically configured to do so. If the update
+ requests are coming from a Windows 2000 machine, see http://
+ support.microsoft.com/support/kb/articles/q246/8/04.asp for information about
+ how to turn them off.
Q: I see a log message like the following. Why?
couldn't open pid file '/var/run/named.pid': Permission denied
-A: You are most likely running named as a non-root user, and that user does
- not have permission to write in /var/run. The common ways of fixing this
- are to create a /var/run/named directory owned by the named user and set
- pid-file to "/var/run/named/named.pid", or set pid-file to "named.pid",
- which will put the file in the directory specified by the directory option
- (which, in this case, must be writable by the named user).
+A: You are most likely running named as a non-root user, and that user does not
+ have permission to write in /var/run. The common ways of fixing this are to
+ create a /var/run/named directory owned by the named user and set pid-file to "
+ /var/run/named/named.pid", or set pid-file to "named.pid", which will put the
+ file in the directory specified by the directory option (which, in this case,
+ must be writable by the named user).
-Q: When I do a "dig . ns", many of the A records for the root servers are
- missing. Why?
+Q: When I do a "dig . ns", many of the A records for the root servers are missing.
+ Why?
-A: This is normal and harmless. It is a somewhat confusing side effect of the
- way BIND 9 does RFC2181 trust ranking and of the efforts BIND 9 makes to
- avoid promoting glue into answers.
+A: This is normal and harmless. It is a somewhat confusing side effect of the way
+ BIND 9 does RFC2181 trust ranking and of the efforts BIND 9 makes to avoid
+ promoting glue into answers.
- When BIND 9 first starts up and primes its cache, it receives the root
- server addresses as additional data in an authoritative response from a
- root server, and these records are eligible for inclusion as additional
- data in responses. Subsequently it receives a subset of the root server
- addresses as additional data in a non-authoritative (referral) response
- from a root server. This causes the addresses to now be considered
- non-authoritative (glue) data, which is not eligible for inclusion in
- responses.
+ When BIND 9 first starts up and primes its cache, it receives the root server
+ addresses as additional data in an authoritative response from a root server,
+ and these records are eligible for inclusion as additional data in responses.
+ Subsequently it receives a subset of the root server addresses as additional
+ data in a non-authoritative (referral) response from a root server. This causes
+ the addresses to now be considered non-authoritative (glue) data, which is not
+ eligible for inclusion in responses.
The server does have a complete set of root server addresses cached at all
- times, it just may not include all of them as additional data, depending
- on whether they were last received as answers or as glue. You can always
- look up the addresses with explicit queries like "dig a.root-servers.net
- A".
+ times, it just may not include all of them as additional data, depending on
+ whether they were last received as answers or as glue. You can always look up
+ the addresses with explicit queries like "dig a.root-servers.net A".
Q: Zone transfers from my BIND 9 master to my Windows 2000 slave fail. Why?
-A: This may be caused by a bug in the Windows 2000 DNS server where DNS
- messages larger than 16K are not handled properly. This can be worked
- around by setting the option "transfer-format one-answer;". Also check
- whether your zone contains domain names with embedded spaces or other
- special characters, like "John\032Doe\213s\032Computer", since such names
- have been known to cause Windows 2000 slaves to incorrectly reject the
- zone.
+A: This may be caused by a bug in the Windows 2000 DNS server where DNS messages
+ larger than 16K are not handled properly. This can be worked around by setting
+ the option "transfer-format one-answer;". Also check whether your zone contains
+ domain names with embedded spaces or other special characters, like "John\
+ 032Doe\213s\032Computer", since such names have been known to cause Windows
+ 2000 slaves to incorrectly reject the zone.
Q: Why don't my zones reload when I do an "rndc reload" or SIGHUP?
-A: A zone can be updated either by editing zone files and reloading the
- server or by dynamic update, but not both. If you have enabled dynamic
- update for a zone using the "allow-update" option, you are not supposed to
- edit the zone file by hand, and the server will not attempt to reload it.
+A: A zone can be updated either by editing zone files and reloading the server or
+ by dynamic update, but not both. If you have enabled dynamic update for a zone
+ using the "allow-update" option, you are not supposed to edit the zone file by
+ hand, and the server will not attempt to reload it.
-Q: I can query the nameserver from the nameserver but not from other
- machines. Why?
+Q: I can query the nameserver from the nameserver but not from other machines.
+ Why?
-A: This is usually the result of the firewall configuration stopping the
- queries and / or the replies.
+A: This is usually the result of the firewall configuration stopping the queries
+ and / or the replies.
-Q: How can I make a server a slave for both an internal and an external view
- at the same time? When I tried, both views on the slave were transferred
- from the same view on the master.
+Q: How can I make a server a slave for both an internal and an external view at
+ the same time? When I tried, both views on the slave were transferred from the
+ same view on the master.
-A: You will need to give the master and slave multiple IP addresses and use
- those to make sure you reach the correct view on the other machine.
+A: You will need to give the master and slave multiple IP addresses and use those
+ to make sure you reach the correct view on the other machine.
Master: 10.0.1.1 (internal), 10.0.1.2 (external, IP alias)
internal:
@@ -247,8 +239,8 @@ A: You will need to give the master and slave multiple IP addresses and use
transfer-source 10.0.1.4;
query-source address 10.0.1.4;
- You put the external address on the alias so that all the other dns
- clients on these boxes see the internal view by default.
+ You put the external address on the alias so that all the other dns clients on
+ these boxes see the internal view by default.
A: BIND 9.3 and later: Use TSIG to select the appropriate view.
@@ -263,7 +255,7 @@ A: BIND 9.3 and later: Use TSIG to select the appropriate view.
};
view "external" {
match-clients { key external; any; };
- server 10.0.0.2 { keys external; };
+ server 10.0.1.2 { keys external; };
recursion no;
...
};
@@ -279,7 +271,7 @@ A: BIND 9.3 and later: Use TSIG to select the appropriate view.
};
view "external" {
match-clients { key external; any; };
- server 10.0.0.1 { keys external; };
+ server 10.0.1.1 { keys external; };
recursion no;
...
};
@@ -287,8 +279,8 @@ A: BIND 9.3 and later: Use TSIG to select the appropriate view.
Q: I have FreeBSD 4.x and "rndc-confgen -a" just sits there.
A: /dev/random is not configured. Use rndcontrol(8) to tell the kernel to use
- certain interrupts as a source of random events. You can make this
- permanent by setting rand_irqs in /etc/rc.conf.
+ certain interrupts as a source of random events. You can make this permanent by
+ setting rand_irqs in /etc/rc.conf.
/etc/rc.conf
rand_irqs="3 14 15"
@@ -297,37 +289,34 @@ A: /dev/random is not configured. Use rndcontrol(8) to tell the kernel to use
Q: Why is named listening on UDP port other than 53?
-A: Named uses a system selected port to make queries of other nameservers.
- This behaviour can be overridden by using query-source to lock down the
- port and/or address. See also notify-source and transfer-source.
+A: Named uses a system selected port to make queries of other nameservers. This
+ behaviour can be overridden by using query-source to lock down the port and/or
+ address. See also notify-source and transfer-source.
-Q: I get error messages like "multiple RRs of singleton type" and "CNAME and
- other data" when transferring a zone. What does this mean?
+Q: I get error messages like "multiple RRs of singleton type" and "CNAME and other
+ data" when transferring a zone. What does this mean?
A: These indicate a malformed master zone. You can identify the exact records
- involved by transferring the zone using dig then running named-checkzone
- on it.
+ involved by transferring the zone using dig then running named-checkzone on it.
dig axfr example.com @master-server > tmp
named-checkzone example.com tmp
- A CNAME record cannot exist with the same name as another record except
- for the DNSSEC records which prove its existance (NSEC).
+ A CNAME record cannot exist with the same name as another record except for the
+ DNSSEC records which prove its existance (NSEC).
- RFC 1034, Section 3.6.2: "If a CNAME RR is present at a node, no other
- data should be present; this ensures that the data for a canonical name
- and its aliases cannot be different. This rule also insures that a cached
- CNAME can be used without checking with an authoritative server for other
- RR types."
+ RFC 1034, Section 3.6.2: "If a CNAME RR is present at a node, no other data
+ should be present; this ensures that the data for a canonical name and its
+ aliases cannot be different. This rule also insures that a cached CNAME can be
+ used without checking with an authoritative server for other RR types."
-Q: I get error messages like "named.conf:99: unexpected end of input" where
- 99 is the last line of named.conf.
+Q: I get error messages like "named.conf:99: unexpected end of input" where 99 is
+ the last line of named.conf.
-A: Some text editors (notepad and wordpad) fail to put a line title
- indication (e.g. CR/LF) on the last line of a text file. This can be fixed
- by "adding" a blank line to the end of the file. Named expects to see EOF
- immediately after EOL and treats text files where this is not met as
- truncated.
+A: Some text editors (notepad and wordpad) fail to put a line title indication
+ (e.g. CR/LF) on the last line of a text file. This can be fixed by "adding" a
+ blank line to the end of the file. Named expects to see EOF immediately after
+ EOL and treats text files where this is not met as truncated.
Q: I get warning messages like "zone example.com/IN: refresh: failure trying
master 1.2.3.4#53: timed out".
@@ -336,15 +325,15 @@ A: Check that you can make UDP queries from the slave to the master
dig +norec example.com soa @1.2.3.4
- You could be generating queries faster than the slave can cope with. Lower
- the serial query rate.
+ You could be generating queries faster than the slave can cope with. Lower the
+ serial query rate.
serial-query-rate 5; // default 20
Q: How do I share a dynamic zone between multiple views?
-A: You choose one view to be master and the second a slave and transfer the
- zone between views.
+A: You choose one view to be master and the second a slave and transfer the zone
+ between views.
Master 10.0.1.1:
key "external" {
@@ -383,19 +372,18 @@ A: You choose one view to be master and the second a slave and transfer the
};
};
-Q: I get a error message like "zone wireless.ietf56.ietf.org/IN: loading
- master file primaries/wireless.ietf56.ietf.org: no owner".
+Q: I get a error message like "zone wireless.ietf56.ietf.org/IN: loading master
+ file primaries/wireless.ietf56.ietf.org: no owner".
-A: This error is produced when a line in the master file contains leading
- white space (tab/space) but the is no current record owner name to inherit
- the name from. Usually this is the result of putting white space before a
- comment. Forgeting the "@" for the SOA record or indenting the master
- file.
+A: This error is produced when a line in the master file contains leading white
+ space (tab/space) but the is no current record owner name to inherit the name
+ from. Usually this is the result of putting white space before a comment.
+ Forgeting the "@" for the SOA record or indenting the master file.
Q: Why are my logs in GMT (UTC).
-A: You are running chrooted (-t) and have not supplied local timzone
- information in the chroot area.
+A: You are running chrooted (-t) and have not supplied local timzone information
+ in the chroot area.
FreeBSD: /etc/localtime
Solaris: /etc/TIMEZONE and /usr/share/lib/zoneinfo
@@ -403,8 +391,8 @@ A: You are running chrooted (-t) and have not supplied local timzone
See also tzset(3) and zic(8).
-Q: I get the error message "named: capset failed: Operation not permitted"
- when starting named.
+Q: I get the error message "named: capset failed: Operation not permitted" when
+ starting named.
A: The capability module, part of "Linux Security Modules/LSM", has not been
loaded into the kernel. See insmod(8).
@@ -413,23 +401,23 @@ Q: I get "rndc: connect failed: connection refused" when I try to run rndc.
A: This is usually a configuration error.
- First ensure that named is running and no errors are being reported at
- startup (/var/log/messages or equivalent). Running "named -g " from a title can help at this point.
+ First ensure that named is running and no errors are being reported at startup
+ (/var/log/messages or equivalent). Running "named -g " from a
+ title can help at this point.
- Secondly ensure that named is configured to use rndc either by
- "rndc-confgen -a", rndc-confgen or manually. The Administrators Reference
- manual has details on how to do this.
+ Secondly ensure that named is configured to use rndc either by "rndc-confgen
+ -a", rndc-confgen or manually. The Administrators Reference manual has details
+ on how to do this.
Old versions of rndc-confgen used localhost rather than 127.0.0.1 in /etc/
- rndc.conf for the default server. Update /etc/rndc.conf if necessary so
- that the default server listed in /etc/rndc.conf matches the addresses
- used in named.conf. "localhost" has two address (127.0.0.1 and ::1).
+ rndc.conf for the default server. Update /etc/rndc.conf if necessary so that
+ the default server listed in /etc/rndc.conf matches the addresses used in
+ named.conf. "localhost" has two address (127.0.0.1 and ::1).
- If you use "rndc-confgen -a" and named is running with -t or -u ensure
- that /etc/rndc.conf has the correct ownership and that a copy is in the
- chroot area. You can do this by re-running "rndc-confgen -a" with
- appropriate -t and -u arguments.
+ If you use "rndc-confgen -a" and named is running with -t or -u ensure that /
+ etc/rndc.conf has the correct ownership and that a copy is in the chroot area.
+ You can do this by re-running "rndc-confgen -a" with appropriate -t and -u
+ arguments.
Q: I don't get RRSIG's returned when I use "dig +dnssec".
@@ -437,12 +425,11 @@ A: You need to ensure DNSSEC is enabled (dnssec-enable yes;).
Q: I get "Error 1067" when starting named under Windows.
-A: This is the service manager saying that named exited. You need to examine
- the Application log in the EventViewer to find out why.
+A: This is the service manager saying that named exited. You need to examine the
+ Application log in the EventViewer to find out why.
- Common causes are that you failed to create "named.conf" (usually "C:\
- windows\dns\etc\named.conf") or failed to specify the directory in
- named.conf.
+ Common causes are that you failed to create "named.conf" (usually "C:\windows\
+ dns\etc\named.conf") or failed to specify the directory in named.conf.
options {
Directory "C:\windows\dns\etc";
@@ -457,18 +444,18 @@ A: These indicate a filesystem permission error preventing named creating /
"dumping master file: sl/tmp-XXXX5il3sQ: open: permission denied"
- Named needs write permission on the directory containing the file. Named
- writes the new cache file to a temporary file then renames it to the name
- specified in named.conf to ensure that the contents are always complete.
- This is to prevent named loading a partial zone in the event of power
- failure or similar interrupting the write of the master file.
+ Named needs write permission on the directory containing the file. Named writes
+ the new cache file to a temporary file then renames it to the name specified in
+ named.conf to ensure that the contents are always complete. This is to prevent
+ named loading a partial zone in the event of power failure or similar
+ interrupting the write of the master file.
Note file names are relative to the directory specified in options and any
chroot directory ([/][]).
- If named is invoked as "named -t /chroot/DNS" with the following
- named.conf then "/chroot/DNS/var/named/sl" needs to be writable by the
- user named is running as.
+ If named is invoked as "named -t /chroot/DNS" with the following named.conf
+ then "/chroot/DNS/var/named/sl" needs to be writable by the user named is
+ running as.
options {
directory "/var/named";
@@ -488,28 +475,27 @@ A: Sun has a blog entry describing how to do this.
Q: Can a NS record refer to a CNAME.
-A: No. The rules for glue (copies of the *address* records in the parent
- zones) and additional section processing do not allow it to work.
+A: No. The rules for glue (copies of the *address* records in the parent zones)
+ and additional section processing do not allow it to work.
- You would have to add both the CNAME and address records (A/AAAA) as glue
- to the parent zone and have CNAMEs be followed when doing additional
- section processing to make it work. No namesever implementation supports
- either of these requirements.
+ You would have to add both the CNAME and address records (A/AAAA) as glue to
+ the parent zone and have CNAMEs be followed when doing additional section
+ processing to make it work. No namesever implementation supports either of
+ these requirements.
-Q: What does "RFC 1918 response from Internet for 0.0.0.10.IN-ADDR.ARPA"
- mean?
+Q: What does "RFC 1918 response from Internet for 0.0.0.10.IN-ADDR.ARPA" mean?
-A: If the IN-ADDR.ARPA name covered refers to a internal address space you
- are using then you have failed to follow RFC 1918 usage rules and are
- leaking queries to the Internet. You should establish your own zones for
- these addresses to prevent you quering the Internet's name servers for
- these addresses. Please see http://as112.net/ for details of the problems
- you are causing and the counter measures that have had to be deployed.
+A: If the IN-ADDR.ARPA name covered refers to a internal address space you are
+ using then you have failed to follow RFC 1918 usage rules and are leaking
+ queries to the Internet. You should establish your own zones for these
+ addresses to prevent you quering the Internet's name servers for these
+ addresses. Please see http://as112.net/ for details of the problems you are
+ causing and the counter measures that have had to be deployed.
If you are not using these private addresses then a client has queried for
them. You can just ignore the messages, get the offending client to stop
- sending you these messages as they are most probably leaking them or setup
- your own zones empty zones to serve answers to these queries.
+ sending you these messages as they are most probably leaking them or setup your
+ own zones empty zones to serve answers to these queries.
zone "10.IN-ADDR.ARPA" {
type master;
@@ -553,10 +539,10 @@ Q: I'm running BIND on Red Hat Enterprise Linux or Fedora Core -
A: Red Hat Security Enhanced Linux (SELinux) policy security protections :
- Red Hat have adopted the National Security Agency's SELinux security
- policy ( see http://www.nsa.gov/selinux ) and recommendations for BIND
- security , which are more secure than running named in a chroot and make
- use of the bind-chroot environment unecessary .
+ Red Hat have adopted the National Security Agency's SELinux security policy (
+ see http://www.nsa.gov/selinux ) and recommendations for BIND security , which
+ are more secure than running named in a chroot and make use of the bind-chroot
+ environment unecessary .
By default, named is not allowed by the SELinux policy to write, create or
delete any files EXCEPT in these directories:
@@ -566,21 +552,18 @@ A: Red Hat Security Enhanced Linux (SELinux) policy security protections :
$ROOTDIR/var/tmp
- where $ROOTDIR may be set in /etc/sysconfig/named if bind-chroot is
- installed.
+ where $ROOTDIR may be set in /etc/sysconfig/named if bind-chroot is installed.
- The SELinux policy particularly does NOT allow named to modify the
- $ROOTDIR/var/named directory, the default location for master zone
- database files.
+ The SELinux policy particularly does NOT allow named to modify the $ROOTDIR/var
+ /named directory, the default location for master zone database files.
- SELinux policy overrules file access permissions - so even if all the
- files under /var/named have ownership named:named and mode rw-rw-r--,
- named will still not be able to write or create files except in the
- directories above, with SELinux in Enforcing mode.
+ SELinux policy overrules file access permissions - so even if all the files
+ under /var/named have ownership named:named and mode rw-rw-r--, named will
+ still not be able to write or create files except in the directories above,
+ with SELinux in Enforcing mode.
- So, to allow named to update slave or DDNS zone files, it is best to
- locate them in $ROOTDIR/var/named/slaves, with named.conf zone statements
- such as:
+ So, to allow named to update slave or DDNS zone files, it is best to locate
+ them in $ROOTDIR/var/named/slaves, with named.conf zone statements such as:
zone "slave.zone." IN {
type slave;
@@ -594,8 +577,8 @@ A: Red Hat Security Enhanced Linux (SELinux) policy security protections :
};
- To allow named to create its cache dump and statistics files, for example,
- you could use named.conf options statements such as:
+ To allow named to create its cache dump and statistics files, for example, you
+ could use named.conf options statements such as:
options {
...
@@ -605,10 +588,10 @@ A: Red Hat Security Enhanced Linux (SELinux) policy security protections :
};
- You can also tell SELinux to allow named to update any zone database
- files, by setting the SELinux tunable boolean parameter
- 'named_write_master_zones=1', using the system-config-securitylevel GUI,
- using the 'setsebool' command, or in /etc/selinux/targeted/booleans.
+ You can also tell SELinux to allow named to update any zone database files, by
+ setting the SELinux tunable boolean parameter 'named_write_master_zones=1',
+ using the system-config-securitylevel GUI, using the 'setsebool' command, or in
+ /etc/selinux/targeted/booleans.
You can disable SELinux protection for named entirely by setting the
'named_disable_trans=1' SELinux tunable boolean parameter.
@@ -620,18 +603,18 @@ A: Red Hat Security Enhanced Linux (SELinux) policy security protections :
named_cache_t: for files modifiable by named - $ROOTDIR/var/{tmp,named/{slaves,data}}
- If you want to retain use of the SELinux policy for named, and put named
- files in different locations, you can do so by changing the context of the
- custom file locations .
+ If you want to retain use of the SELinux policy for named, and put named files
+ in different locations, you can do so by changing the context of the custom
+ file locations .
- To create a custom configuration file location, eg. '/root/named.conf', to
- use with the 'named -c' option, do:
+ To create a custom configuration file location, eg. '/root/named.conf', to use
+ with the 'named -c' option, do:
# chcon system_u:object_r:named_conf_t /root/named.conf
- To create a custom modifiable named data location, eg. '/var/log/named'
- for a log file, do:
+ To create a custom modifiable named data location, eg. '/var/log/named' for a
+ log file, do:
# chcon system_u:object_r:named_cache_t /var/log/named
@@ -641,6 +624,6 @@ A: Red Hat Security Enhanced Linux (SELinux) policy security protections :
# chcon system_u:object_r:named_zone_t /root/zones/{.,*}
- See these man-pages for more information : selinux(8), named_selinux(8),
- chcon(1), setsebool(8)
+ See these man-pages for more information : selinux(8), named_selinux(8), chcon
+ (1), setsebool(8)
diff --git a/FAQ.xml b/FAQ.xml
index 460cb01ce8..3622882155 100644
--- a/FAQ.xml
+++ b/FAQ.xml
@@ -17,7 +17,7 @@
- PERFORMANCE OF THIS SOFTWARE.
-->
-
+
Frequently Asked Questions about BIND 9
@@ -536,7 +536,7 @@ Master 10.0.1.1:
};
view "external" {
match-clients { key external; any; };
- server 10.0.0.2 { keys external; };
+ server 10.0.1.2 { keys external; };
recursion no;
...
};
@@ -552,7 +552,7 @@ Slave 10.0.1.2:
};
view "external" {
match-clients { key external; any; };
- server 10.0.0.1 { keys external; };
+ server 10.0.1.1 { keys external; };
recursion no;
...
};
From 31526c8caa29c16b4a41f4d65064948b022a633d Mon Sep 17 00:00:00 2001
From: Mark Andrews
Date: Thu, 23 Feb 2006 22:29:28 +0000
Subject: [PATCH 037/465] update copyright
---
FAQ.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/FAQ.xml b/FAQ.xml
index 3622882155..0826ead71e 100644
--- a/FAQ.xml
+++ b/FAQ.xml
@@ -1,7 +1,7 @@
-
+
Frequently Asked Questions about BIND 9
From 445dff4f5ff2ce3d370869524b07a316d9da0daf Mon Sep 17 00:00:00 2001
From: Mark Andrews
Date: Thu, 23 Feb 2006 22:34:13 +0000
Subject: [PATCH 038/465] update example
---
FAQ | 386 +++++++++++++++++++++++++++++++++++---------------------
FAQ.xml | 194 +++++++++++++++++++++++++++-
2 files changed, 435 insertions(+), 145 deletions(-)
diff --git a/FAQ b/FAQ
index 9b806cbde5..4c4b7648f7 100644
--- a/FAQ
+++ b/FAQ
@@ -4,26 +4,36 @@ Frequently Asked Questions about BIND 9
Q: Why doesn't -u work on Linux 2.2.x when I build with --enable-threads?
-A: Linux threads do not fully implement the Posix threads (pthreads) standard.
- In particular, setuid() operates only on the current thread, not the full
- process. Because of this limitation, BIND 9 cannot use setuid() on Linux as
- it can on all other supported platforms. setuid() cannot be called before
- creating threads, since the server does not start listening on reserved
- ports until after threads have started.
+A: Linux threads do not fully implement the Posix threads (pthreads) standard. In
+ particular, setuid() operates only on the current thread, not the full process.
+ Because of this limitation, BIND 9 cannot use setuid() on Linux as it can on
+ all other supported platforms. setuid() cannot be called before creating
+ threads, since the server does not start listening on reserved ports until
+ after threads have started.
In the 2.2.18 or 2.3.99-pre3 and newer kernels, the ability to preserve
capabilities across a setuid() call is present. This allows BIND 9 to call
- setuid() early, while retaining the ability to bind reserved ports. This is
- a Linux-specific hack.
+ setuid() early, while retaining the ability to bind reserved ports. This is a
+ Linux-specific hack.
- On a 2.2 kernel, BIND 9 does drop many root privileges, so it should be less
- of a security risk than a root process that has not dropped privileges.
+ On a 2.2 kernel, BIND 9 does drop many root privileges, so it should be less of
+ a security risk than a root process that has not dropped privileges.
If Linux threads ever work correctly, this restriction will go away.
Configuring BIND9 with the --disable-threads option (the default) causes a
non-threaded version to be built, which will allow -u to be used.
+Q: Why do I get the following errors:
+
+ general: errno2result.c:109: unexpected error:
+ general: unable to convert errno to isc_result: 14: Bad address
+ client: UDP client handler shutting down due to fatal receive error: unexpected error
+
+A: This is the result of a Linux kernel bug.
+
+ See: http://marc.theaimsgroup.com/?l=linux-netdev&m=113081708031466&w=2
+
Q: Why does named log the warning message "no TTL specified - using SOA MINTTL
instead"?
@@ -40,23 +50,23 @@ A: Your zone file is illegal according to RFC1035. It must either have a line
Q: Why do I see 5 (or more) copies of named on Linux?
A: Linux threads each show up as a process under ps. The approximate number of
- threads running is n+4, where n is the number of CPUs. Note that the amount
- of memory used is not cumulative; if each process is using 10M of memory,
- only a total of 10M is used.
+ threads running is n+4, where n is the number of CPUs. Note that the amount of
+ memory used is not cumulative; if each process is using 10M of memory, only a
+ total of 10M is used.
Q: Why does BIND 9 log "permission denied" errors accessing its configuration
files or zones on my Linux system even though it is running as root?
-A: On Linux, BIND 9 drops most of its root privileges on startup. This
- including the privilege to open files owned by other users. Therefore, if
- the server is running as root, the configuration files and zone files should
- also be owned by root.
+A: On Linux, BIND 9 drops most of its root privileges on startup. This including
+ the privilege to open files owned by other users. Therefore, if the server is
+ running as root, the configuration files and zone files should also be owned by
+ root.
-Q: Why do I get errors like "dns_zone_load: zone foo/IN: loading master file
- bar: ran out of space"?
+Q: Why do I get errors like "dns_zone_load: zone foo/IN: loading master file bar:
+ ran out of space"?
-A: This is often caused by TXT records with missing close quotes. Check that
- all TXT records containing quoted strings have both open and close quotes.
+A: This is often caused by TXT records with missing close quotes. Check that all
+ TXT records containing quoted strings have both open and close quotes.
Q: How do I produce a usable core file from a multithreaded named on Linux?
@@ -68,16 +78,16 @@ A: If the Linux kernel is 2.4.7 or newer, multithreaded core dumps are usable
Q: How do I restrict people from looking up the server version?
-A: Put a "version" option containing something other than the real version in
- the "options" section of named.conf. Note doing this will not prevent
- attacks and may impede people trying to diagnose problems with your server.
- Also it is possible to "fingerprint" nameservers to determine their version.
+A: Put a "version" option containing something other than the real version in the
+ "options" section of named.conf. Note doing this will not prevent attacks and
+ may impede people trying to diagnose problems with your server. Also it is
+ possible to "fingerprint" nameservers to determine their version.
Q: How do I restrict only remote users from looking up the server version?
-A: The following view statement will intercept lookups as the internal view
- that holds the version information will be matched last. The caveats of the
- previous answer still apply, of course.
+A: The following view statement will intercept lookups as the internal view that
+ holds the version information will be matched last. The caveats of the previous
+ answer still apply, of course.
view "chaos" chaos {
match-clients { ; };
@@ -91,48 +101,45 @@ A: The following view statement will intercept lookups as the internal view
Q: What do "no source of entropy found" or "could not open entropy source foo"
mean?
-A: The server requires a source of entropy to perform certain operations,
- mostly DNSSEC related. These messages indicate that you have no source of
- entropy. On systems with /dev/random or an equivalent, it is used by
- default. A source of entropy can also be defined using the random-device
- option in named.conf.
+A: The server requires a source of entropy to perform certain operations, mostly
+ DNSSEC related. These messages indicate that you have no source of entropy. On
+ systems with /dev/random or an equivalent, it is used by default. A source of
+ entropy can also be defined using the random-device option in named.conf.
Q: I installed BIND 9 and restarted named, but it's still BIND 8. Why?
A: BIND 9 is installed under /usr/local by default. BIND 8 is often installed
under /usr. Check that the correct named is running.
-Q: I'm trying to use TSIG to authenticate dynamic updates or zone transfers.
- I'm sure I have the keys set up correctly, but the server is rejecting the
- TSIG. Why?
+Q: I'm trying to use TSIG to authenticate dynamic updates or zone transfers. I'm
+ sure I have the keys set up correctly, but the server is rejecting the TSIG.
+ Why?
-A: This may be a clock skew problem. Check that the the clocks on the client
- and server are properly synchronised (e.g., using ntp).
+A: This may be a clock skew problem. Check that the the clocks on the client and
+ server are properly synchronised (e.g., using ntp).
Q: I'm trying to compile BIND 9, and "make" is failing due to files not being
found. Why?
A: Using a parallel or distributed "make" to build BIND 9 is not supported, and
- doesn't work. If you are using one of these, use normal make or gmake
- instead.
+ doesn't work. If you are using one of these, use normal make or gmake instead.
-Q: I have a BIND 9 master and a BIND 8.2.3 slave, and the master is logging
- error messages like "notify to 10.0.0.1#53 failed: unexpected end of input".
- What's wrong?
+Q: I have a BIND 9 master and a BIND 8.2.3 slave, and the master is logging error
+ messages like "notify to 10.0.0.1#53 failed: unexpected end of input". What's
+ wrong?
-A: This error message is caused by a known bug in BIND 8.2.3 and is fixed in
- BIND 8.2.4. It can be safely ignored - the notify has been acted on by the
- slave despite the error message.
+A: This error message is caused by a known bug in BIND 8.2.3 and is fixed in BIND
+ 8.2.4. It can be safely ignored - the notify has been acted on by the slave
+ despite the error message.
Q: I keep getting log messages like the following. Why?
Dec 4 23:47:59 client 10.0.0.1#1355: updating zone 'example.com/IN': update
- failed: 'RRset exists (value dependent)' prerequisite not satisfied
- (NXRRSET)
+ failed: 'RRset exists (value dependent)' prerequisite not satisfied (NXRRSET)
-A: DNS updates allow the update request to test to see if certain conditions
- are met prior to proceeding with the update. The message above is saying
- that conditions were not met and the update is not proceeding. See doc/rfc/
+A: DNS updates allow the update request to test to see if certain conditions are
+ met prior to proceeding with the update. The message above is saying that
+ conditions were not met and the update is not proceeding. See doc/rfc/
rfc2136.txt for more details on prerequisites.
Q: I keep getting log messages like the following. Why?
@@ -140,11 +147,11 @@ Q: I keep getting log messages like the following. Why?
Jun 21 12:00:00.000 client 10.0.0.1#1234: update denied
A: Someone is trying to update your DNS data using the RFC2136 Dynamic Update
- protocol. Windows 2000 machines have a habit of sending dynamic update
- requests to DNS servers without being specifically configured to do so. If
- the update requests are coming from a Windows 2000 machine, see http://
- support.microsoft.com/support/kb/articles/q246/8/04.asp for information
- about how to turn them off.
+ protocol. Windows 2000 machines have a habit of sending dynamic update requests
+ to DNS servers without being specifically configured to do so. If the update
+ requests are coming from a Windows 2000 machine, see http://
+ support.microsoft.com/support/kb/articles/q246/8/04.asp for information about
+ how to turn them off.
Q: I see a log message like the following. Why?
@@ -152,59 +159,59 @@ Q: I see a log message like the following. Why?
A: You are most likely running named as a non-root user, and that user does not
have permission to write in /var/run. The common ways of fixing this are to
- create a /var/run/named directory owned by the named user and set pid-file
- to "/var/run/named/named.pid", or set pid-file to "named.pid", which will
- put the file in the directory specified by the directory option (which, in
- this case, must be writable by the named user).
+ create a /var/run/named directory owned by the named user and set pid-file to "
+ /var/run/named/named.pid", or set pid-file to "named.pid", which will put the
+ file in the directory specified by the directory option (which, in this case,
+ must be writable by the named user).
-Q: When I do a "dig . ns", many of the A records for the root servers are
- missing. Why?
+Q: When I do a "dig . ns", many of the A records for the root servers are missing.
+ Why?
-A: This is normal and harmless. It is a somewhat confusing side effect of the
- way BIND 9 does RFC2181 trust ranking and of the efforts BIND 9 makes to
- avoid promoting glue into answers.
+A: This is normal and harmless. It is a somewhat confusing side effect of the way
+ BIND 9 does RFC2181 trust ranking and of the efforts BIND 9 makes to avoid
+ promoting glue into answers.
- When BIND 9 first starts up and primes its cache, it receives the root
- server addresses as additional data in an authoritative response from a root
- server, and these records are eligible for inclusion as additional data in
- responses. Subsequently it receives a subset of the root server addresses as
- additional data in a non-authoritative (referral) response from a root
- server. This causes the addresses to now be considered non-authoritative
- (glue) data, which is not eligible for inclusion in responses.
+ When BIND 9 first starts up and primes its cache, it receives the root server
+ addresses as additional data in an authoritative response from a root server,
+ and these records are eligible for inclusion as additional data in responses.
+ Subsequently it receives a subset of the root server addresses as additional
+ data in a non-authoritative (referral) response from a root server. This causes
+ the addresses to now be considered non-authoritative (glue) data, which is not
+ eligible for inclusion in responses.
The server does have a complete set of root server addresses cached at all
times, it just may not include all of them as additional data, depending on
- whether they were last received as answers or as glue. You can always look
- up the addresses with explicit queries like "dig a.root-servers.net A".
+ whether they were last received as answers or as glue. You can always look up
+ the addresses with explicit queries like "dig a.root-servers.net A".
Q: Zone transfers from my BIND 9 master to my Windows 2000 slave fail. Why?
-A: This may be caused by a bug in the Windows 2000 DNS server where DNS
- messages larger than 16K are not handled properly. This can be worked around
- by setting the option "transfer-format one-answer;". Also check whether your
- zone contains domain names with embedded spaces or other special characters,
- like "John\032Doe\213s\032Computer", since such names have been known to
- cause Windows 2000 slaves to incorrectly reject the zone.
+A: This may be caused by a bug in the Windows 2000 DNS server where DNS messages
+ larger than 16K are not handled properly. This can be worked around by setting
+ the option "transfer-format one-answer;". Also check whether your zone contains
+ domain names with embedded spaces or other special characters, like "John\
+ 032Doe\213s\032Computer", since such names have been known to cause Windows
+ 2000 slaves to incorrectly reject the zone.
Q: Why don't my zones reload when I do an "rndc reload" or SIGHUP?
-A: A zone can be updated either by editing zone files and reloading the server
- or by dynamic update, but not both. If you have enabled dynamic update for a
- zone using the "allow-update" option, you are not supposed to edit the zone
- file by hand, and the server will not attempt to reload it.
+A: A zone can be updated either by editing zone files and reloading the server or
+ by dynamic update, but not both. If you have enabled dynamic update for a zone
+ using the "allow-update" option, you are not supposed to edit the zone file by
+ hand, and the server will not attempt to reload it.
Q: I can query the nameserver from the nameserver but not from other machines.
Why?
-A: This is usually the result of the firewall configuration stopping the
- queries and / or the replies.
+A: This is usually the result of the firewall configuration stopping the queries
+ and / or the replies.
Q: How can I make a server a slave for both an internal and an external view at
- the same time? When I tried, both views on the slave were transferred from
- the same view on the master.
+ the same time? When I tried, both views on the slave were transferred from the
+ same view on the master.
-A: You will need to give the master and slave multiple IP addresses and use
- those to make sure you reach the correct view on the other machine.
+A: You will need to give the master and slave multiple IP addresses and use those
+ to make sure you reach the correct view on the other machine.
Master: 10.0.1.1 (internal), 10.0.1.2 (external, IP alias)
internal:
@@ -232,8 +239,8 @@ A: You will need to give the master and slave multiple IP addresses and use
transfer-source 10.0.1.4;
query-source address 10.0.1.4;
- You put the external address on the alias so that all the other dns clients
- on these boxes see the internal view by default.
+ You put the external address on the alias so that all the other dns clients on
+ these boxes see the internal view by default.
A: BIND 9.3 and later: Use TSIG to select the appropriate view.
@@ -248,7 +255,7 @@ A: BIND 9.3 and later: Use TSIG to select the appropriate view.
};
view "external" {
match-clients { key external; any; };
- server 10.0.0.2 { keys external; };
+ server 10.0.1.2 { keys external; };
recursion no;
...
};
@@ -264,7 +271,7 @@ A: BIND 9.3 and later: Use TSIG to select the appropriate view.
};
view "external" {
match-clients { key external; any; };
- server 10.0.0.1 { keys external; };
+ server 10.0.1.1 { keys external; };
recursion no;
...
};
@@ -272,8 +279,8 @@ A: BIND 9.3 and later: Use TSIG to select the appropriate view.
Q: I have FreeBSD 4.x and "rndc-confgen -a" just sits there.
A: /dev/random is not configured. Use rndcontrol(8) to tell the kernel to use
- certain interrupts as a source of random events. You can make this permanent
- by setting rand_irqs in /etc/rc.conf.
+ certain interrupts as a source of random events. You can make this permanent by
+ setting rand_irqs in /etc/rc.conf.
/etc/rc.conf
rand_irqs="3 14 15"
@@ -283,34 +290,33 @@ A: /dev/random is not configured. Use rndcontrol(8) to tell the kernel to use
Q: Why is named listening on UDP port other than 53?
A: Named uses a system selected port to make queries of other nameservers. This
- behaviour can be overridden by using query-source to lock down the port and/
- or address. See also notify-source and transfer-source.
+ behaviour can be overridden by using query-source to lock down the port and/or
+ address. See also notify-source and transfer-source.
-Q: I get error messages like "multiple RRs of singleton type" and "CNAME and
- other data" when transferring a zone. What does this mean?
+Q: I get error messages like "multiple RRs of singleton type" and "CNAME and other
+ data" when transferring a zone. What does this mean?
A: These indicate a malformed master zone. You can identify the exact records
- involved by transferring the zone using dig then running named-checkzone on
- it.
+ involved by transferring the zone using dig then running named-checkzone on it.
dig axfr example.com @master-server > tmp
named-checkzone example.com tmp
- A CNAME record cannot exist with the same name as another record except for
- the DNSSEC records which prove its existance (NSEC).
+ A CNAME record cannot exist with the same name as another record except for the
+ DNSSEC records which prove its existance (NSEC).
RFC 1034, Section 3.6.2: "If a CNAME RR is present at a node, no other data
should be present; this ensures that the data for a canonical name and its
- aliases cannot be different. This rule also insures that a cached CNAME can
- be used without checking with an authoritative server for other RR types."
+ aliases cannot be different. This rule also insures that a cached CNAME can be
+ used without checking with an authoritative server for other RR types."
-Q: I get error messages like "named.conf:99: unexpected end of input" where 99
- is the last line of named.conf.
+Q: I get error messages like "named.conf:99: unexpected end of input" where 99 is
+ the last line of named.conf.
A: Some text editors (notepad and wordpad) fail to put a line title indication
- (e.g. CR/LF) on the last line of a text file. This can be fixed by "adding"
- a blank line to the end of the file. Named expects to see EOF immediately
- after EOL and treats text files where this is not met as truncated.
+ (e.g. CR/LF) on the last line of a text file. This can be fixed by "adding" a
+ blank line to the end of the file. Named expects to see EOF immediately after
+ EOL and treats text files where this is not met as truncated.
Q: I get warning messages like "zone example.com/IN: refresh: failure trying
master 1.2.3.4#53: timed out".
@@ -319,15 +325,15 @@ A: Check that you can make UDP queries from the slave to the master
dig +norec example.com soa @1.2.3.4
- You could be generating queries faster than the slave can cope with. Lower
- the serial query rate.
+ You could be generating queries faster than the slave can cope with. Lower the
+ serial query rate.
serial-query-rate 5; // default 20
Q: How do I share a dynamic zone between multiple views?
-A: You choose one view to be master and the second a slave and transfer the
- zone between views.
+A: You choose one view to be master and the second a slave and transfer the zone
+ between views.
Master 10.0.1.1:
key "external" {
@@ -370,14 +376,14 @@ Q: I get a error message like "zone wireless.ietf56.ietf.org/IN: loading master
file primaries/wireless.ietf56.ietf.org: no owner".
A: This error is produced when a line in the master file contains leading white
- space (tab/space) but the is no current record owner name to inherit the
- name from. Usually this is the result of putting white space before a
- comment. Forgeting the "@" for the SOA record or indenting the master file.
+ space (tab/space) but the is no current record owner name to inherit the name
+ from. Usually this is the result of putting white space before a comment.
+ Forgeting the "@" for the SOA record or indenting the master file.
Q: Why are my logs in GMT (UTC).
-A: You are running chrooted (-t) and have not supplied local timzone
- information in the chroot area.
+A: You are running chrooted (-t) and have not supplied local timzone information
+ in the chroot area.
FreeBSD: /etc/localtime
Solaris: /etc/TIMEZONE and /usr/share/lib/zoneinfo
@@ -395,23 +401,23 @@ Q: I get "rndc: connect failed: connection refused" when I try to run rndc.
A: This is usually a configuration error.
- First ensure that named is running and no errors are being reported at
- startup (/var/log/messages or equivalent). Running "named -g " from a title can help at this point.
+ First ensure that named is running and no errors are being reported at startup
+ (/var/log/messages or equivalent). Running "named -g " from a
+ title can help at this point.
Secondly ensure that named is configured to use rndc either by "rndc-confgen
- -a", rndc-confgen or manually. The Administrators Reference manual has
- details on how to do this.
+ -a", rndc-confgen or manually. The Administrators Reference manual has details
+ on how to do this.
Old versions of rndc-confgen used localhost rather than 127.0.0.1 in /etc/
rndc.conf for the default server. Update /etc/rndc.conf if necessary so that
the default server listed in /etc/rndc.conf matches the addresses used in
named.conf. "localhost" has two address (127.0.0.1 and ::1).
- If you use "rndc-confgen -a" and named is running with -t or -u ensure that
- /etc/rndc.conf has the correct ownership and that a copy is in the chroot
- area. You can do this by re-running "rndc-confgen -a" with appropriate -t
- and -u arguments.
+ If you use "rndc-confgen -a" and named is running with -t or -u ensure that /
+ etc/rndc.conf has the correct ownership and that a copy is in the chroot area.
+ You can do this by re-running "rndc-confgen -a" with appropriate -t and -u
+ arguments.
Q: I don't get RRSIG's returned when I use "dig +dnssec".
@@ -419,12 +425,11 @@ A: You need to ensure DNSSEC is enabled (dnssec-enable yes;).
Q: I get "Error 1067" when starting named under Windows.
-A: This is the service manager saying that named exited. You need to examine
- the Application log in the EventViewer to find out why.
+A: This is the service manager saying that named exited. You need to examine the
+ Application log in the EventViewer to find out why.
- Common causes are that you failed to create "named.conf" (usually "C:\
- windows\dns\etc\named.conf") or failed to specify the directory in
- named.conf.
+ Common causes are that you failed to create "named.conf" (usually "C:\windows\
+ dns\etc\named.conf") or failed to specify the directory in named.conf.
options {
Directory "C:\windows\dns\etc";
@@ -439,11 +444,11 @@ A: These indicate a filesystem permission error preventing named creating /
"dumping master file: sl/tmp-XXXX5il3sQ: open: permission denied"
- Named needs write permission on the directory containing the file. Named
- writes the new cache file to a temporary file then renames it to the name
- specified in named.conf to ensure that the contents are always complete.
- This is to prevent named loading a partial zone in the event of power
- failure or similar interrupting the write of the master file.
+ Named needs write permission on the directory containing the file. Named writes
+ the new cache file to a temporary file then renames it to the name specified in
+ named.conf to ensure that the contents are always complete. This is to prevent
+ named loading a partial zone in the event of power failure or similar
+ interrupting the write of the master file.
Note file names are relative to the directory specified in options and any
chroot directory ([/][]).
@@ -489,8 +494,8 @@ A: If the IN-ADDR.ARPA name covered refers to a internal address space you are
If you are not using these private addresses then a client has queried for
them. You can just ignore the messages, get the offending client to stop
- sending you these messages as they are most probably leaking them or setup
- your own zones empty zones to serve answers to these queries.
+ sending you these messages as they are most probably leaking them or setup your
+ own zones empty zones to serve answers to these queries.
zone "10.IN-ADDR.ARPA" {
type master;
@@ -523,3 +528,102 @@ A: If the IN-ADDR.ARPA name covered refers to a internal address space you are
Future versions of named are likely to do this automatically.
+Q: I'm running BIND on Red Hat Enterprise Linux or Fedora Core -
+
+ Why can't named update slave zone database files?
+
+ Why can't named create DDNS journal files or update the master zones from
+ journals?
+
+ Why can't named create custom log files?
+
+A: Red Hat Security Enhanced Linux (SELinux) policy security protections :
+
+ Red Hat have adopted the National Security Agency's SELinux security policy (
+ see http://www.nsa.gov/selinux ) and recommendations for BIND security , which
+ are more secure than running named in a chroot and make use of the bind-chroot
+ environment unecessary .
+
+ By default, named is not allowed by the SELinux policy to write, create or
+ delete any files EXCEPT in these directories:
+
+ $ROOTDIR/var/named/slaves
+ $ROOTDIR/var/named/data
+ $ROOTDIR/var/tmp
+
+
+ where $ROOTDIR may be set in /etc/sysconfig/named if bind-chroot is installed.
+
+ The SELinux policy particularly does NOT allow named to modify the $ROOTDIR/var
+ /named directory, the default location for master zone database files.
+
+ SELinux policy overrules file access permissions - so even if all the files
+ under /var/named have ownership named:named and mode rw-rw-r--, named will
+ still not be able to write or create files except in the directories above,
+ with SELinux in Enforcing mode.
+
+ So, to allow named to update slave or DDNS zone files, it is best to locate
+ them in $ROOTDIR/var/named/slaves, with named.conf zone statements such as:
+
+ zone "slave.zone." IN {
+ type slave;
+ file "slaves/slave.zone.db";
+ ...
+ };
+ zone "ddns.zone." IN {
+ type master;
+ allow-updates {...};
+ file "slaves/ddns.zone.db";
+ };
+
+
+ To allow named to create its cache dump and statistics files, for example, you
+ could use named.conf options statements such as:
+
+ options {
+ ...
+ dump-file "/var/named/data/cache_dump.db";
+ statistics-file "/var/named/data/named_stats.txt";
+ ...
+ };
+
+
+ You can also tell SELinux to allow named to update any zone database files, by
+ setting the SELinux tunable boolean parameter 'named_write_master_zones=1',
+ using the system-config-securitylevel GUI, using the 'setsebool' command, or in
+ /etc/selinux/targeted/booleans.
+
+ You can disable SELinux protection for named entirely by setting the
+ 'named_disable_trans=1' SELinux tunable boolean parameter.
+
+ The SELinux named policy defines these SELinux contexts for named:
+
+ named_zone_t : for zone database files - $ROOTDIR/var/named/*
+ named_conf_t : for named configuration files - $ROOTDIR/etc/{named,rndc}.*
+ named_cache_t: for files modifiable by named - $ROOTDIR/var/{tmp,named/{slaves,data}}
+
+
+ If you want to retain use of the SELinux policy for named, and put named files
+ in different locations, you can do so by changing the context of the custom
+ file locations .
+
+ To create a custom configuration file location, eg. '/root/named.conf', to use
+ with the 'named -c' option, do:
+
+ # chcon system_u:object_r:named_conf_t /root/named.conf
+
+
+ To create a custom modifiable named data location, eg. '/var/log/named' for a
+ log file, do:
+
+ # chcon system_u:object_r:named_cache_t /var/log/named
+
+
+ To create a custom zone file location, eg. /root/zones/, do:
+
+ # chcon system_u:object_r:named_zone_t /root/zones/{.,*}
+
+
+ See these man-pages for more information : selinux(8), named_selinux(8), chcon
+ (1), setsebool(8)
+
diff --git a/FAQ.xml b/FAQ.xml
index 6d6e391767..634cfe3845 100644
--- a/FAQ.xml
+++ b/FAQ.xml
@@ -1,7 +1,7 @@
-
+
Frequently Asked Questions about BIND 9
@@ -64,6 +64,26 @@
+
+
+
+ Why do I get the following errors:
+general: errno2result.c:109: unexpected error:
+general: unable to convert errno to isc_result: 14: Bad address
+client: UDP client handler shutting down due to fatal receive error: unexpected error
+
+
+
+
+ This is the result of a Linux kernel bug.
+
+
+ See:
+ http://marc.theaimsgroup.com/?l=linux-netdev&m=113081708031466&w=2
+
+
+
+
@@ -516,7 +536,7 @@ Master 10.0.1.1:
};
view "external" {
match-clients { key external; any; };
- server 10.0.0.2 { keys external; };
+ server 10.0.1.2 { keys external; };
recursion no;
...
};
@@ -532,7 +552,7 @@ Slave 10.0.1.2:
};
view "external" {
match-clients { key external; any; };
- server 10.0.0.1 { keys external; };
+ server 10.0.1.1 { keys external; };
recursion no;
...
};
@@ -997,11 +1017,177 @@ empty:
1 3600 1200 604800 10800 )
@ 10800 IN NS <name-of-server>.
+
Future versions of named are likely to do this automatically.
+
+
+
+
+ I'm running BIND on Red Hat Enterprise Linux or Fedora Core -
+
+
+ Why can't named update slave zone database files?
+
+
+ Why can't named create DDNS journal files or update
+ the master zones from journals?
+
+
+ Why can't named create custom log files?
+
+
+
+
+
+ Red Hat Security Enhanced Linux (SELinux) policy security
+ protections :
+
+
+
+ Red Hat have adopted the National Security Agency's
+ SELinux security policy ( see http://www.nsa.gov/selinux
+ ) and recommendations for BIND security , which are more
+ secure than running named in a chroot and make use of
+ the bind-chroot environment unecessary .
+
+
+
+ By default, named is not allowed by the SELinux policy
+ to write, create or delete any files EXCEPT in these
+ directories:
+
+
+$ROOTDIR/var/named/slaves
+$ROOTDIR/var/named/data
+$ROOTDIR/var/tmp
+
+
+ where $ROOTDIR may be set in /etc/sysconfig/named if
+ bind-chroot is installed.
+
+
+
+ The SELinux policy particularly does NOT allow named to modify
+ the $ROOTDIR/var/named directory, the default location for master
+ zone database files.
+
+
+
+ SELinux policy overrules file access permissions - so
+ even if all the files under /var/named have ownership
+ named:named and mode rw-rw-r--, named will still not be
+ able to write or create files except in the directories
+ above, with SELinux in Enforcing mode.
+
+
+
+ So, to allow named to update slave or DDNS zone files,
+ it is best to locate them in $ROOTDIR/var/named/slaves,
+ with named.conf zone statements such as:
+
+
+zone "slave.zone." IN {
+ type slave;
+ file "slaves/slave.zone.db";
+ ...
+};
+zone "ddns.zone." IN {
+ type master;
+ allow-updates {...};
+ file "slaves/ddns.zone.db";
+};
+
+
+
+
+
+ To allow named to create its cache dump and statistics
+ files, for example, you could use named.conf options
+ statements such as:
+
+
+options {
+ ...
+ dump-file "/var/named/data/cache_dump.db";
+ statistics-file "/var/named/data/named_stats.txt";
+ ...
+};
+
+
+
+
+
+ You can also tell SELinux to allow named to update any
+ zone database files, by setting the SELinux tunable boolean
+ parameter 'named_write_master_zones=1', using the
+ system-config-securitylevel GUI, using the 'setsebool'
+ command, or in /etc/selinux/targeted/booleans.
+
+
+
+ You can disable SELinux protection for named entirely by
+ setting the 'named_disable_trans=1' SELinux tunable boolean
+ parameter.
+
+
+
+ The SELinux named policy defines these SELinux contexts for named:
+
+
+named_zone_t : for zone database files - $ROOTDIR/var/named/*
+named_conf_t : for named configuration files - $ROOTDIR/etc/{named,rndc}.*
+named_cache_t: for files modifiable by named - $ROOTDIR/var/{tmp,named/{slaves,data}}
+
+
+
+
+
+ If you want to retain use of the SELinux policy for named,
+ and put named files in different locations, you can do
+ so by changing the context of the custom file locations
+ .
+
+
+
+ To create a custom configuration file location, eg.
+ '/root/named.conf', to use with the 'named -c' option,
+ do:
+
+
+# chcon system_u:object_r:named_conf_t /root/named.conf
+
+
+
+
+
+ To create a custom modifiable named data location, eg.
+ '/var/log/named' for a log file, do:
+
+
+# chcon system_u:object_r:named_cache_t /var/log/named
+
+
+
+
+
+ To create a custom zone file location, eg. /root/zones/, do:
+
+
+# chcon system_u:object_r:named_zone_t /root/zones/{.,*}
+
+
+
+
+
+ See these man-pages for more information : selinux(8),
+ named_selinux(8), chcon(1), setsebool(8)
+
+
+
From 2b7db25cf2a588f3d9f098fa182bc9aab7f06865 Mon Sep 17 00:00:00 2001
From: Mark Andrews
Date: Thu, 23 Feb 2006 22:37:44 +0000
Subject: [PATCH 039/465] new draft
---
...txt => draft-ietf-dnsext-ds-sha256-05.txt} | 120 +-
...-dnsop-dnssec-operational-practices-04.txt | 1736 ---------------
...-dnsop-dnssec-operational-practices-07.txt | 1904 +++++++++++++++++
3 files changed, 1964 insertions(+), 1796 deletions(-)
rename doc/draft/{draft-ietf-dnsext-ds-sha256-04.txt => draft-ietf-dnsext-ds-sha256-05.txt} (83%)
delete mode 100644 doc/draft/draft-ietf-dnsop-dnssec-operational-practices-04.txt
create mode 100644 doc/draft/draft-ietf-dnsop-dnssec-operational-practices-07.txt
diff --git a/doc/draft/draft-ietf-dnsext-ds-sha256-04.txt b/doc/draft/draft-ietf-dnsext-ds-sha256-05.txt
similarity index 83%
rename from doc/draft/draft-ietf-dnsext-ds-sha256-04.txt
rename to doc/draft/draft-ietf-dnsext-ds-sha256-05.txt
index fff6fd63f7..2460cb619b 100644
--- a/doc/draft/draft-ietf-dnsext-ds-sha256-04.txt
+++ b/doc/draft/draft-ietf-dnsext-ds-sha256-05.txt
@@ -3,11 +3,11 @@
Network Working Group W. Hardaker
Internet-Draft Sparta
-Expires: July 17, 2006 January 13, 2006
+Expires: August 25, 2006 February 21, 2006
Use of SHA-256 in DNSSEC Delegation Signer (DS) Resource Records (RRs)
- draft-ietf-dnsext-ds-sha256-04.txt
+ draft-ietf-dnsext-ds-sha256-05.txt
Status of this Memo
@@ -32,7 +32,7 @@ Status of this Memo
The list of Internet-Draft Shadow Directories can be accessed at
http://www.ietf.org/shadow.html.
- This Internet-Draft will expire on July 17, 2006.
+ This Internet-Draft will expire on August 25, 2006.
Copyright Notice
@@ -52,9 +52,9 @@ Abstract
-Hardaker Expires July 17, 2006 [Page 1]
+Hardaker Expires August 25, 2006 [Page 1]
-Internet-Draft Use of SHA-256 in DNSSEC DS RRs January 2006
+Internet-Draft Use of SHA-256 in DNSSEC DS RRs February 2006
Table of Contents
@@ -71,8 +71,8 @@ Table of Contents
6.1. Potential Digest Type Downgrade Attacks . . . . . . . . . . 5
6.2. SHA-1 vs SHA-256 Considerations for DS Records . . . . . . 6
7. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . 6
- 8. References . . . . . . . . . . . . . . . . . . . . . . . . . . 6
- 8.1. Normative References . . . . . . . . . . . . . . . . . . . 6
+ 8. References . . . . . . . . . . . . . . . . . . . . . . . . . . 7
+ 8.1. Normative References . . . . . . . . . . . . . . . . . . . 7
8.2. Informative References . . . . . . . . . . . . . . . . . . 7
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 8
Intellectual Property and Copyright Statements . . . . . . . . . . 9
@@ -108,9 +108,9 @@ Table of Contents
-Hardaker Expires July 17, 2006 [Page 2]
+Hardaker Expires August 25, 2006 [Page 2]
-Internet-Draft Use of SHA-256 in DNSSEC DS RRs January 2006
+Internet-Draft Use of SHA-256 in DNSSEC DS RRs February 2006
1. Introduction
@@ -123,14 +123,18 @@ Internet-Draft Use of SHA-256 in DNSSEC DS RRs January 2006
record, owned by the same domain as the DS RRset and with a type
covered of DS.
+ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
+ "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
+ document are to be interpreted as described in [RFC2119].
+
2. Implementing the SHA-256 algorithm for DS record support
This document specifies that the digest type code [XXX: To be
- assigned by IANA; likely 2] is to be assigned to SHA-256 [SHA256] for
- use within DS records. The results of the digest algorithm MUST NOT
- be truncated and the entire 32 byte digest result is to be published
- in the DS record.
+ assigned by IANA; likely 2] is to be assigned to SHA-256 [SHA256]
+ [SHA256CODE] for use within DS records. The results of the digest
+ algorithm MUST NOT be truncated and the entire 32 byte digest result
+ is to be published in the DS record.
2.1. DS record field values
@@ -160,13 +164,9 @@ Internet-Draft Use of SHA-256 in DNSSEC DS RRs January 2006
-
-
-
-
-Hardaker Expires July 17, 2006 [Page 3]
+Hardaker Expires August 25, 2006 [Page 3]
-Internet-Draft Use of SHA-256 in DNSSEC DS RRs January 2006
+Internet-Draft Use of SHA-256 in DNSSEC DS RRs February 2006
1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3
@@ -220,9 +220,9 @@ Internet-Draft Use of SHA-256 in DNSSEC DS RRs January 2006
-Hardaker Expires July 17, 2006 [Page 4]
+Hardaker Expires August 25, 2006 [Page 4]
-Internet-Draft Use of SHA-256 in DNSSEC DS RRs January 2006
+Internet-Draft Use of SHA-256 in DNSSEC DS RRs February 2006
the validator has no supported authentication path leading from the
@@ -241,6 +241,8 @@ Internet-Draft Use of SHA-256 in DNSSEC DS RRs January 2006
5. IANA Considerations
+ Only one IANA action is required by this document:
+
The Digest Type to be used for supporting SHA-256 within DS records
needs to be assigned by IANA. This document requests that the Digest
Type value of 2 be assigned to the SHA-256 digest algorithm.
@@ -270,17 +272,18 @@ Internet-Draft Use of SHA-256 in DNSSEC DS RRs January 2006
For example, if the following conditions are all true:
+
+
+
+
+Hardaker Expires August 25, 2006 [Page 5]
+
+Internet-Draft Use of SHA-256 in DNSSEC DS RRs February 2006
+
+
o Both SHA-1 and SHA-256 based digests are published in DS records
within a parent zone for a given child zone's DNSKEY.
-
-
-
-Hardaker Expires July 17, 2006 [Page 5]
-
-Internet-Draft Use of SHA-256 in DNSSEC DS RRs January 2006
-
-
o The DS record with the SHA-1 digest matches the digest computed
using the child zone's DNSKEY.
@@ -293,9 +296,13 @@ Internet-Draft Use of SHA-256 in DNSSEC DS RRs January 2006
6.2. SHA-1 vs SHA-256 Considerations for DS Records
- Because of the weaknesses recently discovered within the SHA-1
- algorithm, users of DNSSEC are encouraged to deploy the use of SHA-
- 256 as soon as the software implementations in use allow for it.
+ Users of DNSSEC are encouraged to deploy SHA-256 as soon as software
+ implementations allow for it. SHA-256 is widely believed to be more
+ resilient to attack than SHA-1, and confidence in SHA-1's strength is
+ being eroded by recently-announced attacks. Regardless of whether or
+ not the attacks on SHA-1 will affect DNSSEC, it is believed (at the
+ time of this writing) that SHA-256 is the better choice for use in DS
+ records.
At the time of this publication, the SHA-256 digest algorithm is
considered sufficiently strong for the immediate future. It is also
@@ -317,26 +324,30 @@ Internet-Draft Use of SHA-256 in DNSSEC DS RRs January 2006
went into the base documents.
The following people contributed to portions of this document in some
- fashion: Mark Andrews, Roy Arends, Olafur Gudmundsson, Olaf M.
- Kolkman, Edward Lewis, Scott Rose, Stuart E. Schechter, Sam Weiler.
+ fashion: Mark Andrews, Roy Arends, Olafur Gudmundsson, Paul Hoffman,
+ Olaf M. Kolkman, Edward Lewis, Scott Rose, Stuart E. Schechter, Sam
+ Weiler.
+
+
+
+
+
+Hardaker Expires August 25, 2006 [Page 6]
+
+Internet-Draft Use of SHA-256 in DNSSEC DS RRs February 2006
8. References
8.1. Normative References
+ [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
+ Requirement Levels", BCP 14, RFC 2119, March 1997.
+
[RFC4033] Arends, R., Austein, R., Larson, M., Massey, D., and S.
Rose, "DNS Security Introduction and Requirements",
RFC 4033, March 2005.
-
-
-
-Hardaker Expires July 17, 2006 [Page 6]
-
-Internet-Draft Use of SHA-256 in DNSSEC DS RRs January 2006
-
-
[RFC4034] Arends, R., Austein, R., Larson, M., Massey, D., and S.
Rose, "Resource Records for the DNS Security Extensions",
RFC 4034, March 2005.
@@ -351,7 +362,7 @@ Internet-Draft Use of SHA-256 in DNSSEC DS RRs January 2006
8.2. Informative References
[SHA256CODE]
- Motorola Labs, "US Secure Hash Algorithms (SHA)",
+ Eastlake, D., "US Secure Hash Algorithms (SHA)",
June 2005.
@@ -377,20 +388,9 @@ Internet-Draft Use of SHA-256 in DNSSEC DS RRs January 2006
-
-
-
-
-
-
-
-
-
-
-
-Hardaker Expires July 17, 2006 [Page 7]
+Hardaker Expires August 25, 2006 [Page 7]
-Internet-Draft Use of SHA-256 in DNSSEC DS RRs January 2006
+Internet-Draft Use of SHA-256 in DNSSEC DS RRs February 2006
Author's Address
@@ -398,7 +398,7 @@ Author's Address
Wes Hardaker
Sparta
P.O. Box 382
- Davis 95617
+ Davis, CA 95617
US
Email: hardaker@tislabs.com
@@ -444,9 +444,9 @@ Author's Address
-Hardaker Expires July 17, 2006 [Page 8]
+Hardaker Expires August 25, 2006 [Page 8]
-Internet-Draft Use of SHA-256 in DNSSEC DS RRs January 2006
+Internet-Draft Use of SHA-256 in DNSSEC DS RRs February 2006
Intellectual Property Statement
@@ -500,5 +500,5 @@ Acknowledgment
-Hardaker Expires July 17, 2006 [Page 9]
+Hardaker Expires August 25, 2006 [Page 9]
diff --git a/doc/draft/draft-ietf-dnsop-dnssec-operational-practices-04.txt b/doc/draft/draft-ietf-dnsop-dnssec-operational-practices-04.txt
deleted file mode 100644
index a5d0d6079a..0000000000
--- a/doc/draft/draft-ietf-dnsop-dnssec-operational-practices-04.txt
+++ /dev/null
@@ -1,1736 +0,0 @@
-
-
-
-DNSOP O. Kolkman
-Internet-Draft RIPE NCC
-Expires: September 2, 2005 R. Gieben
- NLnet Labs
- March 2005
-
-
- DNSSEC Operational Practices
- draft-ietf-dnsop-dnssec-operational-practices-04.txt
-
-Status of this Memo
-
- By submitting this Internet-Draft, each author represents that any
- applicable patent or other IPR claims of which he or she is aware
- have been or will be disclosed, and any of which he or she becomes
- aware will be disclosed, in accordance with Section 6 of BCP 79.
-
- Internet-Drafts are working documents of the Internet Engineering
- Task Force (IETF), its areas, and its working groups. Note that
- other groups may also distribute working documents as Internet-
- Drafts.
-
- Internet-Drafts are draft documents valid for a maximum of six months
- and may be updated, replaced, or obsoleted by other documents at any
- time. It is inappropriate to use Internet-Drafts as reference
- material or to cite them other than as "work in progress."
-
- The list of current Internet-Drafts can be accessed at
- http://www.ietf.org/ietf/1id-abstracts.txt.
-
- The list of Internet-Draft Shadow Directories can be accessed at
- http://www.ietf.org/shadow.html.
-
- This Internet-Draft will expire on September 2, 2005.
-
-Copyright Notice
-
- Copyright (C) The Internet Society (2005).
-
-Abstract
-
- This document describes a set of practices for operating the DNS with
- security extensions (DNSSEC). The target audience is zone
- administrators deploying DNSSEC.
-
- The document discusses operational aspects of using keys and
- signatures in the DNS. It discusses issues as key generation, key
- storage, signature generation, key rollover and related policies.
-
-
-
-Kolkman & Gieben Expires September 2, 2005 [Page 1]
-
-Internet-Draft DNSSEC Operational Practices March 2005
-
-
-Table of Contents
-
- 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4
- 1.1 The Use of the Term 'key' . . . . . . . . . . . . . . . . 4
- 1.2 Time Definitions . . . . . . . . . . . . . . . . . . . . . 5
- 2. Keeping the Chain of Trust Intact . . . . . . . . . . . . . . 5
- 3. Keys Generation and Storage . . . . . . . . . . . . . . . . . 6
- 3.1 Zone and Key Signing Keys . . . . . . . . . . . . . . . . 6
- 3.1.1 Motivations for the KSK and ZSK Separation . . . . . . 6
- 3.1.2 KSKs for high level zones . . . . . . . . . . . . . . 7
- 3.2 Randomness . . . . . . . . . . . . . . . . . . . . . . . . 8
- 3.3 Key Effectivity Period . . . . . . . . . . . . . . . . . . 8
- 3.4 Key Algorithm . . . . . . . . . . . . . . . . . . . . . . 9
- 3.5 Key Sizes . . . . . . . . . . . . . . . . . . . . . . . . 9
- 3.6 Private Key Storage . . . . . . . . . . . . . . . . . . . 10
- 4. Signature generation, Key Rollover and Related Policies . . . 11
- 4.1 Time in DNSSEC . . . . . . . . . . . . . . . . . . . . . . 11
- 4.1.1 Time Considerations . . . . . . . . . . . . . . . . . 11
- 4.2 Key Rollovers . . . . . . . . . . . . . . . . . . . . . . 13
- 4.2.1 Zone-signing Key Rollovers . . . . . . . . . . . . . . 13
- 4.2.2 Key-signing Key Rollovers . . . . . . . . . . . . . . 17
- 4.2.3 Difference Between ZSK and KSK Rollovers . . . . . . . 18
- 4.2.4 Automated Key Rollovers . . . . . . . . . . . . . . . 19
- 4.3 Planning for Emergency Key Rollover . . . . . . . . . . . 19
- 4.3.1 KSK Compromise . . . . . . . . . . . . . . . . . . . . 20
- 4.3.2 ZSK Compromise . . . . . . . . . . . . . . . . . . . . 20
- 4.3.3 Compromises of Keys Anchored in Resolvers . . . . . . 20
- 4.4 Parental Policies . . . . . . . . . . . . . . . . . . . . 21
- 4.4.1 Initial Key Exchanges and Parental Policies
- Considerations . . . . . . . . . . . . . . . . . . . . 21
- 4.4.2 Storing Keys or Hashes? . . . . . . . . . . . . . . . 21
- 4.4.3 Security Lameness . . . . . . . . . . . . . . . . . . 22
- 4.4.4 DS Signature Validity Period . . . . . . . . . . . . . 22
- 5. Security Considerations . . . . . . . . . . . . . . . . . . . 23
- 6. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 23
- 7. References . . . . . . . . . . . . . . . . . . . . . . . . . . 24
- 7.1 Normative References . . . . . . . . . . . . . . . . . . . 24
- 7.2 Informative References . . . . . . . . . . . . . . . . . . 24
- Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . 25
- A. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 25
- B. Zone-signing Key Rollover Howto . . . . . . . . . . . . . . . 26
- C. Typographic Conventions . . . . . . . . . . . . . . . . . . . 26
- D. Document Details and Changes . . . . . . . . . . . . . . . . . 29
- D.1 draft-ietf-dnsop-dnssec-operational-practices-00 . . . . . 29
- D.2 draft-ietf-dnsop-dnssec-operational-practices-01 . . . . . 29
- D.3 draft-ietf-dnsop-dnssec-operational-practices-02 . . . . . 29
- D.4 draft-ietf-dnsop-dnssec-operational-practices-03 . . . . . 29
- D.5 draft-ietf-dnsop-dnssec-operational-practices-04 . . . . . 30
-
-
-
-Kolkman & Gieben Expires September 2, 2005 [Page 2]
-
-Internet-Draft DNSSEC Operational Practices March 2005
-
-
- Intellectual Property and Copyright Statements . . . . . . . . 31
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Kolkman & Gieben Expires September 2, 2005 [Page 3]
-
-Internet-Draft DNSSEC Operational Practices March 2005
-
-
-1. Introduction
-
- During workshops and early operational deployment tests, operators
- and system administrators gained experience about operating the DNS
- with security extensions (DNSSEC). This document translates these
- experiences into a set of practices for zone administrators. At the
- time of writing, there exists very little experience with DNSSEC in
- production environments; this document should therefore explicitly
- not be seen as representing 'Best Current Practices'.
-
- The procedures herein are focused on the maintenance of signed zones
- (i.e. signing and publishing zones on authoritative servers). It is
- intended that maintenance of zones such as resigning or key rollovers
- be transparent to any verifying clients on the Internet.
-
- The structure of this document is as follows. In Section 2 we
- discuss the importance of keeping the "chain of trust" intact.
- Aspects of key generation and storage of private keys are discussed
- in Section 3; the focus in this section is mainly on the private part
- of the key(s). Section 4 describes considerations concerning the
- public part of the keys. Since these public keys appear in the DNS
- one has to take into account all kinds of timing issues, which are
- discussed in Section 4.1. Section 4.2 and Section 4.3 deal with the
- rollover, or which, of keys. Finally Section 4.4 discusses
- considerations on how parents deal with their children's public keys
- in order to maintain chains of trust.
-
- The typographic conventions used in this document are explained in
- Appendix C.
-
- Since this is a document with operational suggestions and there are
- no protocol specifications, the RFC2119 [4] language does not apply.
-
- This document obsoletes RFC2541 [7]
-
-1.1 The Use of the Term 'key'
-
- It is assumed that the reader is familiar with the concept of
- asymmetric keys on which DNSSEC is based (Public Key Cryptography
- [11]). Therefore, this document will use the term 'key' rather
- loosely. Where it is written that 'a key is used to sign data' it is
- assumed that the reader understands that it is the private part of
- the key-pair that is used for signing. It is also assumed that the
- reader understands that the public part of the key-pair is published
- in the DNSKEY resource record and that it is the public part that is
- used in key-exchanges.
-
-
-
-
-
-Kolkman & Gieben Expires September 2, 2005 [Page 4]
-
-Internet-Draft DNSSEC Operational Practices March 2005
-
-
-1.2 Time Definitions
-
- In this document we will be using a number of time related terms.
- The following definitions apply:
- o "Signature validity period"
- The period that a signature is valid. It starts at the time
- specified in the signature inception field of the RRSIG RR and
- ends at the time specified in the expiration field of the RRSIG
- RR.
- o "Signature publication period"
- Time after which a signature (made with a specific key) is
- replaced with a new signature (made with the same key). This
- replacement takes place by publishing the relevant RRSIG in the
- master zone file.
- After one stopped publishing an RRSIG in a zone it may take a
- while before the RRSIG has expired from caches and has actually
- been removed from the DNS.
- o "Key effectivity period"
- The period which a key pair is expected to be effective. This
- period is defined as the time between the first inception time
- stamp and the last expiration date of any signature made with
- this key.
- The key effectivity period can span multiple signature validity
- periods.
- o "Maximum/Minimum Zone TTL"
- The maximum or minimum value of the TTLs from the complete set
- of RRs in a zone.
-
-2. Keeping the Chain of Trust Intact
-
- Maintaining a valid chain of trust is important because broken chains
- of trust will result in data being marked as Bogus (as defined in [2]
- section 5), which may cause entire (sub)domains to become invisible
- to verifying clients. The administrators of secured zones have to
- realize that their zone is, to their clients, part of a chain of
- trust.
-
- As mentioned in the introduction, the procedures herein are intended
- to ensure maintenance of zones, such as resigning or key rollovers,
- will be transparent to the verifying clients on the Internet.
-
- Administrators of secured zones will have to keep in mind that data
- published on an authoritative primary server will not be immediately
- seen by verifying clients; it may take some time for the data to be
- transfered to other secondary authoritative nameservers and clients
- may be fetching data from caching non-authoritative servers.
-
- For the verifying clients it is important that data from secured
-
-
-
-Kolkman & Gieben Expires September 2, 2005 [Page 5]
-
-Internet-Draft DNSSEC Operational Practices March 2005
-
-
- zones can be used to build chains of trust regardless of whether the
- data came directly from an authoritative server, a caching nameserver
- or some middle box. Only by carefully using the available timing
- parameters can a zone administrator assure that the data necessary
- for verification can be obtained.
-
- The responsibility for maintaining the chain of trust is shared by
- administrators of secured zones in the chain of trust. This is most
- obvious in the case of a 'key compromise' when a trade off between
- maintaining a valid chain of trust and replacing the compromised keys
- as soon as possible must be made. Then zone administrators will have
- to make a trade off, between keeping the chain of trust intact -
- thereby allowing for attacks with the compromised key - or to
- deliberately break the chain of trust and making secured sub domains
- invisible to security aware resolvers. Also see Section 4.3.
-
-3. Keys Generation and Storage
-
- This section describes a number of considerations with respect to the
- security of keys. It deals with the generation, effectivity period,
- size and storage of private keys.
-
-3.1 Zone and Key Signing Keys
-
- The DNSSEC validation protocol does not distinguish between DNSKEYs.
- All DNSKEYs can be used during the validation. In practice operators
- use Key Signing and Zone Signing Keys and use the so-called (Secure
- Entry Point) SEP flag to distinguish between them during operations.
- The dynamics and considerations are discussed below.
-
- To make zone resigning and key rollover procedures easier to
- implement, it is possible to use one or more keys as Key Signing Keys
- (KSK). These keys will only sign the apex DNSKEY RR set in a zone.
- Other keys can be used to sign all the RRsets in a zone and are
- referred to as Zone Signing Keys (ZSK). In this document we assume
- that KSKs are the subset of keys that are used for key exchanges with
- the parent and potentially for configuration as trusted anchors - the
- SEP keys. In this document we assume a one-to-one mapping between
- KSK and SEP keys and we assume the SEP flag [1] to be set on all
- KSKs.
-
-3.1.1 Motivations for the KSK and ZSK Separation
-
- Differentiating between the KSK and ZSK functions has several
- advantages:
-
-
-
-
-
-
-Kolkman & Gieben Expires September 2, 2005 [Page 6]
-
-Internet-Draft DNSSEC Operational Practices March 2005
-
-
- o No parent/child interaction is required when ZSKs are updated.
- o The KSK can be made stronger (i.e. using more bits in the key
- material). This has little operational impact since it is only
- used to sign a small fraction of the zone data. Also when
- verifying the KSK is only used to verify the zone's keyset.
- o As the KSK is only used to sign a key set, which is most probably
- updated less frequently than other data in the zone, it can be
- stored separately from and in a safer location than the ZSK.
- o A KSK can have a longer key effectivity period.
-
- For almost any method of key management and zone signing the KSK is
- used less frequently than the ZSK. Once a key set is signed with the
- KSK all the keys in the key set can be used as ZSK. If a ZSK is
- compromised, it can be simply dropped from the key set. The new key
- set is then resigned with the KSK.
-
- Given the assumption that for KSKs the SEP flag is set, the KSK can
- be distinguished from a ZSK by examining the flag field in the DNSKEY
- RR. If the flag field is an odd number it is a KSK. If it is an
- even number it is a ZSK.
-
- The zone-signing key can be used to sign all the data in a zone on a
- regular basis. When a zone-signing key is to be rolled, no
- interaction with the parent is needed. This allows for "Signature
- Validity Periods" on the order of days.
-
- The key-signing key is only to be used to sign the DNSKEY RRs in a
- zone. If a key-signing key is to be rolled over, there will be
- interactions with parties other than the zone administrator. These
- can include the registry of the parent zone or administrators of
- verifying resolvers that have the particular key configured as
- trusted entry points. Hence, the key effectivity period of these
- keys can and should be made much longer. Although, given a long
- enough key, the Key Usage Time can be on the order of years we
- suggest planning for a key effectivity of the order of a few months
- so that a key rollover remains an operational routine.
-
-3.1.2 KSKs for high level zones
-
- Higher level zones are generally more sensitive than lower level
- zones. Anyone controlling or breaking the security of a zone thereby
- obtains authority over all of its sub domains (except in the case of
- resolvers that have locally configured the public key of a sub
- domain). Therefore, extra care should be taken with high level zones
- and strong keys used.
-
- The root zone is the most critical of all zones. Someone controlling
- or compromising the security of the root zone would control the
-
-
-
-Kolkman & Gieben Expires September 2, 2005 [Page 7]
-
-Internet-Draft DNSSEC Operational Practices March 2005
-
-
- entire DNS name space of all resolvers using that root zone (except
- in the case of resolvers that have locally configured the public key
- of a sub domain). Therefore, the utmost care must be taken in the
- securing of the root zone. The strongest and most carefully handled
- keys should be used. The root zone private key should always be kept
- off line.
-
- Many resolvers will start at a root server for their access to and
- authentication of DNS data. Securely updating the trust anchors in
- an enormous population of resolvers around the world will be
- extremely difficult.
-
-3.2 Randomness
-
- Careful generation of all keys is a sometimes overlooked but
- absolutely essential element in any cryptographically secure system.
- The strongest algorithms used with the longest keys are still of no
- use if an adversary can guess enough to lower the size of the likely
- key space so that it can be exhaustively searched. Technical
- suggestions for the generation of random keys will be found in
- RFC1750 [3]. One should carefully assess if the random number
- generator used during key generation adheres to these suggestions.
-
- Keys with a long effectivity period are particularly sensitive as
- they will represent a more valuable target and be subject to attack
- for a longer time than short period keys. It is strongly recommended
- that long term key generation occur off-line in a manner isolated
- from the network via an air gap or, at a minimum, high level secure
- hardware.
-
-3.3 Key Effectivity Period
-
- For various reasons keys in DNSSEC need to be changed once in a
- while. The longer a key is in use, the greater the probability that
- it will have been compromised through carelessness, accident,
- espionage, or cryptanalysis. Furthermore when key rollovers are too
- rare an event, they will not become part of the operational habit and
- there is risk that nobody on-site will remember the procedure for
- rollover when the need is there.
-
- For Key Signing Keys a reasonable key effectivity period is 13
- months, with the intent to replace them after 12 months. An intended
- key effectivity period of a month is reasonable for Zone Signing
- Keys.
-
- Using these recommendations will lead to rollovers occurring
- frequently enough to become part of 'operational habits'; the
- procedure does not have to be reinvented every time a key is
-
-
-
-Kolkman & Gieben Expires September 2, 2005 [Page 8]
-
-Internet-Draft DNSSEC Operational Practices March 2005
-
-
- replaced.
-
- Key effectivity periods can be made very short, as in the order of a
- few minutes. But when replacing keys one has to take the
- considerations from Section 4.1 and Section 4.2 into account.
-
-3.4 Key Algorithm
-
- There are currently three different types of algorithms that can be
- used in DNSSEC: RSA, DSA and elliptic curve cryptography. The latter
- is fairly new and still needs to be standardized for usage in DNSSEC.
-
- RSA has been developed in an open and transparent manner. As the
- patent on RSA expired in 2000, its use is now also free.
-
- DSA has been developed by NIST. The creation of signatures is
- roughly done at the same speed as with RSA, but is 10 to 40 times as
- slow for verification [11].
-
- We suggest the use of RSA/SHA-1 as the preferred algorithm for the
- key. The current known attacks on RSA can be defeated by making your
- key longer. As the MD5 hashing algorithm is showing (theoretical)
- cracks, we recommend the usage of SHA1.
-
- In 2005 some discoveries were made that SHA-1 also has some
- weaknesses. Currently SHA-1 is strong enough for DNSSEC. It is
- expected that a new hashing algorithm is rolled out, before any
- attack becomes practical.
-
-3.5 Key Sizes
-
- When choosing key sizes, zone administrators will need to take into
- account how long a key will be used and how much data will be signed
- during the key publication period. It is hard to give precise
- recommendations but Lenstra and Verheul [10] supplied the following
- table with lower bound estimates for cryptographic key sizes. Their
- recommendations are based on a set of explicitly formulated parameter
- settings, combined with existing data points about cryptographic
- systems. For details we refer to the original paper.
-
-
-
-
-
-
-
-
-
-
-
-
-Kolkman & Gieben Expires September 2, 2005 [Page 9]
-
-Internet-Draft DNSSEC Operational Practices March 2005
-
-
- Year RSA Key Sizes Year RSA Key Sizes
-
- 2000 952 2015 1613
- 2001 990 2016 1664
- 2002 1028 2017 1717
- 2003 1068 2018 1771
- 2004 1108 2019 1825
-
-
- 2005 1149 2020 1881
- 2006 1191 2021 1937
- 2007 1235 2022 1995
- 2008 1279 2023 2054
- 2009 1323 2024 2113
-
-
- 2026 2236 2025 2174
- 2010 1369 2027 2299
- 2011 1416 2028 2362
- 2012 1464 2029 2427
- 2013 1513
- 2014 1562
-
- For example, should you wish your key to last three years from 2003,
- check the RSA key size values for 2006 in this table. In this case
- it should be at least 1191 bits.
-
- Please keep in mind that nobody can see into the future, and that
- these key lengths are only provided here as a guide.
-
- When determining a key size one should take into account that a large
- key will be slower during generation and verification. For RSA,
- verification, the most common operation, will vary roughly with the
- square of the key size; signing will vary with the cube of the key
- size length; and key generation will vary with the fourth power of
- the modulus length. Besides larger keys will increase the sizes of
- the RRSIG and DNSKEY records and will therefore increase the chance
- of DNS UDP packet overflow. Also see Section 3.1.1 for a discussion
- of how keys serving different roles (ZSK v. KSK) may need different
- key strengths.
-
-3.6 Private Key Storage
-
- It is recommended that, where possible, zone private keys and the
- zone file master copy be kept and used in off-line, non-network
- connected, physically secure machines only. Periodically an
- application can be run to add authentication to a zone by adding
- RRSIG and NSEC RRs. Then the augmented file can be transferred,
-
-
-
-Kolkman & Gieben Expires September 2, 2005 [Page 10]
-
-Internet-Draft DNSSEC Operational Practices March 2005
-
-
- perhaps by sneaker-net, to the networked zone primary server machine.
-
- The ideal situation is to have a one way information flow to the
- network to avoid the possibility of tampering from the network.
- Keeping the zone master file on-line on the network and simply
- cycling it through an off-line signer does not do this. The on-line
- version could still be tampered with if the host it resides on is
- compromised. For maximum security, the master copy of the zone file
- should be off net and should not be updated based on an unsecured
- network mediated communication.
-
- In general keeping a zone-file off-line will not be practical and the
- machines on which zone files are maintained will be connected to a
- network. Operators are advised to take security measures to shield
- unauthorized access to the master copy.
-
- For dynamically updated secured zones [5] both the master copy and
- the private key that is used to update signatures on updated RRs will
- need to be on line.
-
-4. Signature generation, Key Rollover and Related Policies
-
-4.1 Time in DNSSEC
-
- Without DNSSEC all times in DNS are relative. The SOA RR's refresh,
- retry and expiration timers are counters that are used to determine
- the time elapsed after a slave server synchronized (or tried to
- synchronize) with a master server. The Time to Live (TTL) value and
- the SOA RR minimum TTL parameter [6] are used to determine how long a
- forwarder should cache data after it has been fetched from an
- authoritative server. By using a signature validity period, DNSSEC
- introduces the notion of an absolute time in the DNS. Signatures in
- DNSSEC have an expiration date after which the signature is marked as
- invalid and the signed data is to be considered Bogus.
-
-4.1.1 Time Considerations
-
- Because of the expiration of signatures, one should consider the
- following:
- o We suggest the Maximum Zone TTL of your zone data to be a fraction
- of your signature validity period.
- If the TTL would be of similar order as the signature validity
- period, then all RRsets fetched during the validity period
- would be cached until the signature expiration time. Section
- 7.1 of [2] suggests that "the resolver may use the time
- remaining before expiration of the signature validity period of
- a signed RRset as an upper bound for the TTL". As a result
- query load on authoritative servers would peak at signature
-
-
-
-Kolkman & Gieben Expires September 2, 2005 [Page 11]
-
-Internet-Draft DNSSEC Operational Practices March 2005
-
-
- expiration time, as this is also the time at which records
- simultaneously expire from caches.
- To avoid query load peaks we suggest the TTL on all the RRs in
- your zone to be at least a few times smaller than your
- signature validity period.
- o We suggest the signature publication period to be at least one
- maximum TTL smaller than the signature validity period.
- Resigning a zone shortly before the end of the signature
- validity period may cause simultaneous expiration of data from
- caches. This in turn may lead to peaks in the load on
- authoritative servers.
- o We suggest the minimum zone TTL to be long enough to both fetch
- and verify all the RRs in the authentication chain. A low TTL
- could cause two problems:
- 1. During validation, some data may expire before the
- validation is complete. The validator should be able to keep
- all data, until is completed. This applies to all RRs needed
- to complete the chain of trust: DSs, DNSKEYs, RRSIGs, and the
- final answers i.e. the RR set that is returned for the initial
- query.
- 2. Frequent verification causes load on recursive nameservers.
- Data at delegation points, DSs, DNSKEYs and RRSIGs benefit from
- caching. The TTL on those should be relatively long.
- o Slave servers will need to be able to fetch newly signed zones
- well before the RRSIGs in the zone served by the slave server pass
- their signature expiration time.
- When a slave server is out of sync with its master and data in
- a zone is signed by expired signatures it may be better for the
- slave server not to give out any answer.
- Normally a slave server that is not able to contact a master
- server for an extended period will expire a zone. When that
- happens the zone will not respond on queries. The time of
- expiration is set in the SOA record and is relative to the last
- successful refresh between the master and the slave server.
- There exists no coupling between the signature expiration of
- RRSIGs in the zone and the expire parameter in the SOA.
- If the server serves a DNSSEC zone than it may well happen that
- the signatures expire well before the SOA expiration timer
- counts down to zero. It is not possible to completely prevent
- this from happening by tweaking the SOA parameters.
- However, the effects can be minimized where the SOA expiration
- time is equal or smaller than the signature validity period.
- The consequence of an authoritative server not being able to
- update a zone, whilst that zone includes expired signatures, is
- that non-secure resolvers will continue to be able to resolve
- data served by the particular slave servers while security
- aware resolvers will experience problems because of answers
- being marked as Bogus.
-
-
-
-Kolkman & Gieben Expires September 2, 2005 [Page 12]
-
-Internet-Draft DNSSEC Operational Practices March 2005
-
-
- We suggest the SOA expiration timer being approximately one
- third or one fourth of the signature validity period. It will
- allow problems with transfers from the master server to be
- noticed before the actual signature time out.
- We also suggest that operators of nameservers that supply
- secondary services develop 'watch dogs' to spot upcoming
- signature expirations in zones they slave, and take appropriate
- action.
- When determining the value for the expiration parameter one has
- to take the following into account: What are the chances that
- all my secondary zones expire; How quickly can I reach an
- administrator of secondary servers to load a valid zone? All
- these arguments are not DNSSEC specific but may influence the
- choice of your signature validity intervals.
-
-4.2 Key Rollovers
-
- A DNSSEC key cannot be used forever (see Section 3.3). So key
- rollovers -- or supercessions, as they are sometimes called -- are a
- fact of life when using DNSSEC. Zone administrators who are in the
- process of rolling their keys have to take into account that data
- published in previous versions of their zone still lives in caches.
- When deploying DNSSEC, this becomes an important consideration;
- ignoring data that may be in caches may lead to loss of service for
- clients.
-
- The most pressing example of this is when zone material signed with
- an old key is being validated by a resolver which does not have the
- old zone key cached. If the old key is no longer present in the
- current zone, this validation fails, marking the data Bogus.
- Alternatively, an attempt could be made to validate data which is
- signed with a new key against an old key that lives in a local cache,
- also resulting in data being marked Bogus.
-
-4.2.1 Zone-signing Key Rollovers
-
- For zone-signing key rollovers there are two ways to make sure that
- during the rollover data still cached can be verified with the new
- key sets or newly generated signatures can be verified with the keys
- still in caches. One schema, described in Section 4.2.1.2, uses
- double signatures; the other uses key pre-publication
- (Section 4.2.1.1). The pros, cons and recommendations are described
- in Section 4.2.1.3.
-
-4.2.1.1 Pre-publish key set Rollover
-
- This section shows how to perform a ZSK rollover without the need to
- sign all the data in a zone twice - the so-called "pre-publish
-
-
-
-Kolkman & Gieben Expires September 2, 2005 [Page 13]
-
-Internet-Draft DNSSEC Operational Practices March 2005
-
-
- rollover".This method has advantages in the case of a key compromise.
- If the old key is compromised, the new key has already been
- distributed in the DNS. The zone administrator is then able to
- quickly switch to the new key and remove the compromised key from the
- zone. Another major advantage is that the zone size does not double,
- as is the case with the double signature ZSK rollover. A small
- "HOWTO" for this kind of rollover can be found in Appendix B.
-
- normal pre-roll roll after
-
- SOA0 SOA1 SOA2 SOA3
- RRSIG10(SOA0) RRSIG10(SOA1) RRSIG11(SOA2) RRSIG11(SOA3)
-
- DNSKEY1 DNSKEY1 DNSKEY1 DNSKEY1
- DNSKEY10 DNSKEY10 DNSKEY10 DNSKEY11
- DNSKEY11 DNSKEY11
- RRSIG1 (DNSKEY) RRSIG1 (DNSKEY) RRSIG1(DNSKEY) RRSIG1 (DNSKEY)
- RRSIG10(DNSKEY) RRSIG10(DNSKEY) RRSIG11(DNSKEY) RRSIG11(DNSKEY)
-
-
- normal: Version 0 of the zone: DNSKEY 1 is the key-signing key.
- DNSKEY 10 is used to sign all the data of the zone, the zone-
- signing key.
- pre-roll: DNSKEY 11 is introduced into the key set. Note that no
- signatures are generated with this key yet, but this does not
- secure against brute force attacks on the public key. The minimum
- duration of this pre-roll phase is the time it takes for the data
- to propagate to the authoritative servers plus TTL value of the
- key set. This equates to two times the Maximum Zone TTL.
- roll: At the rollover stage (SOA serial 2) DNSKEY 11 is used to sign
- the data in the zone exclusively (i.e. all the signatures from
- DNSKEY 10 are removed from the zone). DNSKEY 10 remains published
- in the key set. This way data that was loaded into caches from
- version 1 of the zone can still be verified with key sets fetched
- from version 2 of the zone.
- The minimum time that the key set including DNSKEY 10 is to be
- published is the time that it takes for zone data from the
- previous version of the zone to expire from old caches i.e. the
- time it takes for this zone to propagate to all authoritative
- servers plus the Maximum Zone TTL value of any of the data in the
- previous version of the zone.
- after: DNSKEY 10 is removed from the zone. The key set, now only
- containing DNSKEY 1 and DNSKEY 11 is resigned with the DNSKEY 1.
-
- The above scheme can be simplified by always publishing the "future"
- key immediately after the rollover. The scheme would look as follows
- (we show two rollovers); the future key is introduced in "after" as
- DNSKEY 12 and again a newer one, numbered 13, in "2nd after":
-
-
-
-Kolkman & Gieben Expires September 2, 2005 [Page 14]
-
-Internet-Draft DNSSEC Operational Practices March 2005
-
-
- normal roll after
-
- SOA0 SOA2 SOA3
- RRSIG10(SOA0) RRSIG11(SOA2) RRSIG11(SOA3)
-
- DNSKEY1 DNSKEY1 DNSKEY1
- DNSKEY10 DNSKEY10 DNSKEY11
- DNSKEY11 DNSKEY11 DNSKEY12
- RRSIG1(DNSKEY) RRSIG1 (DNSKEY) RRSIG1(DNSKEY)
- RRSIG10(DNSKEY) RRSIG11(DNSKEY) RRSIG11(DNSKEY)
-
-
- 2nd roll 2nd after
-
- SOA4 SOA5
- RRSIG12(SOA4) RRSIG12(SOA5)
-
- DNSKEY1 DNSKEY1
- DNSKEY11 DNSKEY12
- DNSKEY12 DNSKEY13
- RRSIG1(DNSKEY) RRSIG1(DNSKEY)
- RRSIG12(DNSKEY) RRSIG12(DNSKEY)
-
-
- Note that the key introduced after the rollover is not used for
- production yet; the private key can thus be stored in a physically
- secure manner and does not need to be 'fetched' every time a zone
- needs to be signed.
-
-4.2.1.2 Double Signature Zone-signing Key Rollover
-
- This section shows how to perform a ZSK key rollover using the double
- zone data signature scheme, aptly named "double sig rollover".
-
- During the rollover stage the new version of the zone file will need
- to propagate to all authoritative servers and the data that exists in
- (distant) caches will need to expire, requiring at least the maximum
- Zone TTL.
-
-
-
-
-
-
-
-
-
-
-
-
-
-Kolkman & Gieben Expires September 2, 2005 [Page 15]
-
-Internet-Draft DNSSEC Operational Practices March 2005
-
-
- normal roll after
-
- SOA0 SOA1 SOA2
- RRSIG10(SOA0) RRSIG10(SOA1) RRSIG11(SOA2)
- RRSIG11(SOA1)
-
- DNSKEY1 DNSKEY1 DNSKEY1
- DNSKEY10 DNSKEY10 DNSKEY11
- DNSKEY11
- RRSIG1(DNSKEY) RRSIG1(DNSKEY) RRSIG1(DNSKEY)
- RRSIG10(DNSKEY) RRSIG10(DNSKEY) RRSIG11(DNSKEY)
- RRSIG11(DNSKEY)
-
- normal: Version 0 of the zone: DNSKEY 1 is the key-signing key.
- DNSKEY 10 is used to sign all the data of the zone, the zone-
- signing key.
- roll: At the rollover stage (SOA serial 1) DNSKEY 11 is introduced
- into the key set and all the data in the zone is signed with
- DNSKEY 10 and DNSKEY 11. The rollover period will need to exist
- until all data from version 0 of the zone has expired from remote
- caches. This will take at least the maximum Zone TTL of version 0
- of the zone.
- after: DNSKEY 10 is removed from the zone. All the signatures from
- DNSKEY 10 are removed from the zone. The key set, now only
- containing DNSKEY 11, is resigned with DNSKEY 1.
-
- At every instance, RRSIGs from the previous version of the zone can
- be verified with the DNSKEY RRset from the current version and the
- other way around. The data from the current version can be verified
- with the data from the previous version of the zone. The duration of
- the rollover phase and the period between rollovers should be at
- least the "Maximum Zone TTL".
-
- Making sure that the rollover phase lasts until the signature
- expiration time of the data in version 0 of the zone is recommended.
- This way all caches are cleared of the old signatures. However, this
- date could be considerably longer than the Maximum Zone TTL, making
- the rollover a lengthy procedure.
-
- Note that in this example we assumed that the zone was not modified
- during the rollover. New data can be introduced in the zone as long
- as it is signed with both keys.
-
-4.2.1.3 Pros and Cons of the Schemes
-
-
-
-
-
-
-
-Kolkman & Gieben Expires September 2, 2005 [Page 16]
-
-Internet-Draft DNSSEC Operational Practices March 2005
-
-
- Pre-publish-key set rollover: This rollover does not involve signing
- the zone data twice. Instead, before the actual rollover, the new
- key is published in the key set and thus available for
- cryptanalysis attacks. A small disadvantage is that this process
- requires four steps. Also the pre-publish scheme involves more
- parental work when used for KSK rollovers as explained in
- Section 4.2.
- Double signature rollover: The drawback of this signing scheme is
- that during the rollover the number of signatures in your zone
- doubles, this may be prohibitive if you have very big zones. An
- advantage is that it only requires three steps.
-
-4.2.2 Key-signing Key Rollovers
-
- For the rollover of a key-signing key the same considerations as for
- the rollover of a zone-signing key apply. However we can use a
- double signature scheme to guarantee that old data (only the apex key
- set) in caches can be verified with a new key set and vice versa.
-
- Since only the key set is signed with a KSK, zone size considerations
- do not apply.
-
-
- normal roll after
-
- SOA0 SOA1 SOA2
- RRSIG10(SOA0) RRSIG10(SOA1) RRSIG10(SOA2)
-
- DNSKEY1 DNSKEY1 DNSKEY2
- DNSKEY2
- DNSKEY10 DNSKEY10 DNSKEY10
- RRSIG1 (DNSKEY) RRSIG1 (DNSKEY) RRSIG2(DNSKEY)
- RRSIG2 (DNSKEY)
- RRSIG10(DNSKEY) RRSIG10(DNSKEY) RRSIG10(DNSKEY)
-
- normal: Version 0 of the zone. The parental DS points to DNSKEY1.
- Before the rollover starts the child will have to verify what the
- TTL is of the DS RR that points to DNSKEY1 - it is needed during
- the rollover and we refer to the value as TTL_DS.
- roll: During the rollover phase the zone administrator generates a
- second KSK, DNSKEY2. The key is provided to the parent and the
- child will have to wait until a new DS RR has been generated that
- points to DNSKEY2. After that DS RR has been published on all
- servers authoritative for the parent's zone, the zone
- administrator has to wait at least TTL_DS to make sure that the
- old DS RR has expired from caches.
-
-
-
-
-
-Kolkman & Gieben Expires September 2, 2005 [Page 17]
-
-Internet-Draft DNSSEC Operational Practices March 2005
-
-
- after: DNSKEY1 has been removed.
-
- The scenario above puts the responsibility for maintaining a valid
- chain of trust with the child. It also is based on the premises that
- the parent only has one DS RR (per algorithm) per zone. An
- alternative mechanism has been considered. Using an established
- trust relation, the interaction can be performed in-band, and the
- removal of the keys by the child can possibly be signaled by the
- parent. In this mechanism there are periods where there are two DS
- RRs at the parent. Since at the moment of writing the protocol for
- this interaction has not been developed further discussion is out of
- scope for this document.
-
-4.2.3 Difference Between ZSK and KSK Rollovers
-
- Note that KSK rollovers and ZSK rollovers are different. A zone-key
- rollover can be handled in two different ways: pre-publish (Section
- Section 4.2.1.1) and double signature (Section Section 4.2.1.2).
-
- As the KSK is used to validate the key set and because the KSK is not
- changed during a ZSK rollover, a cache is able to validate the new
- key set of the zone. The pre-publish method would work for a KSK
- rollover. The record that are to be pre-published are the parental
- DS RRs.
-
- The pre-publish method has some drawbacks. We first describe the
- rollover scheme and then indicate these drawbacks.
-
- normal pre-roll roll after
- Parent:
- SOA0 SOA1 SOA2 SOA3
- RRSIGpar(SOA0) RRSIGpar(SOA1) RRSIGpar(SOA2) RRSIGpar(SOA3)
- DS1 DS1 DS1 DS2
- DS2 DS2
- RRSIGpar(DS) RRSIGpar(DS) RRSIGpar(DS) RRSIGpar(DS)
-
-
-
- Child:
- SOA0 SOA0 SOA1 SOA1
- RRSIG10(SOA0) RRSIG10(SOA0) RRSIG10(SOA1) RRSIG10(SOA1)
-
- DNSKEY1 DNSKEY1 DNSKEY2 DNSKEY2
-
- DNSKEY10 DNSKEY10 DNSKEY10 DNSKEY10
- RRSIG1 (DNSKEY) RRSIG1 (DNSKEY) RRSIG2(DNSKEY) RRSIG2 (DNSKEY)
- RRSIG10(DNSKEY) RRSIG10(DNSKEY) RRSIG10(DNSKEY) RRSIG10(DNSKEY)
-
-
-
-
-Kolkman & Gieben Expires September 2, 2005 [Page 18]
-
-Internet-Draft DNSSEC Operational Practices March 2005
-
-
- When the child zone wants to roll it notifies the parent during the
- pre-roll phase and submits the new key to the parent. The parent
- publishes DS1 and DS2, pointing to DNSKEY1 and DNSKEY2 respectively.
- During the rollover, which can take place as soon as the new DS set
- propagated through the DNS, the child replaces DNSKEY1 with DNSKEY2.
- Immediately after that it can notify the parent that the old DS
- record can be deleted.
-
- The drawbacks of these scheme are that during the pre-roll phase the
- parent cannot verify the match between the DS RR and DNSKEY2 using
- the DNS. Besides, we introduce a "security lame" DS record
- Section 4.4.3. Finally the child-parent interaction consists of two
- steps. The "double signature" method only needs one interaction.
-
-4.2.4 Automated Key Rollovers
-
- As keys must be renewed periodically, there is some motivation to
- automate the rollover process. Consider that:
-
- o ZSK rollovers are easy to automate as only the local zone is
- involved.
- o A KSK rollover needs interaction between the parent and child.
- Data exchange is needed to provide the new keys to the parent,
- consequently, this data must be authenticated and integrity must
- be guaranteed in order to avoid attacks on the rollover.
- o All time and TTL considerations presented in Section 4.2 apply to
- an automated rollover.
-
-4.3 Planning for Emergency Key Rollover
-
- This section deals with preparation for a possible key compromise.
- Our advice is to have a documented procedure ready for when a key
- compromise is suspected or confirmed.
-
- When the private material of one of your keys is compromised it can
- be used for as long as a valid authentication chain exists. An
- authentication chain remains intact for:
- o as long as a signature over the compromised key in the
- authentication chain is valid,
- o as long as a parental DS RR (and signature) points to the
- compromised key,
- o as long as the key is anchored in a resolver and is used as a
- starting point for validation. (This is generally the hardest to
- update.)
-
- While an authentication chain to your compromised key exists, your
- name-space is vulnerable to abuse by anyone who has obtained
- illegitimate possession of the key.Zone operators have to make a
-
-
-
-Kolkman & Gieben Expires September 2, 2005 [Page 19]
-
-Internet-Draft DNSSEC Operational Practices March 2005
-
-
- trade off if the abuse of the compromised key is worse than having
- data in caches that cannot be validated. If the zone operator
- chooses to break the authentication chain to the compromised key,
- data in caches signed with this key cannot be validated. However, if
- the zone administrator chooses to take the path of a regular roll-
- over, the malicious key holder can spoof data so that it appears to
- be valid. Note that this kind of attack is more likely to occur in a
- localized part of the network topology i.e. downstream from where the
- spoof takes place.
-
-
-4.3.1 KSK Compromise
-
- When the KSK has been compromised the parent must be notified as soon
- as possible using secure means. The key set of the zone should be
- resigned as soon as possible. Care must be taken to not break the
- authentication chain. The local zone can only be resigned with the
- new KSK after the parent's zone has created and reloaded its zone
- with the DS created from the new KSK. Before this update takes place
- it would be best to drop the security status of a zone all together:
- the parent removes the DS of the child at the next zone update.
- After that the child can be made secure again.
-
- An additional danger of a key compromise is that the compromised key
- can be used to facilitate a legitimate DNSKEY/DS and/or nameserver
- rollover at the parent. When that happens the domain can be in
- dispute. An authenticated out of band and secure notify mechanism to
- contact a parent is needed in this case.
-
-4.3.2 ZSK Compromise
-
- Primarily because there is no parental interaction required when a
- ZSK is compromised, the situation is less severe than with with a KSK
- compromise. The zone must still be resigned with a new ZSK as soon
- as possible. As this is a local operation and requires no
- communication between the parent and child this can be achieved
- fairly quickly. However, one has to take into account that just as
- with a normal rollover the immediate disappearance from the old
- compromised key may lead to verification problems. The pre-
- publication scheme as discussed above minimizes such problems.
-
-4.3.3 Compromises of Keys Anchored in Resolvers
-
- A key can also be pre-configured in resolvers. For instance, if
- DNSSEC is successfully deployed the root key may be pre-configured in
- most security aware resolvers.
-
- If trust-anchor keys are compromised, the resolvers using these keys
-
-
-
-Kolkman & Gieben Expires September 2, 2005 [Page 20]
-
-Internet-Draft DNSSEC Operational Practices March 2005
-
-
- should be notified of this fact. Zone administrators may consider
- setting up a mailing list to communicate the fact that a SEP key is
- about to be rolled over. This communication will of course need to
- be authenticated e.g. by using digital signatures.
-
- End-users faced with the task of updating an anchored key should
- always validate the new key. New keys should be authenticated out of
- the DNS, for example, looking them up on an SSL secured announcement
- website.
-
-4.4 Parental Policies
-
-4.4.1 Initial Key Exchanges and Parental Policies Considerations
-
- The initial key exchange is always subject to the policies set by the
- parent (or its registry). When designing a key exchange policy one
- should take into account that the authentication and authorization
- mechanisms used during a key exchange should be as strong as the
- authentication and authorization mechanisms used for the exchange of
- delegation information between parent and child. I.e. there is no
- implicit need in DNSSEC to make the authentication process stronger
- than it was in DNS.
-
- Using the DNS itself as the source for the actual DNSKEY material,
- with an off-band check on the validity of the DNSKEY, has the benefit
- that it reduces the chances of user error. A parental DNSKEY
- download tool can make use of the SEP bit [1] to select the proper
- key from a DNSSEC key set; thereby reducing the chance that the wrong
- DNSKEY is sent. It can validate the self-signature over a key;
- thereby verifying the ownership of the private key material.
- Fetching the DNSKEY from the DNS ensures that the chain of trust
- remains intact once the parent publishes the DS RR indicating the
- child is secure.
-
- Note: the off-band verification is still needed when the key-material
- is fetched via the DNS. The parent can never be sure whether the
- DNSKEY RRs have been spoofed or not.
-
-4.4.2 Storing Keys or Hashes?
-
- When designing a registry system one should consider which of the
- DNSKEYs and/or the corresponding DSs to store. Since a child zone
- might wish to have a DS published using a message digest algorithm
- not yet understood by the registry, the registry can't count on being
- able to generate the DS record from a raw DNSKEY. Thus, we recommend
- that registry system at least support storing DS records.
-
- It may also be useful to store DNSKEYs, since having them may help
-
-
-
-Kolkman & Gieben Expires September 2, 2005 [Page 21]
-
-Internet-Draft DNSSEC Operational Practices March 2005
-
-
- during troubleshooting and, so long as the child's chosen message
- digest is supported, the overhead of generating DS records from them
- is minimal. Having an out-of-band mechanism, such as a Whois
- database, to find out which keys are used to generate DS Resource
- Records for specific owners and/or zones may also help with
- troubleshooting.
-
- The storage considerations also relate the design of the customer
- interface and the method by which data is transfered between
- registrant and registry; Will the child zone owner be able to upload
- DS RRs with unknown hash algorithms or does the interface only allows
- DNSKEYs? In the registry-registrar model one can use the DNSSEC EPP
- protocol extensions [9] which allows transfer of DS RRs and
- optionally DNSKEY RRs.
-
-4.4.3 Security Lameness
-
- Security Lameness is defined as what happens when a parent has a DS
- RR pointing to a non-existing DNSKEY RR. During key exchange a
- parent should make sure that the child's key is actually configured
- in the DNS before publishing a DS RR in its zone. Failure to do so
- could cause the child's zone being marked as Bogus.
-
- Child zones should be very careful removing DNSKEY material,
- specifically SEP keys, for which a DS RR exists.
-
- Once a zone is "security lame", a fix (e.g. removing a DS RR) will
- take time to propagate through the DNS.
-
-4.4.4 DS Signature Validity Period
-
- Since the DS can be replayed as long as it has a valid signature, a
- short signature validity period over the DS minimizes the time a
- child is vulnerable in the case of a compromise of the child's
- KSK(s). A signature validity period that is too short introduces the
- possibility that a zone is marked Bogus in case of a configuration
- error in the signer. There may not be enough time to fix the
- problems before signatures expire. Something as mundane as operator
- unavailability during weekends shows the need for DS signature
- validity periods longer than 2 days. We recommend the minimum for a
- DS signature validity period of a few days.
-
- The maximum signature validity period of the DS record depends on how
- long child zones are willing to be vulnerable after a key compromise.
- Other considerations, such as how often the zone is (re)signed can
- also be taken into account.
-
- We consider a signature validity period of around one week to be a
-
-
-
-Kolkman & Gieben Expires September 2, 2005 [Page 22]
-
-Internet-Draft DNSSEC Operational Practices March 2005
-
-
- good compromise between the operational constraints of the parent and
- minimizing damage for the child.
-
- In addition to the signature validity period, which sets a lower
- bound on the amount of times the zone owner will need to sign the
- zone data and which sets an upper bound to the time a child is
- vulnerable after key compromise, there is the TTL value on the DS
- RRs. By lowering the TTL, the authoritative servers will see more
- queries, on the other hand a low TTL increases the speed with which
- new DS RRs propagate through the DNS. As argued in Section 4.1.1,
- the TTL should be a fraction of the signature validity period.
-
-5. Security Considerations
-
- DNSSEC adds data integrity to the DNS. This document tries to assess
- the operational considerations to maintain a stable and secure DNSSEC
- service. Not taking into account the 'data propagation' properties
- in the DNS will cause validation failures and may make secured zones
- unavailable to security aware resolvers.
-
-6. Acknowledgments
-
- Most of the ideas in this draft were the result of collective efforts
- during workshops, discussions and try outs.
-
- At the risk of forgetting individuals who were the original
- contributors of the ideas we would like to acknowledge people who
- were actively involved in the compilation of this document. In
- random order: Rip Loomis, Olafur Gudmundsson, Wesley Griffin, Michael
- Richardson, Scott Rose, Rick van Rein, Tim McGinnis, Gilles Guette
- Olivier Courtay, Sam Weiler, Jelte Jansen and Niall O'Reilly.
-
- Some material in this document has been shamelessly copied from
- RFC2541 [7] by Donald Eastlake.
-
- Mike StJohns designed the key exchange between parent and child
- mentioned in the last paragraph of Section 4.2.2
-
- Section 4.2.4 was supplied by G. Guette and O. Courtay.
-
- Emma Bretherick, Adrian Bedford and Lindy Foster corrected many of
- the spelling and style issues.
-
- Kolkman and Gieben take the blame for introducing all miscakes(SIC).
-
-7. References
-
-
-
-
-
-Kolkman & Gieben Expires September 2, 2005 [Page 23]
-
-Internet-Draft DNSSEC Operational Practices March 2005
-
-
-7.1 Normative References
-
- [1] Kolkman, O., Schlyter, J., and E. Lewis, "Domain Name System KEY
- (DNSKEY) Resource Record (RR) Secure Entry Point (SEP) Flag",
- RFC 3757, May 2004.
-
- [2] Arends, R., Austein, R., Larson, M., Massey, D., and S. Rose,
- "DNS Security Introduction and Requirements", RFC 4033,
- March 2005.
-
-7.2 Informative References
-
- [3] Eastlake, D., Crocker, S., and J. Schiller, "Randomness
- Recommendations for Security", RFC 1750, December 1994.
-
- [4] Bradner, S., "Key words for use in RFCs to Indicate Requirement
- Levels", BCP 14, RFC 2119, March 1997.
-
- [5] Eastlake, D., "Secure Domain Name System Dynamic Update",
- RFC 2137, April 1997.
-
- [6] Andrews, M., "Negative Caching of DNS Queries (DNS NCACHE)",
- RFC 2308, March 1998.
-
- [7] Eastlake, D., "DNS Security Operational Considerations",
- RFC 2541, March 1999.
-
- [8] Gudmundsson, O., "Delegation Signer (DS) Resource Record (RR)",
- RFC 3658, December 2003.
-
- [9] Hollenbeck, S., "Domain Name System (DNS) Security Extensions
- Mapping for the Extensible Provisioning Protocol (EPP)",
- draft-hollenbeck-epp-secdns-07 (work in progress), March 2005.
-
- [10] Lenstra, A. and E. Verheul, "Selecting Cryptographic Key
- Sizes", The Journal of Cryptology 14 (255-293), 2001.
-
- [11] Schneier, B., "Applied Cryptography: Protocols, Algorithms, and
- Source Code in C", 1996.
-
-
-
-
-
-
-
-
-
-
-
-
-Kolkman & Gieben Expires September 2, 2005 [Page 24]
-
-Internet-Draft DNSSEC Operational Practices March 2005
-
-
-Authors' Addresses
-
- Olaf M. Kolkman
- RIPE NCC
- Singel 256
- Amsterdam 1016 AB
- The Netherlands
-
- Phone: +31 20 535 4444
- Email: olaf@ripe.net
- URI: http://www.ripe.net/
-
-
- Miek Gieben
- NLnet Labs
- Kruislaan 419
- Amsterdam 1098 VA
- The Netherlands
-
- Email: miek@nlnetlabs.nl
- URI: http://www.nlnetlabs.nl
-
-Appendix A. Terminology
-
- In this document there is some jargon used that is defined in other
- documents. In most cases we have not copied the text from the
- documents defining the terms but given a more elaborate explanation
- of the meaning. Note that these explanations should not be seen as
- authoritative.
-
- Anchored Key: A DNSKEY configured in resolvers around the globe.
- This key is hard to update, hence the term anchored.
- Bogus: Also see Section 5 of [2]. An RRset in DNSSEC is marked
- "Bogus" when a signature of a RRset does not validate against a
- DNSKEY.
- Key-Signing Key or KSK: A Key-Signing Key (KSK) is a key that is used
- exclusively for signing the apex key set. The fact that a key is
- a KSK is only relevant to the signing tool.
- Private and Public Keys: DNSSEC secures the DNS through the use of
- public key cryptography. Public key cryptography is based on the
- existence of two keys, a public key and a private key. The public
- keys are published in the DNS by use of the DNSKEY Resource Record
- (DNSKEY RR). Private keys should remain private.
- Key Rollover: A key rollover (also called key supercession in some
- environments) is the act of replacing one key pair by another at
- the end of a key effectivity period.
-
-
-
-
-
-Kolkman & Gieben Expires September 2, 2005 [Page 25]
-
-Internet-Draft DNSSEC Operational Practices March 2005
-
-
- Secure Entry Point key or SEP Key: A KSK that has a parental DS
- record pointing to it. Note: this is not enforced in the
- protocol. A SEP Key with no parental DS is security lame.
- Singing the Zone File: The term used for the event where an
- administrator joyfully signs its zone file while producing melodic
- sound patterns.
- Signer: The system that has access to the private key material and
- signs the Resource Record sets in a zone. A signer may be
- configured to sign only parts of the zone e.g. only those RRsets
- for which existing signatures are about to expire.
- Zone-Signing Key or ZSK: A Zone Signing Key (ZSK) is a key that is
- used for signing all data in a zone. The fact that a key is a ZSK
- is only relevant to the signing tool.
- Zone Administrator: The 'role' that is responsible for signing a zone
- and publishing it on the primary authoritative server.
-
-Appendix B. Zone-signing Key Rollover Howto
-
- Using the pre-published signature scheme and the most conservative
- method to assure oneself that data does not live in caches here
- follows the "HOWTO".
- Step 0: The preparation: Create two keys and publish both in your key
- set. Mark one of the keys as "active" and the other as
- "published". Use the "active" key for signing your zone data.
- Store the private part of the "published" key, preferably off-
- line.
- The protocol does not provide for attributes to mark a key as
- active or published. This is something you have to do on your
- own, through the use of a notebook or key management tool.
- Step 1: Determine expiration: At the beginning of the rollover make a
- note of the highest expiration time of signatures in your zone
- file created with the current key marked as "active".
- Wait until the expiration time marked in Step 1 has passed
- Step 2: Then start using the key that was marked as "published" to
- sign your data i.e. mark it as "active". Stop using the key that
- was marked as "active", mark it as "rolled".
- Step 3: It is safe to engage in a new rollover (Step 1) after at
- least one "signature validity period".
-
-Appendix C. Typographic Conventions
-
- The following typographic conventions are used in this document:
- Key notation: A key is denoted by KEYx, where x is a number, x could
- be thought of as the key id.
-
-
-
-
-
-
-
-Kolkman & Gieben Expires September 2, 2005 [Page 26]
-
-Internet-Draft DNSSEC Operational Practices March 2005
-
-
- RRset notations: RRs are only denoted by the type. All other
- information - owner, class, rdata and TTL - is left out. Thus:
- "example.com 3600 IN A 192.168.1.1" is reduced to "A". RRsets are
- a list of RRs. A example of this would be: "A1,A2", specifying
- the RRset containing two "A" records. This could again be
- abbreviated to just "A".
- Signature notation: Signatures are denoted as RRSIGx(RRset), which
- means that RRset is signed with DNSKEYx.
- Zone representation: Using the above notation we have simplified the
- representation of a signed zone by leaving out all unnecessary
- details such as the names and by representing all data by "SOAx"
- SOA representation: SOA's are represented as SOAx, where x is the
- serial number.
- Using this notation the following zone:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Kolkman & Gieben Expires September 2, 2005 [Page 27]
-
-Internet-Draft DNSSEC Operational Practices March 2005
-
-
- example.net. 600 IN SOA ns.example.net. bert.example.net. (
- 10 ; serial
- 450 ; refresh (7 minutes 30 seconds)
- 600 ; retry (10 minutes)
- 345600 ; expire (4 days)
- 300 ; minimum (5 minutes)
- )
- 600 RRSIG SOA 5 2 600 20130522213204 (
- 20130422213204 14 example.net.
- cmL62SI6iAX46xGNQAdQ... )
- 600 NS a.iana-servers.net.
- 600 NS b.iana-servers.net.
- 600 RRSIG NS 5 2 600 20130507213204 (
- 20130407213204 14 example.net.
- SO5epiJei19AjXoUpFnQ ... )
- 3600 DNSKEY 256 3 5 (
- EtRB9MP5/AvOuVO0I8XDxy0...
- ) ; key id = 14
- 3600 DNSKEY 256 3 5 (
- gsPW/Yy19GzYIY+Gnr8HABU...
- ) ; key id = 15
- 3600 RRSIG DNSKEY 5 2 3600 20130522213204 (
- 20130422213204 14 example.net.
- J4zCe8QX4tXVGjV4e1r9... )
- 3600 RRSIG DNSKEY 5 2 3600 20130522213204 (
- 20130422213204 15 example.net.
- keVDCOpsSeDReyV6O... )
- 600 RRSIG NSEC 5 2 600 20130507213204 (
- 20130407213204 14 example.net.
- obj3HEp1GjnmhRjX... )
- a.example.net. 600 IN TXT "A label"
- 600 RRSIG TXT 5 3 600 20130507213204 (
- 20130407213204 14 example.net.
- IkDMlRdYLmXH7QJnuF3v... )
- 600 NSEC b.example.com. TXT RRSIG NSEC
- 600 RRSIG NSEC 5 3 600 20130507213204 (
- 20130407213204 14 example.net.
- bZMjoZ3bHjnEz0nIsPMM... )
-
- ...
-
-
- is reduced to the following representation:
-
-
-
-
-
-
-
-
-Kolkman & Gieben Expires September 2, 2005 [Page 28]
-
-Internet-Draft DNSSEC Operational Practices March 2005
-
-
- SOA10
- RRSIG14(SOA10)
-
- DNSKEY14
- DNSKEY15
-
- RRSIG14(KEY)
- RRSIG15(KEY)
-
- The rest of the zone data has the same signature as the SOA record,
- i.e a RRSIG created with DNSKEY 14.
-
-Appendix D. Document Details and Changes
-
- This section is to be removed by the RFC editor if and when the
- document is published.
-
- $Id: draft-ietf-dnsop-dnssec-operational-practices.xml,v 1.31.2.14
- 2005/03/21 15:51:41 dnssec Exp $
-
-D.1 draft-ietf-dnsop-dnssec-operational-practices-00
-
- Submission as working group document. This document is a modified
- and updated version of draft-kolkman-dnssec-operational-practices-00.
-
-D.2 draft-ietf-dnsop-dnssec-operational-practices-01
-
- changed the definition of "Bogus" to reflect the one in the protocol
- draft.
-
- Bad to Bogus
-
- Style and spelling corrections
-
- KSK - SEP mapping made explicit.
-
- Updates from Sam Weiler added
-
-D.3 draft-ietf-dnsop-dnssec-operational-practices-02
-
- Style and errors corrected.
-
- Added Automatic rollover requirements from I-D.ietf-dnsop-key-
- rollover-requirements.
-
-D.4 draft-ietf-dnsop-dnssec-operational-practices-03
-
- Added the definition of Key effectivity period and used that term
-
-
-
-Kolkman & Gieben Expires September 2, 2005 [Page 29]
-
-Internet-Draft DNSSEC Operational Practices March 2005
-
-
- instead of Key validity period.
-
- Modified the order of the sections, based on a suggestion by Rip
- Loomis.
-
- Included parts from RFC2541 [7]. Most of its ground was already
- covered. This document obsoletes RFC2541 [7]. Section 3.1.2
- deserves some review as it in contrast to RFC2541 does _not_ give
- recomendations about root-zone keys.
-
- added a paragraph to Section 4.4.4
-
-D.5 draft-ietf-dnsop-dnssec-operational-practices-04
-
- Somewhat more details added about the pre-publish KSK rollover. Also
- moved that subsection down a bit.
-
- Editorial and content nits that came in during wg last call were
- fixed.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Kolkman & Gieben Expires September 2, 2005 [Page 30]
-
-Internet-Draft DNSSEC Operational Practices March 2005
-
-
-Intellectual Property Statement
-
- The IETF takes no position regarding the validity or scope of any
- Intellectual Property Rights or other rights that might be claimed to
- pertain to the implementation or use of the technology described in
- this document or the extent to which any license under such rights
- might or might not be available; nor does it represent that it has
- made any independent effort to identify any such rights. Information
- on the procedures with respect to rights in RFC documents can be
- found in BCP 78 and BCP 79.
-
- Copies of IPR disclosures made to the IETF Secretariat and any
- assurances of licenses to be made available, or the result of an
- attempt made to obtain a general license or permission for the use of
- such proprietary rights by implementers or users of this
- specification can be obtained from the IETF on-line IPR repository at
- http://www.ietf.org/ipr.
-
- The IETF invites any interested party to bring to its attention any
- copyrights, patents or patent applications, or other proprietary
- rights that may cover technology that may be required to implement
- this standard. Please address the information to the IETF at
- ietf-ipr@ietf.org.
-
-
-Disclaimer of Validity
-
- This document and the information contained herein are provided on an
- "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
- OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
- ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
- INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
- INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
- WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
-
-
-Copyright Statement
-
- Copyright (C) The Internet Society (2005). This document is subject
- to the rights, licenses and restrictions contained in BCP 78, and
- except as set forth therein, the authors retain all their rights.
-
-
-Acknowledgment
-
- Funding for the RFC Editor function is currently provided by the
- Internet Society.
-
-
-
-
-Kolkman & Gieben Expires September 2, 2005 [Page 31]
-
diff --git a/doc/draft/draft-ietf-dnsop-dnssec-operational-practices-07.txt b/doc/draft/draft-ietf-dnsop-dnssec-operational-practices-07.txt
new file mode 100644
index 0000000000..56e5791ae9
--- /dev/null
+++ b/doc/draft/draft-ietf-dnsop-dnssec-operational-practices-07.txt
@@ -0,0 +1,1904 @@
+
+
+
+DNSOP O. Kolkman
+Internet-Draft R. Gieben
+Obsoletes: 2541 (if approved) NLnet Labs
+Expires: August 25, 2006 February 21, 2006
+
+
+ DNSSEC Operational Practices
+ draft-ietf-dnsop-dnssec-operational-practices-07.txt
+
+Status of this Memo
+
+ By submitting this Internet-Draft, each author represents that any
+ applicable patent or other IPR claims of which he or she is aware
+ have been or will be disclosed, and any of which he or she becomes
+ aware will be disclosed, in accordance with Section 6 of BCP 79.
+
+ Internet-Drafts are working documents of the Internet Engineering
+ Task Force (IETF), its areas, and its working groups. Note that
+ other groups may also distribute working documents as Internet-
+ Drafts.
+
+ Internet-Drafts are draft documents valid for a maximum of six months
+ and may be updated, replaced, or obsoleted by other documents at any
+ time. It is inappropriate to use Internet-Drafts as reference
+ material or to cite them other than as "work in progress."
+
+ The list of current Internet-Drafts can be accessed at
+ http://www.ietf.org/ietf/1id-abstracts.txt.
+
+ The list of Internet-Draft Shadow Directories can be accessed at
+ http://www.ietf.org/shadow.html.
+
+ This Internet-Draft will expire on August 25, 2006.
+
+Copyright Notice
+
+ Copyright (C) The Internet Society (2006).
+
+Abstract
+
+ This document describes a set of practices for operating the DNS with
+ security extensions (DNSSEC). The target audience is zone
+ administrators deploying DNSSEC.
+
+ The document discusses operational aspects of using keys and
+ signatures in the DNS. It discusses issues as key generation, key
+ storage, signature generation, key rollover and related policies.
+
+
+
+
+Kolkman & Gieben Expires August 25, 2006 [Page 1]
+
+Internet-Draft DNSSEC Operational Practices February 2006
+
+
+Table of Contents
+
+ 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4
+ 1.1. The Use of the Term 'key' . . . . . . . . . . . . . . . . 4
+ 1.2. Time Definitions . . . . . . . . . . . . . . . . . . . . . 5
+ 2. Keeping the Chain of Trust Intact . . . . . . . . . . . . . . 5
+ 3. Keys Generation and Storage . . . . . . . . . . . . . . . . . 6
+ 3.1. Zone and Key Signing Keys . . . . . . . . . . . . . . . . 6
+ 3.1.1. Motivations for the KSK and ZSK Separation . . . . . . 7
+ 3.1.2. KSKs for High Level Zones . . . . . . . . . . . . . . 7
+ 3.2. Key Generation . . . . . . . . . . . . . . . . . . . . . . 8
+ 3.3. Key Effectivity Period . . . . . . . . . . . . . . . . . . 8
+ 3.4. Key Algorithm . . . . . . . . . . . . . . . . . . . . . . 9
+ 3.5. Key Sizes . . . . . . . . . . . . . . . . . . . . . . . . 10
+ 3.6. Private Key Storage . . . . . . . . . . . . . . . . . . . 11
+ 4. Signature generation, Key Rollover and Related Policies . . . 12
+ 4.1. Time in DNSSEC . . . . . . . . . . . . . . . . . . . . . . 12
+ 4.1.1. Time Considerations . . . . . . . . . . . . . . . . . 12
+ 4.2. Key Rollovers . . . . . . . . . . . . . . . . . . . . . . 14
+ 4.2.1. Zone signing Key Rollovers . . . . . . . . . . . . . . 14
+ 4.2.2. Key signing Key Rollovers . . . . . . . . . . . . . . 18
+ 4.2.3. Difference Between ZSK and KSK Rollovers . . . . . . . 19
+ 4.2.4. Automated Key Rollovers . . . . . . . . . . . . . . . 20
+ 4.3. Planning for Emergency Key Rollover . . . . . . . . . . . 21
+ 4.3.1. KSK Compromise . . . . . . . . . . . . . . . . . . . . 21
+ 4.3.2. ZSK Compromise . . . . . . . . . . . . . . . . . . . . 23
+ 4.3.3. Compromises of Keys Anchored in Resolvers . . . . . . 23
+ 4.4. Parental Policies . . . . . . . . . . . . . . . . . . . . 23
+ 4.4.1. Initial Key Exchanges and Parental Policies
+ Considerations . . . . . . . . . . . . . . . . . . . . 23
+ 4.4.2. Storing Keys or Hashes? . . . . . . . . . . . . . . . 24
+ 4.4.3. Security Lameness . . . . . . . . . . . . . . . . . . 24
+ 4.4.4. DS Signature Validity Period . . . . . . . . . . . . . 25
+ 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 25
+ 6. Security Considerations . . . . . . . . . . . . . . . . . . . 26
+ 7. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 26
+ 8. References . . . . . . . . . . . . . . . . . . . . . . . . . . 26
+ 8.1. Normative References . . . . . . . . . . . . . . . . . . . 26
+ 8.2. Informative References . . . . . . . . . . . . . . . . . . 27
+ Appendix A. Terminology . . . . . . . . . . . . . . . . . . . . . 28
+ Appendix B. Zone signing Key Rollover Howto . . . . . . . . . . . 29
+ Appendix C. Typographic Conventions . . . . . . . . . . . . . . . 29
+ Appendix D. Document Details and Changes . . . . . . . . . . . . 31
+ D.1. draft-ietf-dnsop-dnssec-operational-practices-00 . . . . . 31
+ D.2. draft-ietf-dnsop-dnssec-operational-practices-01 . . . . . 31
+ D.3. draft-ietf-dnsop-dnssec-operational-practices-02 . . . . . 31
+ D.4. draft-ietf-dnsop-dnssec-operational-practices-03 . . . . . 32
+ D.5. draft-ietf-dnsop-dnssec-operational-practices-04 . . . . . 32
+
+
+
+Kolkman & Gieben Expires August 25, 2006 [Page 2]
+
+Internet-Draft DNSSEC Operational Practices February 2006
+
+
+ D.6. draft-ietf-dnsop-dnssec-operational-practices-05 . . . . . 32
+ D.7. draft-ietf-dnsop-dnssec-operational-practices-06 . . . . . 32
+ D.8. draft-ietf-dnsop-dnssec-operational-practices-07 . . . . . 32
+ Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 33
+ Intellectual Property and Copyright Statements . . . . . . . . . . 34
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Kolkman & Gieben Expires August 25, 2006 [Page 3]
+
+Internet-Draft DNSSEC Operational Practices February 2006
+
+
+1. Introduction
+
+ During workshops and early operational deployment tests, operators
+ and system administrators have gained experience about operating the
+ DNS with security extensions (DNSSEC). This document translates
+ these experiences into a set of practices for zone administrators.
+ At the time of writing, there exists very little experience with
+ DNSSEC in production environments; this document should therefore
+ explicitly not be seen as representing 'Best Current Practices'.
+
+ The procedures herein are focused on the maintenance of signed zones
+ (i.e. signing and publishing zones on authoritative servers). It is
+ intended that maintenance of zones such as re-signing or key
+ rollovers be transparent to any verifying clients on the Internet.
+
+ The structure of this document is as follows. In Section 2 we
+ discuss the importance of keeping the "chain of trust" intact.
+ Aspects of key generation and storage of private keys are discussed
+ in Section 3; the focus in this section is mainly on the private part
+ of the key(s). Section 4 describes considerations concerning the
+ public part of the keys. Since these public keys appear in the DNS
+ one has to take into account all kinds of timing issues, which are
+ discussed in Section 4.1. Section 4.2 and Section 4.3 deal with the
+ rollover, or supercession, of keys. Finally Section 4.4 discusses
+ considerations on how parents deal with their children's public keys
+ in order to maintain chains of trust.
+
+ The typographic conventions used in this document are explained in
+ Appendix C.
+
+ Since this is a document with operational suggestions and there are
+ no protocol specifications, the RFC2119 [3] language does not apply.
+
+ This document obsoletes RFC2541 [6].
+
+1.1. The Use of the Term 'key'
+
+ It is assumed that the reader is familiar with the concept of
+ asymmetric keys on which DNSSEC is based (Public Key Cryptography
+ [12]). Therefore, this document will use the term 'key' rather
+ loosely. Where it is written that 'a key is used to sign data' it is
+ assumed that the reader understands that it is the private part of
+ the key pair that is used for signing. It is also assumed that the
+ reader understands that the public part of the key pair is published
+ in the DNSKEY resource record and that it is the public part that is
+ used in key exchanges.
+
+
+
+
+
+Kolkman & Gieben Expires August 25, 2006 [Page 4]
+
+Internet-Draft DNSSEC Operational Practices February 2006
+
+
+1.2. Time Definitions
+
+ In this document we will be using a number of time related terms.
+ The following definitions apply:
+ o "Signature validity period"
+ The period that a signature is valid. It starts at the time
+ specified in the signature inception field of the RRSIG RR and
+ ends at the time specified in the expiration field of the RRSIG
+ RR.
+ o "Signature publication period"
+ Time after which a signature (made with a specific key) is
+ replaced with a new signature (made with the same key). This
+ replacement takes place by publishing the relevant RRSIG in the
+ master zone file.
+ After one stopped publishing an RRSIG in a zone it may take a
+ while before the RRSIG has expired from caches and has actually
+ been removed from the DNS.
+ o "Key effectivity period"
+ The period during which a key pair is expected to be effective.
+ This period is defined as the time between the first inception
+ time stamp and the last expiration date of any signature made
+ with this key, regardless of any discontinuity in the use of
+ the key.
+ The key effectivity period can span multiple signature validity
+ periods.
+ o "Maximum/Minimum Zone TTL"
+ The maximum or minimum value of the TTLs from the complete set
+ of RRs in a zone. Note that the minimum TTL is not the same as
+ the MINIMUM field in the SOA RR. See [5] for more information.
+
+
+2. Keeping the Chain of Trust Intact
+
+ Maintaining a valid chain of trust is important because broken chains
+ of trust will result in data being marked as Bogus (as defined in [2]
+ section 5), which may cause entire (sub)domains to become invisible
+ to verifying clients. The administrators of secured zones have to
+ realize that their zone is, to verifying clients, part of a chain of
+ trust.
+
+ As mentioned in the introduction, the procedures herein are intended
+ to ensure that maintenance of zones, such as re-signing or key
+ rollovers, will be transparent to the verifying clients on the
+ Internet.
+
+ Administrators of secured zones will have to keep in mind that data
+ published on an authoritative primary server will not be immediately
+ seen by verifying clients; it may take some time for the data to be
+
+
+
+Kolkman & Gieben Expires August 25, 2006 [Page 5]
+
+Internet-Draft DNSSEC Operational Practices February 2006
+
+
+ transferred to other secondary authoritative nameservers and clients
+ may be fetching data from caching non-authoritative servers. In this
+ light it is good to note that the time for a zone transfer from
+ master to slave is negligible when using NOTIFY and IXFR, increasing
+ by reliance on AXFR, and more if you rely on the SOA timing
+ parameters for zone refresh.
+
+ For the verifying clients it is important that data from secured
+ zones can be used to build chains of trust regardless of whether the
+ data came directly from an authoritative server, a caching nameserver
+ or some middle box. Only by carefully using the available timing
+ parameters can a zone administrator assure that the data necessary
+ for verification can be obtained.
+
+ The responsibility for maintaining the chain of trust is shared by
+ administrators of secured zones in the chain of trust. This is most
+ obvious in the case of a 'key compromise' when a trade off between
+ maintaining a valid chain of trust and replacing the compromised keys
+ as soon as possible must be made. Then zone administrators will have
+ to make a trade off, between keeping the chain of trust intact -
+ thereby allowing for attacks with the compromised key - or to
+ deliberately break the chain of trust and making secured sub domains
+ invisible to security aware resolvers. Also see Section 4.3.
+
+
+3. Keys Generation and Storage
+
+ This section describes a number of considerations with respect to the
+ security of keys. It deals with the generation, effectivity period,
+ size and storage of private keys.
+
+3.1. Zone and Key Signing Keys
+
+ The DNSSEC validation protocol does not distinguish between different
+ types of DNSKEYs. All DNSKEYs can be used during the validation. In
+ practice operators use Key Signing and Zone Signing Keys and use the
+ so-called (Secure Entry Point) SEP [1] flag to distinguish between
+ them during operations. The dynamics and considerations are
+ discussed below.
+
+ To make zone re-signing and key rollover procedures easier to
+ implement, it is possible to use one or more keys as Key Signing Keys
+ (KSK). These keys will only sign the apex DNSKEY RRSet in a zone.
+ Other keys can be used to sign all the RRSets in a zone and are
+ referred to as Zone Signing Keys (ZSK). In this document we assume
+ that KSKs are the subset of keys that are used for key exchanges with
+ the parent and potentially for configuration as trusted anchors - the
+ SEP keys. In this document we assume a one-to-one mapping between
+
+
+
+Kolkman & Gieben Expires August 25, 2006 [Page 6]
+
+Internet-Draft DNSSEC Operational Practices February 2006
+
+
+ KSK and SEP keys and we assume the SEP flag to be set on all KSKs.
+
+3.1.1. Motivations for the KSK and ZSK Separation
+
+ Differentiating between the KSK and ZSK functions has several
+ advantages:
+
+ o No parent/child interaction is required when ZSKs are updated.
+ o The KSK can be made stronger (i.e. using more bits in the key
+ material). This has little operational impact since it is only
+ used to sign a small fraction of the zone data. Also the KSK is
+ only used to verify the zone's key set, not for other RRSets in
+ the zone.
+ o As the KSK is only used to sign a key set, which is most probably
+ updated less frequently than other data in the zone, it can be
+ stored separately from and in a safer location than the ZSK.
+ o A KSK can have a longer key effectivity period.
+
+ For almost any method of key management and zone signing the KSK is
+ used less frequently than the ZSK. Once a key set is signed with the
+ KSK all the keys in the key set can be used as ZSK. If a ZSK is
+ compromised, it can be simply dropped from the key set. The new key
+ set is then re-signed with the KSK.
+
+ Given the assumption that for KSKs the SEP flag is set, the KSK can
+ be distinguished from a ZSK by examining the flag field in the DNSKEY
+ RR. If the flag field is an odd number it is a KSK. If it is an
+ even number it is a ZSK.
+
+ The zone signing key can be used to sign all the data in a zone on a
+ regular basis. When a zone signing key is to be rolled, no
+ interaction with the parent is needed. This allows for "Signature
+ Validity Periods" on the order of days.
+
+ The key signing key is only to be used to sign the DNSKEY RRs in a
+ zone. If a key signing key is to be rolled over, there will be
+ interactions with parties other than the zone administrator. These
+ can include the registry of the parent zone or administrators of
+ verifying resolvers that have the particular key configured as secure
+ entry points. Hence, the key effectivity period of these keys can
+ and should be made much longer. Although, given a long enough key,
+ the Key Effectivity Period can be on the order of years we suggest
+ planning for a key effectivity of the order of a few months so that a
+ key rollover remains an operational routine.
+
+3.1.2. KSKs for High Level Zones
+
+ Higher level zones are generally more sensitive than lower level
+
+
+
+Kolkman & Gieben Expires August 25, 2006 [Page 7]
+
+Internet-Draft DNSSEC Operational Practices February 2006
+
+
+ zones. Anyone controlling or breaking the security of a zone thereby
+ obtains authority over all of its sub domains (except in the case of
+ resolvers that have locally configured the public key of a sub
+ domain, in which case this, and only this, sub domain wouldn't be
+ affected by the compromise of the parent zone). Therefore, extra
+ care should be taken with high level zones and strong keys should
+ used.
+
+ The root zone is the most critical of all zones. Someone controlling
+ or compromising the security of the root zone would control the
+ entire DNS name space of all resolvers using that root zone (except
+ in the case of resolvers that have locally configured the public key
+ of a sub domain). Therefore, the utmost care must be taken in the
+ securing of the root zone. The strongest and most carefully handled
+ keys should be used. The root zone private key should always be kept
+ off line.
+
+ Many resolvers will start at a root server for their access to and
+ authentication of DNS data. Securely updating the trust anchors in
+ an enormous population of resolvers around the world will be
+ extremely difficult.
+
+3.2. Key Generation
+
+ Careful generation of all keys is a sometimes overlooked but
+ absolutely essential element in any cryptographically secure system.
+ The strongest algorithms used with the longest keys are still of no
+ use if an adversary can guess enough to lower the size of the likely
+ key space so that it can be exhaustively searched. Technical
+ suggestions for the generation of random keys will be found in
+ RFC4086 [9]. One should carefully assess if the random number
+ generator used during key generation adheres to these suggestions.
+
+ Keys with a long effectivity period are particularly sensitive as
+ they will represent a more valuable target and be subject to attack
+ for a longer time than short period keys. It is strongly recommended
+ that long term key generation occur off-line in a manner isolated
+ from the network via an air gap or, at a minimum, high level secure
+ hardware.
+
+3.3. Key Effectivity Period
+
+ For various reasons keys in DNSSEC need to be changed once in a
+ while. The longer a key is in use, the greater the probability that
+ it will have been compromised through carelessness, accident,
+ espionage, or cryptanalysis. Furthermore when key rollovers are too
+ rare an event, they will not become part of the operational habit and
+ there is risk that nobody on-site will remember the procedure for
+
+
+
+Kolkman & Gieben Expires August 25, 2006 [Page 8]
+
+Internet-Draft DNSSEC Operational Practices February 2006
+
+
+ rollover when the need is there.
+
+ From a purely operational perspective a reasonable key effectivity
+ period for Key Signing Keys is 13 months, with the intent to replace
+ them after 12 months. An intended key effectivity period of a month
+ is reasonable for Zone Signing Keys.
+
+ For a key sizes that matches these effectivity periods see
+ Section 3.5.
+
+ As argued in Section 3.1.2 securely updating trust anchors will be
+ extremely difficult. On the other hand the "operational habit"
+ argument does also apply to trust anchor reconfiguration. If a short
+ key-effectivity period is used and the trust anchor configuration has
+ to be revisited on a regular basis the odds that the configuration
+ tends to be forgotten is smaller. The trade-off is against a system
+ that is so dynamic that administrators of the validating clients will
+ not be able to follow the modifications.
+
+ Key effectivity periods can be made very short, as in the order of a
+ few minutes. But when replacing keys one has to take the
+ considerations from Section 4.1 and Section 4.2 into account.
+
+3.4. Key Algorithm
+
+ There are currently three different types of algorithms that can be
+ used in DNSSEC: RSA, DSA and elliptic curve cryptography. The latter
+ is fairly new and has yet to be standardized for usage in DNSSEC.
+
+ RSA has been developed in an open and transparent manner. As the
+ patent on RSA expired in 2000, its use is now also free.
+
+ DSA has been developed by NIST. The creation of signatures is
+ roughly done at the same speed as with RSA, but is 10 to 40 times as
+ slow for verification [12].
+
+ We suggest the use of RSA/SHA-1 as the preferred algorithm for the
+ key. The current known attacks on RSA can be defeated by making your
+ key longer. As the MD5 hashing algorithm is showing (theoretical)
+ cracks, we recommend the usage of SHA-1.
+
+ At the time of publication it is known that the SHA-1 hash has
+ cryptanalysis issues. There is work in progress on addressing these
+ issues. We recommend to use public key algorithms based on hashes
+ stronger than SHA-1, e.g. SHA-256, as soon as these algorithms are
+ available in protocol specifications (See [14] and [15] ) and
+ implementations.
+
+
+
+
+Kolkman & Gieben Expires August 25, 2006 [Page 9]
+
+Internet-Draft DNSSEC Operational Practices February 2006
+
+
+3.5. Key Sizes
+
+ When choosing key sizes, zone administrators will need to take into
+ account how long a key will be used, how much data will be signed
+ during the key publication period (See Section 8.10 of [12]) and,
+ optionally, how large the key size of the parent is. As the chain of
+ trust really is "a chain", it does not make much sense in making one
+ of the keys in the chain several times larger then the others. As
+ always, it's the weakest link that defines the strength of the entire
+ chain. Also see Section 3.1.1 for a discussion of how keys serving
+ different roles (ZSK v. KSK) may need different key sizes.
+
+ Generating a key of the correct size is a difficult problem, RFC3766
+ [8] tries to deal with that problem. Paragraph 1 of that RFC states:
+
+ 1. Determine the attack resistance necessary to satisfy the
+ security requirements of the application. Do this by
+ estimating the minimum number of computer operations that
+ the attacker will be forced to do in order to compromise
+ the security of the system and then take the logarithm base
+ two of that number. Call that logarithm value "n".
+
+ A 1996 report recommended 90 bits as a good all-around choice
+ for system security. The 90 bit number should be increased
+ by about 2/3 bit/year, or about 96 bits in 2005.
+
+ [8] goes on to explain how this number "n" can be used to calculate
+ the key sizes in public key cryptography. This culminated in the
+ table given below (slightly modified for our purpose):
+
+
+ +-------------+-----------+--------------+
+ | System | | |
+ | requirement | Symmetric | RSA or DSA |
+ | for attack | key size | modulus size |
+ | resistance | (bits) | (bits) |
+ | (bits) | | |
+ +-------------+-----------+--------------+
+ | 70 | 70 | 947 |
+ | 80 | 80 | 1228 |
+ | 90 | 90 | 1553 |
+ | 100 | 100 | 1926 |
+ | 150 | 150 | 4575 |
+ | 200 | 200 | 8719 |
+ | 250 | 250 | 14596 |
+ +-------------+-----------+--------------+
+
+ The key sizes given are rather large. This is because these keys are
+
+
+
+Kolkman & Gieben Expires August 25, 2006 [Page 10]
+
+Internet-Draft DNSSEC Operational Practices February 2006
+
+
+ resilient against a trillionaire attacker. Assuming this rich
+ attacker will not attack your key and that the key is rolled over
+ once a year, we come to the following recommendations about KSK
+ sizes; 1024 bits low value domains, 1300 for medium value and 2048
+ for the high value domains.
+
+ Whether a domain is of low, medium, high value depends solely on the
+ views of the zone owner. One could for instance view leaf nodes in
+ the DNS as of low value and TLDs or the root zone of high value. The
+ suggested key sizes should be safe for the next 5 years.
+
+ As ZSKs can be rolled over more easily (and thus more often) the key
+ sizes can be made smaller. But as said in the introduction of this
+ paragraph, making the ZSKs' key sizes too small (in relation to the
+ KSKs' sizes) doesn't make much sense. Try to limit the difference in
+ size to about 100 bits.
+
+ Note that nobody can see into the future, and that these key sizes
+ are only provided here as a guide. Further information can be found
+ in [11] and Section 7.5 of [12]. It should be noted though that [11]
+ is already considered overly optimistic about what key sizes are
+ considered safe.
+
+ One final note concerning key sizes. Larger keys will increase the
+ sizes of the RRSIG and DNSKEY records and will therefore increase the
+ chance of DNS UDP packet overflow. Also the time it takes to
+ validate and create RRSIGs increases with larger keys, so don't
+ needlessly double your key sizes.
+
+3.6. Private Key Storage
+
+ It is recommended that, where possible, zone private keys and the
+ zone file master copy that is to be signed, be kept and used in off-
+ line, non-network connected, physically secure machines only.
+ Periodically an application can be run to add authentication to a
+ zone by adding RRSIG and NSEC RRs. Then the augmented file can be
+ transferred.
+
+ When relying on dynamic update to manage a signed zone [4], be aware
+ that at least one private key of the zone will have to reside on the
+ master server. This key is only as secure as the amount of exposure
+ the server receives to unknown clients and the security of the host.
+ Although not mandatory one could administer the DNS in the following
+ way. The master that processes the dynamic updates is unavailable
+ from generic hosts on the Internet, it is not listed in the NS RR
+ set, although its name appears in the SOA RRs MNAME field. The
+ nameservers in the NS RR set are able to receive zone updates through
+ NOTIFY, IXFR, AXFR or an out-of-band distribution mechanism. This
+
+
+
+Kolkman & Gieben Expires August 25, 2006 [Page 11]
+
+Internet-Draft DNSSEC Operational Practices February 2006
+
+
+ approach is known as the "hidden master" setup.
+
+ The ideal situation is to have a one way information flow to the
+ network to avoid the possibility of tampering from the network.
+ Keeping the zone master file on-line on the network and simply
+ cycling it through an off-line signer does not do this. The on-line
+ version could still be tampered with if the host it resides on is
+ compromised. For maximum security, the master copy of the zone file
+ should be off net and should not be updated based on an unsecured
+ network mediated communication.
+
+ In general keeping a zone-file off-line will not be practical and the
+ machines on which zone files are maintained will be connected to a
+ network. Operators are advised to take security measures to shield
+ unauthorized access to the master copy.
+
+ For dynamically updated secured zones [4] both the master copy and
+ the private key that is used to update signatures on updated RRs will
+ need to be on-line.
+
+
+4. Signature generation, Key Rollover and Related Policies
+
+4.1. Time in DNSSEC
+
+ Without DNSSEC all times in DNS are relative. The SOA fields
+ REFRESH, RETRY and EXPIRATION are timers used to determine the time
+ elapsed after a slave server synchronized with a master server. The
+ Time to Live (TTL) value and the SOA RR minimum TTL parameter [5] are
+ used to determine how long a forwarder should cache data after it has
+ been fetched from an authoritative server. By using a signature
+ validity period, DNSSEC introduces the notion of an absolute time in
+ the DNS. Signatures in DNSSEC have an expiration date after which
+ the signature is marked as invalid and the signed data is to be
+ considered Bogus.
+
+4.1.1. Time Considerations
+
+ Because of the expiration of signatures, one should consider the
+ following:
+ o We suggest the Maximum Zone TTL of your zone data to be a fraction
+ of your signature validity period.
+ If the TTL would be of similar order as the signature validity
+ period, then all RRSets fetched during the validity period
+ would be cached until the signature expiration time. Section
+ 7.1 of [2] suggests that "the resolver may use the time
+ remaining before expiration of the signature validity period of
+ a signed RRSet as an upper bound for the TTL". As a result
+
+
+
+Kolkman & Gieben Expires August 25, 2006 [Page 12]
+
+Internet-Draft DNSSEC Operational Practices February 2006
+
+
+ query load on authoritative servers would peak at signature
+ expiration time, as this is also the time at which records
+ simultaneously expire from caches.
+ To avoid query load peaks we suggest the TTL on all the RRs in
+ your zone to be at least a few times smaller than your
+ signature validity period.
+ o We suggest the Signature Publication Period to end at least one
+ Maximum Zone TTL duration before the end of the Signature Validity
+ Period.
+ Re-signing a zone shortly before the end of the signature
+ validity period may cause simultaneous expiration of data from
+ caches. This in turn may lead to peaks in the load on
+ authoritative servers.
+ o We suggest the minimum zone TTL to be long enough to both fetch
+ and verifying all the RRs in the trust chain. In workshop
+ environments it has been demonstrated [13] that a low TTL (under 5
+ to 10 minutes) caused disruptions because of the following two
+ problems:
+ 1. During validation, some data may expire before the
+ validation is complete. The validator should be able to keep
+ all data, until is completed. This applies to all RRs needed
+ to complete the chain of trust: DSs, DNSKEYs, RRSIGs, and the
+ final answers i.e. the RRSet that is returned for the initial
+ query.
+ 2. Frequent verification causes load on recursive nameservers.
+ Data at delegation points, DSs, DNSKEYs and RRSIGs benefit from
+ caching. The TTL on those should be relatively long.
+ o Slave servers will need to be able to fetch newly signed zones
+ well before the RRSIGs in the zone served by the slave server pass
+ their signature expiration time.
+ When a slave server is out of sync with its master and data in
+ a zone is signed by expired signatures it may be better for the
+ slave server not to give out any answer.
+ Normally a slave server that is not able to contact a master
+ server for an extended period will expire a zone. When that
+ happens the server will respond differently to queries for that
+ zone. Some servers issue SERVFAIL while others turn off the
+ 'AA' bit in the answers. The time of expiration is set in the
+ SOA record and is relative to the last successful refresh
+ between the master and the slave server. There exists no
+ coupling between the signature expiration of RRSIGs in the zone
+ and the expire parameter in the SOA.
+ If the server serves a DNSSEC zone then it may well happen that
+ the signatures expire well before the SOA expiration timer
+ counts down to zero. It is not possible to completely prevent
+ this from happening by tweaking the SOA parameters.
+
+
+
+
+
+Kolkman & Gieben Expires August 25, 2006 [Page 13]
+
+Internet-Draft DNSSEC Operational Practices February 2006
+
+
+ However, the effects can be minimized where the SOA expiration
+ time is equal or shorter than the signature validity period.
+ The consequence of an authoritative server not being able to
+ update a zone, whilst that zone includes expired signatures, is
+ that non-secure resolvers will continue to be able to resolve
+ data served by the particular slave servers while security
+ aware resolvers will experience problems because of answers
+ being marked as Bogus.
+ We suggest the SOA expiration timer being approximately one
+ third or one fourth of the signature validity period. It will
+ allow problems with transfers from the master server to be
+ noticed before the actual signature times out.
+ We also suggest that operators of nameservers that supply
+ secondary services develop 'watch dogs' to spot upcoming
+ signature expirations in zones they slave, and take appropriate
+ action.
+ When determining the value for the expiration parameter one has
+ to take the following into account: What are the chances that
+ all my secondaries expire the zone; How quickly can I reach an
+ administrator of secondary servers to load a valid zone? All
+ these arguments are not DNSSEC specific but may influence the
+ choice of your signature validity intervals.
+
+4.2. Key Rollovers
+
+ A DNSSEC key cannot be used forever (see Section 3.3). So key
+ rollovers -- or supercessions, as they are sometimes called -- are a
+ fact of life when using DNSSEC. Zone administrators who are in the
+ process of rolling their keys have to take into account that data
+ published in previous versions of their zone still lives in caches.
+ When deploying DNSSEC, this becomes an important consideration;
+ ignoring data that may be in caches may lead to loss of service for
+ clients.
+
+ The most pressing example of this occurs when zone material signed
+ with an old key is being validated by a resolver which does not have
+ the old zone key cached. If the old key is no longer present in the
+ current zone, this validation fails, marking the data Bogus.
+ Alternatively, an attempt could be made to validate data which is
+ signed with a new key against an old key that lives in a local cache,
+ also resulting in data being marked Bogus.
+
+4.2.1. Zone signing Key Rollovers
+
+ For zone signing key rollovers there are two ways to make sure that
+ during the rollover data still cached can be verified with the new
+ key sets or newly generated signatures can be verified with the keys
+ still in caches. One schema, described in Section 4.2.1.2, uses
+
+
+
+Kolkman & Gieben Expires August 25, 2006 [Page 14]
+
+Internet-Draft DNSSEC Operational Practices February 2006
+
+
+ double signatures; the other uses key pre-publication
+ (Section 4.2.1.1). The pros, cons and recommendations are described
+ in Section 4.2.1.3.
+
+4.2.1.1. Pre-publish Key Rollover
+
+ This section shows how to perform a ZSK rollover without the need to
+ sign all the data in a zone twice - the so-called "pre-publish
+ rollover".This method has advantages in the case of a key compromise.
+ If the old key is compromised, the new key has already been
+ distributed in the DNS. The zone administrator is then able to
+ quickly switch to the new key and remove the compromised key from the
+ zone. Another major advantage is that the zone size does not double,
+ as is the case with the double signature ZSK rollover. A small
+ "HOWTO" for this kind of rollover can be found in Appendix B.
+
+ initial new DNSKEY new RRSIGs DNSKEY removal
+
+ SOA0 SOA1 SOA2 SOA3
+ RRSIG10(SOA0) RRSIG10(SOA1) RRSIG11(SOA2) RRSIG11(SOA3)
+
+ DNSKEY1 DNSKEY1 DNSKEY1 DNSKEY1
+ DNSKEY10 DNSKEY10 DNSKEY10 DNSKEY11
+ DNSKEY11 DNSKEY11
+ RRSIG1 (DNSKEY) RRSIG1 (DNSKEY) RRSIG1(DNSKEY) RRSIG1 (DNSKEY)
+ RRSIG10(DNSKEY) RRSIG10(DNSKEY) RRSIG11(DNSKEY) RRSIG11(DNSKEY)
+
+
+ initial: Initial version of the zone: DNSKEY 1 is the key signing
+ key. DNSKEY 10 is used to sign all the data of the zone, the zone
+ signing key.
+ new DNSKEY: DNSKEY 11 is introduced into the key set. Note that no
+ signatures are generated with this key yet, but this does not
+ secure against brute force attacks on the public key. The minimum
+ duration of this pre-roll phase is the time it takes for the data
+ to propagate to the authoritative servers plus TTL value of the
+ key set.
+ new RRSIGs: At the "new RRSIGs" stage (SOA serial 2) DNSKEY 11 is
+ used to sign the data in the zone exclusively (i.e. all the
+ signatures from DNSKEY 10 are removed from the zone). DNSKEY 10
+ remains published in the key set. This way data that was loaded
+ into caches from version 1 of the zone can still be verified with
+ key sets fetched from version 2 of the zone.
+ The minimum time that the key set including DNSKEY 10 is to be
+ published is the time that it takes for zone data from the
+ previous version of the zone to expire from old caches i.e. the
+ time it takes for this zone to propagate to all authoritative
+ servers plus the Maximum Zone TTL value of any of the data in the
+
+
+
+Kolkman & Gieben Expires August 25, 2006 [Page 15]
+
+Internet-Draft DNSSEC Operational Practices February 2006
+
+
+ previous version of the zone.
+ DNSKEY removal: DNSKEY 10 is removed from the zone. The key set, now
+ only containing DNSKEY 1 and DNSKEY 11 is re-signed with the
+ DNSKEY 1.
+
+ The above scheme can be simplified by always publishing the "future"
+ key immediately after the rollover. The scheme would look as follows
+ (we show two rollovers); the future key is introduced in "new DNSKEY"
+ as DNSKEY 12 and again a newer one, numbered 13, in "new DNSKEY
+ (II)":
+
+
+ initial new RRSIGs new DNSKEY
+
+ SOA0 SOA1 SOA2
+ RRSIG10(SOA0) RRSIG11(SOA1) RRSIG11(SOA2)
+
+ DNSKEY1 DNSKEY1 DNSKEY1
+ DNSKEY10 DNSKEY10 DNSKEY11
+ DNSKEY11 DNSKEY11 DNSKEY12
+ RRSIG1(DNSKEY) RRSIG1 (DNSKEY) RRSIG1(DNSKEY)
+ RRSIG10(DNSKEY) RRSIG11(DNSKEY) RRSIG11(DNSKEY)
+
+
+ new RRSIGs (II) new DNSKEY (II)
+
+ SOA3 SOA4
+ RRSIG12(SOA3) RRSIG12(SOA4)
+
+ DNSKEY1 DNSKEY1
+ DNSKEY11 DNSKEY12
+ DNSKEY12 DNSKEY13
+ RRSIG1(DNSKEY) RRSIG1(DNSKEY)
+ RRSIG12(DNSKEY) RRSIG12(DNSKEY)
+
+
+ Note that the key introduced in the "new DNSKEY" phase is not used
+ for production yet; the private key can thus be stored in a
+ physically secure manner and does not need to be 'fetched' every time
+ a zone needs to be signed.
+
+4.2.1.2. Double Signature Zone signing Key Rollover
+
+ This section shows how to perform a ZSK key rollover using the double
+ zone data signature scheme, aptly named "double sig rollover".
+
+ During the "new DNSKEY" stage the new version of the zone file will
+ need to propagate to all authoritative servers and the data that
+
+
+
+Kolkman & Gieben Expires August 25, 2006 [Page 16]
+
+Internet-Draft DNSSEC Operational Practices February 2006
+
+
+ exists in (distant) caches will need to expire, requiring at least
+ the maximum Zone TTL.
+
+ initial new DNSKEY DNSKEY removal
+
+ SOA0 SOA1 SOA2
+ RRSIG10(SOA0) RRSIG10(SOA1) RRSIG11(SOA2)
+ RRSIG11(SOA1)
+
+ DNSKEY1 DNSKEY1 DNSKEY1
+ DNSKEY10 DNSKEY10 DNSKEY11
+ DNSKEY11
+ RRSIG1(DNSKEY) RRSIG1(DNSKEY) RRSIG1(DNSKEY)
+ RRSIG10(DNSKEY) RRSIG10(DNSKEY) RRSIG11(DNSKEY)
+ RRSIG11(DNSKEY)
+
+ initial: Initial Version of the zone: DNSKEY 1 is the key signing
+ key. DNSKEY 10 is used to sign all the data of the zone, the zone
+ signing key.
+ new DNSKEY: At the "New DNSKEY" stage (SOA serial 1) DNSKEY 11 is
+ introduced into the key set and all the data in the zone is signed
+ with DNSKEY 10 and DNSKEY 11. The rollover period will need to
+ exist until all data from version 0 of the zone has expired from
+ remote caches. This will take at least the maximum Zone TTL of
+ version 0 of the zone.
+ DNSKEY removal: DNSKEY 10 is removed from the zone. All the
+ signatures from DNSKEY 10 are removed from the zone. The key set,
+ now only containing DNSKEY 11, is re-signed with DNSKEY 1.
+
+ At every instance, RRSIGs from the previous version of the zone can
+ be verified with the DNSKEY RRSet from the current version and the
+ other way around. The data from the current version can be verified
+ with the data from the previous version of the zone. The duration of
+ the "new DNSKEY" phase and the period between rollovers should be at
+ least the Maximum Zone TTL.
+
+ Making sure that the "new DNSKEY" phase lasts until the signature
+ expiration time of the data in initial version of the zone is
+ recommended. This way all caches are cleared of the old signatures.
+ However, this duration could be considerably longer than the Maximum
+ Zone TTL, making the rollover a lengthy procedure.
+
+ Note that in this example we assumed that the zone was not modified
+ during the rollover. New data can be introduced in the zone as long
+ as it is signed with both keys.
+
+
+
+
+
+
+Kolkman & Gieben Expires August 25, 2006 [Page 17]
+
+Internet-Draft DNSSEC Operational Practices February 2006
+
+
+4.2.1.3. Pros and Cons of the Schemes
+
+ Pre-publish Key Rollover: This rollover does not involve signing the
+ zone data twice. Instead, before the actual rollover, the new key
+ is published in the key set and thus available for cryptanalysis
+ attacks. A small disadvantage is that this process requires four
+ steps. Also the pre-publish scheme involves more parental work
+ when used for KSK rollovers as explained in Section 4.2.3.
+ Double Signature Zone-signing Key Rollover: The drawback of this
+ signing scheme is that during the rollover the number of
+ signatures in your zone doubles, this may be prohibitive if you
+ have very big zones. An advantage is that it only requires three
+ steps.
+
+4.2.2. Key signing Key Rollovers
+
+ For the rollover of a key signing key the same considerations as for
+ the rollover of a zone signing key apply. However we can use a
+ double signature scheme to guarantee that old data (only the apex key
+ set) in caches can be verified with a new key set and vice versa.
+ Since only the key set is signed with a KSK, zone size considerations
+ do not apply.
+
+
+ initial new DNSKEY DS change DNSKEY removal
+ Parent:
+ SOA0 --------> SOA1 -------->
+ RRSIGpar(SOA0) --------> RRSIGpar(SOA1) -------->
+ DS1 --------> DS2 -------->
+ RRSIGpar(DS) --------> RRSIGpar(DS) -------->
+
+
+ Child:
+ SOA0 SOA1 --------> SOA2
+ RRSIG10(SOA0) RRSIG10(SOA1) --------> RRSIG10(SOA2)
+ -------->
+ DNSKEY1 DNSKEY1 --------> DNSKEY2
+ DNSKEY2 -------->
+ DNSKEY10 DNSKEY10 --------> DNSKEY10
+ RRSIG1 (DNSKEY) RRSIG1 (DNSKEY) --------> RRSIG2 (DNSKEY)
+ RRSIG2 (DNSKEY) -------->
+ RRSIG10(DNSKEY) RRSIG10(DNSKEY) --------> RRSIG10(DNSKEY)
+
+ initial: Initial version of the zone. The parental DS points to
+ DNSKEY1. Before the rollover starts the child will have to verify
+ what the TTL is of the DS RR that points to DNSKEY1 - it is needed
+ during the rollover and we refer to the value as TTL_DS.
+
+
+
+
+Kolkman & Gieben Expires August 25, 2006 [Page 18]
+
+Internet-Draft DNSSEC Operational Practices February 2006
+
+
+ new DNSKEY: During the "new DNSKEY" phase the zone administrator
+ generates a second KSK, DNSKEY2. The key is provided to the
+ parent and the child will have to wait until a new DS RR has been
+ generated that points to DNSKEY2. After that DS RR has been
+ published on all servers authoritative for the parent's zone, the
+ zone administrator has to wait at least TTL_DS to make sure that
+ the old DS RR has expired from caches.
+ DS change: The parent replaces DS1 with DS2.
+ DNSKEY removal: DNSKEY1 has been removed.
+
+ The scenario above puts the responsibility for maintaining a valid
+ chain of trust with the child. It also is based on the premises that
+ the parent only has one DS RR (per algorithm) per zone. An
+ alternative mechanism has been considered. Using an established
+ trust relation, the interaction can be performed in-band, and the
+ removal of the keys by the child can possibly be signaled by the
+ parent. In this mechanism there are periods where there are two DS
+ RRs at the parent. Since at the moment of writing the protocol for
+ this interaction has not been developed, further discussion is out of
+ scope for this document.
+
+4.2.3. Difference Between ZSK and KSK Rollovers
+
+ Note that KSK rollovers and ZSK rollovers are different in the sense
+ that a KSK rollover requires interaction with the parent (and
+ possibly replacing of trust anchors) and the ensuing delay while
+ waiting for it.
+
+ A zone key rollover can be handled in two different ways: pre-publish
+ (Section Section 4.2.1.1) and double signature (Section
+ Section 4.2.1.2).
+
+ As the KSK is used to validate the key set and because the KSK is not
+ changed during a ZSK rollover, a cache is able to validate the new
+ key set of the zone. The pre-publish method would work for a KSK
+ rollover. The records that are to be pre-published are the parental
+ DS RRs. The pre-publish method has some drawbacks for KSKs. We
+ first describe the rollover scheme and then indicate these drawbacks.
+
+
+
+
+
+
+
+
+
+
+
+
+
+Kolkman & Gieben Expires August 25, 2006 [Page 19]
+
+Internet-Draft DNSSEC Operational Practices February 2006
+
+
+ initial new DS new DNSKEY DS/DNSKEY removal
+ Parent:
+ SOA0 SOA1 --------> SOA2
+ RRSIGpar(SOA0) RRSIGpar(SOA1) --------> RRSIGpar(SOA2)
+ DS1 DS1 --------> DS2
+ DS2 -------->
+ RRSIGpar(DS) RRSIGpar(DS) --------> RRSIGpar(DS)
+
+
+
+ Child:
+ SOA0 --------> SOA1 SOA1
+ RRSIG10(SOA0) --------> RRSIG10(SOA1) RRSIG10(SOA1)
+ -------->
+ DNSKEY1 --------> DNSKEY2 DNSKEY2
+ -------->
+ DNSKEY10 --------> DNSKEY10 DNSKEY10
+ RRSIG1 (DNSKEY) --------> RRSIG2(DNSKEY) RRSIG2 (DNSKEY)
+ RRSIG10(DNSKEY) --------> RRSIG10(DNSKEY) RRSIG10(DNSKEY)
+
+ When the child zone wants to roll it notifies the parent during the
+ "new DS" phase and submits the new key (or the corresponding DS) to
+ the parent. The parent publishes DS1 and DS2, pointing to DNSKEY1
+ and DNSKEY2 respectively. During the rollover ("new DNSKEY" phase),
+ which can take place as soon as the new DS set propagated through the
+ DNS, the child replaces DNSKEY1 with DNSKEY2. Immediately after that
+ ("DS/DNSKEY removal" phase) it can notify the parent that the old DS
+ record can be deleted.
+
+ The drawbacks of this scheme are that during the "new DS" phase the
+ parent cannot verify the match between the DS2 RR and DNSKEY2 using
+ the DNS -- as DNSKEY2 is not yet published. Besides, we introduce a
+ "security lame" key (See Section 4.4.3). Finally the child-parent
+ interaction consists of two steps. The "double signature" method
+ only needs one interaction.
+
+4.2.4. Automated Key Rollovers
+
+ As keys must be renewed periodically, there is some motivation to
+ automate the rollover process. Consider that:
+
+ o ZSK rollovers are easy to automate as only the child zone is
+ involved.
+ o A KSK rollover needs interaction between parent and child. Data
+ exchange is needed to provide the new keys to the parent,
+ consequently, this data must be authenticated and integrity must
+ be guaranteed in order to avoid attacks on the rollover.
+
+
+
+
+Kolkman & Gieben Expires August 25, 2006 [Page 20]
+
+Internet-Draft DNSSEC Operational Practices February 2006
+
+
+4.3. Planning for Emergency Key Rollover
+
+ This section deals with preparation for a possible key compromise.
+ Our advice is to have a documented procedure ready for when a key
+ compromise is suspected or confirmed.
+
+ When the private material of one of your keys is compromised it can
+ be used for as long as a valid trust chain exists. A trust chain
+ remains intact for:
+ o as long as a signature over the compromised key in the trust chain
+ is valid,
+ o as long as a parental DS RR (and signature) points to the
+ compromised key,
+ o as long as the key is anchored in a resolver and is used as a
+ starting point for validation (this is generally the hardest to
+ update).
+
+ While a trust chain to your compromised key exists, your name-space
+ is vulnerable to abuse by anyone who has obtained illegitimate
+ possession of the key. Zone operators have to make a trade off if
+ the abuse of the compromised key is worse than having data in caches
+ that cannot be validated. If the zone operator chooses to break the
+ trust chain to the compromised key, data in caches signed with this
+ key cannot be validated. However, if the zone administrator chooses
+ to take the path of a regular roll-over, the malicious key holder can
+ spoof data so that it appears to be valid.
+
+4.3.1. KSK Compromise
+
+ A zone containing a DNSKEY RRSet with a compromised KSK is vulnerable
+ as long as the compromised KSK is configured as trust anchor or a
+ parental DS points to it.
+
+ A compromised KSK can be used to sign the key set of an attacker's
+ zone. That zone could be used to poison the DNS.
+
+ Therefore when the KSK has been compromised, the trust anchor or the
+ parental DS, should be replaced as soon as possible. It is local
+ policy whether to break the trust chain during the emergency
+ rollover. The trust chain would be broken when the compromised KSK
+ is removed from the child's zone while the parent still has a DS
+ pointing to the compromised KSK (the assumption is that there is only
+ one DS at the parent. If there are multiple DSs this does not apply
+ -- however the chain of trust of this particular key is broken).
+
+ Note that an attacker's zone still uses the compromised KSK and the
+ presence of a parental DS would cause the data in this zone to appear
+ as valid. Removing the compromised key would cause the attacker's
+
+
+
+Kolkman & Gieben Expires August 25, 2006 [Page 21]
+
+Internet-Draft DNSSEC Operational Practices February 2006
+
+
+ zone to appear as valid and the child's zone as Bogus. Therefore we
+ advise not to remove the KSK before the parent has a DS to a new KSK
+ in place.
+
+4.3.1.1. Keeping the Chain of Trust Intact
+
+ If we follow this advice the timing of the replacement of the KSK is
+ somewhat critical. The goal is to remove the compromised KSK as soon
+ as the new DS RR is available at the parent. And also make sure that
+ the signature made with a new KSK over the key set with the
+ compromised KSK in it expires just after the new DS appears at the
+ parent. Thus removing the old cruft in one swoop.
+
+ The procedure is as follows:
+ 1. Introduce a new KSK into the key set, keep the compromised KSK in
+ the key set.
+ 2. Sign the key set, with a short validity period. The validity
+ period should expire shortly after the DS is expected to appear
+ in the parent and the old DSs have expired from caches.
+ 3. Upload the DS for this new key to the parent.
+ 4. Follow the procedure of the regular KSK rollover: Wait for the DS
+ to appear in the authoritative servers and then wait as long as
+ the TTL of the old DS RRs. If necessary re-sign the DNSKEY RRSet
+ and modify/extend the expiration time.
+ 5. Remove the compromised DNSKEY RR from the zone and re-sign the
+ key set using your "normal" validity interval.
+
+ An additional danger of a key compromise is that the compromised key
+ could be used to facilitate a legitimate DNSKEY/DS rollover and/or
+ nameserver changes at the parent. When that happens the domain may
+ be in dispute. An authenticated out of band and secure notify
+ mechanism to contact a parent is needed in this case.
+
+ Note that this is only a problem when the DNSKEY and or DS records
+ are used for authentication at the parent.
+
+4.3.1.2. Breaking the Chain of Trust
+
+ There are two methods to break the chain of trust. The first method
+ causes the child zone to appear as 'Bogus' to validating resolvers.
+ The other causes the the child zone to appear as 'insecure'. These
+ are described below.
+
+ In the method that causes the child zone to appear as 'Bogus' to
+ validating resolvers, the child zone replaces the current KSK with a
+ new one and resigns the key set. Next it sends the DS of the new key
+ to the parent. Only after the parent has placed the new DS in the
+ zone, the child's chain of trust is repaired.
+
+
+
+Kolkman & Gieben Expires August 25, 2006 [Page 22]
+
+Internet-Draft DNSSEC Operational Practices February 2006
+
+
+ An alternative method of breaking the chain of trust is by removing
+ the DS RRs from the parent zone altogether. As a result the child
+ zone would become insecure.
+
+4.3.2. ZSK Compromise
+
+ Primarily because there is no parental interaction required when a
+ ZSK is compromised, the situation is less severe than with a KSK
+ compromise. The zone must still be re-signed with a new ZSK as soon
+ as possible. As this is a local operation and requires no
+ communication between the parent and child this can be achieved
+ fairly quickly. However, one has to take into account that just as
+ with a normal rollover the immediate disappearance of the old
+ compromised key may lead to verification problems. Also note that as
+ long as the RRSIG over the compromised ZSK is not expired the zone
+ may be still at risk.
+
+4.3.3. Compromises of Keys Anchored in Resolvers
+
+ A key can also be pre-configured in resolvers. For instance, if
+ DNSSEC is successfully deployed the root key may be pre-configured in
+ most security aware resolvers.
+
+ If trust-anchor keys are compromised, the resolvers using these keys
+ should be notified of this fact. Zone administrators may consider
+ setting up a mailing list to communicate the fact that a SEP key is
+ about to be rolled over. This communication will of course need to
+ be authenticated e.g. by using digital signatures.
+
+ End-users faced with the task of updating an anchored key should
+ always validate the new key. New keys should be authenticated out of
+ band, for example, looking them up on an SSL secured announcement
+ website.
+
+4.4. Parental Policies
+
+4.4.1. Initial Key Exchanges and Parental Policies Considerations
+
+ The initial key exchange is always subject to the policies set by the
+ parent. When designing a key exchange policy one should take into
+ account that the authentication and authorization mechanisms used
+ during a key exchange should be as strong as the authentication and
+ authorization mechanisms used for the exchange of delegation
+ information between parent and child. I.e. there is no implicit need
+ in DNSSEC to make the authentication process stronger than it was in
+ DNS.
+
+ Using the DNS itself as the source for the actual DNSKEY material,
+
+
+
+Kolkman & Gieben Expires August 25, 2006 [Page 23]
+
+Internet-Draft DNSSEC Operational Practices February 2006
+
+
+ with an off-band check on the validity of the DNSKEY, has the benefit
+ that it reduces the chances of user error. A DNSKEY query tool can
+ make use of the SEP bit [1] to select the proper key from a DNSSEC
+ key set; thereby reducing the chance that the wrong DNSKEY is sent.
+ It can validate the self-signature over a key; thereby verifying the
+ ownership of the private key material. Fetching the DNSKEY from the
+ DNS ensures that the chain of trust remains intact once the parent
+ publishes the DS RR indicating the child is secure.
+
+ Note: the off-band verification is still needed when the key-material
+ is fetched via the DNS. The parent can never be sure whether the
+ DNSKEY RRs have been spoofed or not.
+
+4.4.2. Storing Keys or Hashes?
+
+ When designing a registry system one should consider which of the
+ DNSKEYs and/or the corresponding DSs to store. Since a child zone
+ might wish to have a DS published using a message digest algorithm
+ not yet understood by the registry, the registry can't count on being
+ able to generate the DS record from a raw DNSKEY. Thus, we recommend
+ that registry systems at least support storing DS records.
+
+ It may also be useful to store DNSKEYs, since having them may help
+ during troubleshooting and, as long as the child's chosen message
+ digest is supported, the overhead of generating DS records from them
+ is minimal. Having an out-of-band mechanism, such as a registry
+ directory (e.g. Whois), to find out which keys are used to generate
+ DS Resource Records for specific owners and/or zones may also help
+ with troubleshooting.
+
+ The storage considerations also relate to the design of the customer
+ interface and the method by which data is transferred between
+ registrant and registry; Will the child zone administrator be able to
+ upload DS RRs with unknown hash algorithms or does the interface only
+ allow DNSKEYs? In the registry-registrar model one can use the
+ DNSSEC EPP protocol extension [10] which allows transfer of DS RRs
+ and optionally DNSKEY RRs.
+
+4.4.3. Security Lameness
+
+ Security Lameness is defined as what happens when a parent has a DS
+ RR pointing to a non-existing DNSKEY RR. When this happens the
+ child's zone may be marked as "Bogus" by verifying DNS clients.
+
+ As part of a comprehensive delegation check the parent could, at key
+ exchange time, verify that the child's key is actually configured in
+ the DNS. However if a parent does not understand the hashing
+ algorithm used by child the parental checks are limited to only
+
+
+
+Kolkman & Gieben Expires August 25, 2006 [Page 24]
+
+Internet-Draft DNSSEC Operational Practices February 2006
+
+
+ comparing the key id.
+
+ Child zones should be very careful removing DNSKEY material,
+ specifically SEP keys, for which a DS RR exists.
+
+ Once a zone is "security lame", a fix (e.g. removing a DS RR) will
+ take time to propagate through the DNS.
+
+4.4.4. DS Signature Validity Period
+
+ Since the DS can be replayed as long as it has a valid signature, a
+ short signature validity period over the DS minimizes the time a
+ child is vulnerable in the case of a compromise of the child's
+ KSK(s). A signature validity period that is too short introduces the
+ possibility that a zone is marked Bogus in case of a configuration
+ error in the signer. There may not be enough time to fix the
+ problems before signatures expire. Something as mundane as operator
+ unavailability during weekends shows the need for DS signature
+ validity periods longer than 2 days. We recommend an absolute
+ minimum for a DS signature validity period of a few days.
+
+ The maximum signature validity period of the DS record depends on how
+ long child zones are willing to be vulnerable after a key compromise.
+ On the other hand shortening the DS signature validity interval
+ increases the operational risk for the parent. Therefore the parent
+ may have policy to use a signature validity interval that is
+ considerably longer than the child would hope for.
+
+ A compromise between the operational constraints of the parent and
+ minimizing damage for the child may result in a DS signature validity
+ period somewhere between the order of a week to order of months.
+
+ In addition to the signature validity period, which sets a lower
+ bound on the number of times the zone owner will need to sign the
+ zone data and which sets an upper bound to the time a child is
+ vulnerable after key compromise, there is the TTL value on the DS
+ RRs. Shortening the TTL means that the authoritative servers will
+ see more queries. But on the other hand, a short TTL lowers the
+ persistence of DS RRSets in caches thereby increases the speed with
+ which updated DS RRSets propagate through the DNS.
+
+
+5. IANA Considerations
+
+ This overview document introduces no new IANA considerations.
+
+
+
+
+
+
+Kolkman & Gieben Expires August 25, 2006 [Page 25]
+
+Internet-Draft DNSSEC Operational Practices February 2006
+
+
+6. Security Considerations
+
+ DNSSEC adds data integrity to the DNS. This document tries to assess
+ the operational considerations to maintain a stable and secure DNSSEC
+ service. Not taking into account the 'data propagation' properties
+ in the DNS will cause validation failures and may make secured zones
+ unavailable to security aware resolvers.
+
+
+7. Acknowledgments
+
+ Most of the ideas in this draft were the result of collective efforts
+ during workshops, discussions and try outs.
+
+ At the risk of forgetting individuals who were the original
+ contributors of the ideas we would like to acknowledge people who
+ were actively involved in the compilation of this document. In
+ random order: Rip Loomis, Olafur Gudmundsson, Wesley Griffin, Michael
+ Richardson, Scott Rose, Rick van Rein, Tim McGinnis, Gilles Guette
+ Olivier Courtay, Sam Weiler, Jelte Jansen, Niall O'Reilly, Holger
+ Zuleger, Ed Lewis, Hilarie Orman, Marcos Sanz and Peter Koch.
+
+ Some material in this document has been shamelessly copied from
+ RFC2541 [6] by Donald Eastlake.
+
+ Mike StJohns designed the key exchange between parent and child
+ mentioned in the last paragraph of Section 4.2.2
+
+ Section 4.2.4 was supplied by G. Guette and O. Courtay.
+
+ Emma Bretherick, Adrian Bedford and Lindy Foster corrected many of
+ the spelling and style issues.
+
+ Kolkman and Gieben take the blame for introducing all miscakes(SIC).
+
+ Kolkman was employed by the RIPE NCC while working on this document.
+
+
+8. References
+
+8.1. Normative References
+
+ [1] Kolkman, O., Schlyter, J., and E. Lewis, "Domain Name System KEY
+ (DNSKEY) Resource Record (RR) Secure Entry Point (SEP) Flag",
+ RFC 3757, May 2004.
+
+ [2] Arends, R., Austein, R., Larson, M., Massey, D., and S. Rose,
+ "DNS Security Introduction and Requirements", RFC 4033,
+
+
+
+Kolkman & Gieben Expires August 25, 2006 [Page 26]
+
+Internet-Draft DNSSEC Operational Practices February 2006
+
+
+ March 2005.
+
+8.2. Informative References
+
+ [3] Bradner, S., "Key words for use in RFCs to Indicate Requirement
+ Levels", BCP 14, RFC 2119, March 1997.
+
+ [4] Eastlake, D., "Secure Domain Name System Dynamic Update",
+ RFC 2137, April 1997.
+
+ [5] Andrews, M., "Negative Caching of DNS Queries (DNS NCACHE)",
+ RFC 2308, March 1998.
+
+ [6] Eastlake, D., "DNS Security Operational Considerations",
+ RFC 2541, March 1999.
+
+ [7] Gudmundsson, O., "Delegation Signer (DS) Resource Record (RR)",
+ RFC 3658, December 2003.
+
+ [8] Orman, H. and P. Hoffman, "Determining Strengths For Public
+ Keys Used For Exchanging Symmetric Keys", BCP 86, RFC 3766,
+ April 2004.
+
+ [9] Eastlake, D., Schiller, J., and S. Crocker, "Randomness
+ Requirements for Security", BCP 106, RFC 4086, June 2005.
+
+ [10] Hollenbeck, S., "Domain Name System (DNS) Security Extensions
+ Mapping for the Extensible Provisioning Protocol (EPP)",
+ draft-hollenbeck-epp-secdns-07 (work in progress), March 2005.
+
+ [11] Lenstra, A. and E. Verheul, "Selecting Cryptographic Key
+ Sizes", The Journal of Cryptology 14 (255-293), 2001.
+
+ [12] Schneier, B., "Applied Cryptography: Protocols, Algorithms, and
+ Source Code in C", 1996.
+
+ [13] Rose, S., "NIST DNSSEC workshop notes", June 2001.
+
+ [14] Jansen, J., "Use of RSA/SHA-256 DNSKEY and RRSIG Resource
+ Records in DNSSEC", draft-ietf-dnsext-dnssec-rsasha256-00.txt
+ (work in progress), January 2006.
+
+ [15] Hardaker, W., "Use of SHA-256 in DNSSEC Delegation Signer (DS)
+ Resource Records (RRs)", draft-ietf-dnsext-ds-sha256-04.txt
+ (work in progress), January 2006.
+
+
+
+
+
+
+Kolkman & Gieben Expires August 25, 2006 [Page 27]
+
+Internet-Draft DNSSEC Operational Practices February 2006
+
+
+Appendix A. Terminology
+
+ In this document there is some jargon used that is defined in other
+ documents. In most cases we have not copied the text from the
+ documents defining the terms but given a more elaborate explanation
+ of the meaning. Note that these explanations should not be seen as
+ authoritative.
+
+ Anchored Key: A DNSKEY configured in resolvers around the globe.
+ This key is hard to update, hence the term anchored.
+ Bogus: Also see Section 5 of [2]. An RRSet in DNSSEC is marked
+ "Bogus" when a signature of a RRSet does not validate against a
+ DNSKEY.
+ Key Signing Key or KSK: A Key Signing Key (KSK) is a key that is used
+ exclusively for signing the apex key set. The fact that a key is
+ a KSK is only relevant to the signing tool.
+ Key size: The term 'key size' can be substituted by 'modulus size'
+ throughout the document. It is mathematical more correct to use
+ modulus size, but as this is a document directed at operators we
+ feel more at ease with the term key size.
+ Private and Public Keys: DNSSEC secures the DNS through the use of
+ public key cryptography. Public key cryptography is based on the
+ existence of two (mathematical related) keys, a public key and a
+ private key. The public keys are published in the DNS by use of
+ the DNSKEY Resource Record (DNSKEY RR). Private keys should
+ remain private.
+ Key Rollover: A key rollover (also called key supercession in some
+ environments) is the act of replacing one key pair by another at
+ the end of a key effectivity period.
+ Secure Entry Point key or SEP Key: A KSK that has a parental DS
+ record pointing to it or is configured as a trust anchor.
+ Although not required by the protocol we recommend that the SEP
+ flag [1] is set on these keys.
+ Self-signature: This is only applies to signatures over DNSKEYs; a
+ signature made with DNSKEY x, over DNSKEY x is called a self-
+ signature. Note: without further information self-signatures
+ convey no trust, they are usefull to check the authenticity of the
+ DNSKEY, i.e. they can be used as a hash.
+ Singing the Zone File: The term used for the event where an
+ administrator joyfully signs its zone file while producing melodic
+ sound patterns.
+ Signer: The system that has access to the private key material and
+ signs the Resource Record sets in a zone. A signer may be
+ configured to sign only parts of the zone e.g. only those RRSets
+ for which existing signatures are about to expire.
+
+
+
+
+
+
+Kolkman & Gieben Expires August 25, 2006 [Page 28]
+
+Internet-Draft DNSSEC Operational Practices February 2006
+
+
+ Zone Signing Key or ZSK: A Zone Signing Key (ZSK) is a key that is
+ used for signing all data in a zone. The fact that a key is a ZSK
+ is only relevant to the signing tool.
+ Zone Administrator: The 'role' that is responsible for signing a zone
+ and publishing it on the primary authoritative server.
+
+
+Appendix B. Zone signing Key Rollover Howto
+
+ Using the pre-published signature scheme and the most conservative
+ method to assure oneself that data does not live in caches, here
+ follows the "HOWTO".
+ Step 0: The preparation: Create two keys and publish both in your key
+ set. Mark one of the keys as "active" and the other as
+ "published". Use the "active" key for signing your zone data.
+ Store the private part of the "published" key, preferably off-
+ line.
+ The protocol does not provide for attributes to mark a key as
+ active or published. This is something you have to do on your
+ own, through the use of a notebook or key management tool.
+ Step 1: Determine expiration: At the beginning of the rollover make a
+ note of the highest expiration time of signatures in your zone
+ file created with the current key marked as "active".
+ Wait until the expiration time marked in Step 1 has passed
+ Step 2: Then start using the key that was marked as "published" to
+ sign your data i.e. mark it as "active". Stop using the key that
+ was marked as "active", mark it as "rolled".
+ Step 3: It is safe to engage in a new rollover (Step 1) after at
+ least one "signature validity period".
+
+
+Appendix C. Typographic Conventions
+
+ The following typographic conventions are used in this document:
+ Key notation: A key is denoted by DNSKEYx, where x is a number or an
+ identifier, x could be thought of as the key id.
+ RRSet notations: RRs are only denoted by the type. All other
+ information - owner, class, rdata and TTL - is left out. Thus:
+ "example.com 3600 IN A 192.0.2.1" is reduced to "A". RRSets are a
+ list of RRs. A example of this would be: "A1, A2", specifying the
+ RRSet containing two "A" records. This could again be abbreviated
+ to just "A".
+ Signature notation: Signatures are denoted as RRSIGx(RRSet), which
+ means that RRSet is signed with DNSKEYx.
+
+
+
+
+
+
+
+Kolkman & Gieben Expires August 25, 2006 [Page 29]
+
+Internet-Draft DNSSEC Operational Practices February 2006
+
+
+ Zone representation: Using the above notation we have simplified the
+ representation of a signed zone by leaving out all unnecessary
+ details such as the names and by representing all data by "SOAx"
+ SOA representation: SOAs are represented as SOAx, where x is the
+ serial number.
+ Using this notation the following signed zone:
+
+
+ example.net. 86400 IN SOA ns.example.net. bert.example.net. (
+ 2006022100 ; serial
+ 86400 ; refresh ( 24 hours)
+ 7200 ; retry ( 2 hours)
+ 3600000 ; expire (1000 hours)
+ 28800 ) ; minimum ( 8 hours)
+ 86400 RRSIG SOA 5 2 86400 20130522213204 (
+ 20130422213204 14 example.net.
+ cmL62SI6iAX46xGNQAdQ... )
+ 86400 NS a.iana-servers.net.
+ 86400 NS b.iana-servers.net.
+ 86400 RRSIG NS 5 2 86400 20130507213204 (
+ 20130407213204 14 example.net.
+ SO5epiJei19AjXoUpFnQ ... )
+ 86400 DNSKEY 256 3 5 (
+ EtRB9MP5/AvOuVO0I8XDxy0... )
+ ; key id = 14
+ 86400 DNSKEY 257 3 5 (
+ gsPW/Yy19GzYIY+Gnr8HABU... )
+ ; key id = 15
+ 86400 RRSIG DNSKEY 5 2 86400 20130522213204 (
+ 20130422213204 14 example.net.
+ J4zCe8QX4tXVGjV4e1r9... )
+ 86400 RRSIG DNSKEY 5 2 86400 20130522213204 (
+ 20130422213204 15 example.net.
+ keVDCOpsSeDReyV6O... )
+ 86400 RRSIG NSEC 5 2 86400 20130507213204 (
+ 20130407213204 14 example.net.
+ obj3HEp1GjnmhRjX... )
+ a.example.net. 86400 IN TXT "A label"
+ 86400 RRSIG TXT 5 3 86400 20130507213204 (
+ 20130407213204 14 example.net.
+ IkDMlRdYLmXH7QJnuF3v... )
+ 86400 NSEC b.example.com. TXT RRSIG NSEC
+ 86400 RRSIG NSEC 5 3 86400 20130507213204 (
+ 20130407213204 14 example.net.
+ bZMjoZ3bHjnEz0nIsPMM... )
+ ...
+
+ is reduced to the following representation:
+
+
+
+Kolkman & Gieben Expires August 25, 2006 [Page 30]
+
+Internet-Draft DNSSEC Operational Practices February 2006
+
+
+ SOA2006022100
+ RRSIG14(SOA2006022100)
+
+ DNSKEY14
+ DNSKEY15
+
+ RRSIG14(KEY)
+ RRSIG15(KEY)
+
+ The rest of the zone data has the same signature as the SOA record,
+ i.e a RRSIG created with DNSKEY 14.
+
+
+Appendix D. Document Details and Changes
+
+ This section is to be removed by the RFC editor if and when the
+ document is published.
+
+ $Id: draft-ietf-dnsop-dnssec-operational-practices.xml,v 1.31.2.14
+ 2005/03/21 15:51:41 dnssec Exp $
+
+D.1. draft-ietf-dnsop-dnssec-operational-practices-00
+
+ Submission as working group document. This document is a modified
+ and updated version of draft-kolkman-dnssec-operational-practices-00.
+
+D.2. draft-ietf-dnsop-dnssec-operational-practices-01
+
+ changed the definition of "Bogus" to reflect the one in the protocol
+ draft.
+
+ Bad to Bogus
+
+ Style and spelling corrections
+
+ KSK - SEP mapping made explicit.
+
+ Updates from Sam Weiler added
+
+D.3. draft-ietf-dnsop-dnssec-operational-practices-02
+
+ Style and errors corrected.
+
+ Added Automatic rollover requirements from I-D.ietf-dnsop-key-
+ rollover-requirements.
+
+
+
+
+
+
+Kolkman & Gieben Expires August 25, 2006 [Page 31]
+
+Internet-Draft DNSSEC Operational Practices February 2006
+
+
+D.4. draft-ietf-dnsop-dnssec-operational-practices-03
+
+ Added the definition of Key effectivity period and used that term
+ instead of Key validity period.
+
+ Modified the order of the sections, based on a suggestion by Rip
+ Loomis.
+
+ Included parts from RFC2541 [6]. Most of its ground was already
+ covered. This document obsoletes RFC2541 [6]. Section 3.1.2
+ deserves some review as it in contrast to RFC2541 does _not_ give
+ recomendations about root-zone keys.
+
+ added a paragraph to Section 4.4.4
+
+D.5. draft-ietf-dnsop-dnssec-operational-practices-04
+
+ Somewhat more details added about the pre-publish KSK rollover. Also
+ moved that subsection down a bit.
+
+ Editorial and content nits that came in during wg last call were
+ fixed.
+
+D.6. draft-ietf-dnsop-dnssec-operational-practices-05
+
+ Applied some another set of comments that came in _after_ the the
+ WGLC.
+
+ Applied comments from Hilarie Orman and made a referece to RFC 3766.
+ Deleted of a lot of key length discussion and took over the
+ recommendations from RFC 3766.
+
+ Reworked all the heading of the rollover figures
+
+D.7. draft-ietf-dnsop-dnssec-operational-practices-06
+
+ One comment from Scott Rose applied.
+
+ Marcos Sanz gave a lots of editorial nits. Almost all are
+ incorporated.
+
+D.8. draft-ietf-dnsop-dnssec-operational-practices-07
+
+ Peter Koch's comments applied.
+
+ SHA-1/SHA-256 remarks added
+
+
+
+
+
+Kolkman & Gieben Expires August 25, 2006 [Page 32]
+
+Internet-Draft DNSSEC Operational Practices February 2006
+
+
+Authors' Addresses
+
+ Olaf M. Kolkman
+ NLnet Labs
+ Kruislaan 419
+ Amsterdam 1098 VA
+ The Netherlands
+
+ Email: olaf@nlnetlabs.nl
+ URI: http://www.nlnetlabs.nl
+
+
+ Miek Gieben
+ NLnet Labs
+ Kruislaan 419
+ Amsterdam 1098 VA
+ The Netherlands
+
+ Email: miek@nlnetlabs.nl
+ URI: http://www.nlnetlabs.nl
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Kolkman & Gieben Expires August 25, 2006 [Page 33]
+
+Internet-Draft DNSSEC Operational Practices February 2006
+
+
+Intellectual Property Statement
+
+ The IETF takes no position regarding the validity or scope of any
+ Intellectual Property Rights or other rights that might be claimed to
+ pertain to the implementation or use of the technology described in
+ this document or the extent to which any license under such rights
+ might or might not be available; nor does it represent that it has
+ made any independent effort to identify any such rights. Information
+ on the procedures with respect to rights in RFC documents can be
+ found in BCP 78 and BCP 79.
+
+ Copies of IPR disclosures made to the IETF Secretariat and any
+ assurances of licenses to be made available, or the result of an
+ attempt made to obtain a general license or permission for the use of
+ such proprietary rights by implementers or users of this
+ specification can be obtained from the IETF on-line IPR repository at
+ http://www.ietf.org/ipr.
+
+ The IETF invites any interested party to bring to its attention any
+ copyrights, patents or patent applications, or other proprietary
+ rights that may cover technology that may be required to implement
+ this standard. Please address the information to the IETF at
+ ietf-ipr@ietf.org.
+
+
+Disclaimer of Validity
+
+ This document and the information contained herein are provided on an
+ "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
+ OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
+ ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
+ INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
+ INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
+ WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+
+
+Copyright Statement
+
+ Copyright (C) The Internet Society (2006). This document is subject
+ to the rights, licenses and restrictions contained in BCP 78, and
+ except as set forth therein, the authors retain all their rights.
+
+
+Acknowledgment
+
+ Funding for the RFC Editor function is currently provided by the
+ Internet Society.
+
+
+
+
+Kolkman & Gieben Expires August 25, 2006 [Page 34]
+
From 68ef9fdc82edfbeec5ab00c819f5c707e90e8b43 Mon Sep 17 00:00:00 2001
From: Mark Andrews
Date: Thu, 23 Feb 2006 23:17:06 +0000
Subject: [PATCH 040/465] auto update
---
doc/private/branches | 1 +
1 file changed, 1 insertion(+)
diff --git a/doc/private/branches b/doc/private/branches
index 60b7de26de..6f1038520f 100644
--- a/doc/private/branches
+++ b/doc/private/branches
@@ -68,6 +68,7 @@ rt15844 new
rt15849 new
rt15855 new
rt15860 new
+rt15878 new
rt1727 open // ixfr-from-differences workfile
rt6496a review marka
rt6496b new
From 26f2eecc4833c6f2965b011423040eef44386ec1 Mon Sep 17 00:00:00 2001
From: Mark Andrews
Date: Thu, 23 Feb 2006 23:30:03 +0000
Subject: [PATCH 041/465] newcopyrights
---
util/copyrights | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/util/copyrights b/util/copyrights
index 960957832d..10dd171f45 100644
--- a/util/copyrights
+++ b/util/copyrights
@@ -2,8 +2,8 @@
./CHANGES X 2000,2001,2005,2006
./COPYRIGHT TXT 1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006
./EXCLUDED X 2001,2002,2003
-./FAQ X 2000,2001,2002,2003,2004,2005
-./FAQ.xml SGML 2000,2001,2002,2003,2004,2005
+./FAQ X 2000,2001,2002,2003,2004,2005,2006
+./FAQ.xml SGML 2000,2001,2002,2003,2004,2005,2006
./Makefile.in MAKE 1998,1999,2000,2001,2003,2004
./README X 1999,2000,2001,2005,2006
./acconfig.h C 1999,2000,2001,2003,2004
From eae67738cba5ca069e9d1d4e7b836a2f7b00a374 Mon Sep 17 00:00:00 2001
From: Mark Andrews
Date: Thu, 23 Feb 2006 23:30:22 +0000
Subject: [PATCH 042/465] newcopyrights
---
util/copyrights | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/util/copyrights b/util/copyrights
index cfb56ea214..daa9fd5ada 100644
--- a/util/copyrights
+++ b/util/copyrights
@@ -1,8 +1,8 @@
./.cvsignore X 1999,2000,2001
./CHANGES X 2000,2001,2005,2006
./COPYRIGHT TXT 1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006
-./FAQ X 2000,2001,2002,2003,2004,2005
-./FAQ.xml SGML 2000,2001,2002,2003,2004,2005
+./FAQ X 2000,2001,2002,2003,2004,2005,2006
+./FAQ.xml SGML 2000,2001,2002,2003,2004,2005,2006
./Makefile.in MAKE 1998,1999,2000,2001,2002,2004,2005
./README X 1999,2000,2001,2005,2006
./README.idnkit X 2005
From 472ce617b7c19ae38dfaa2fc9e8699e3bf9be4a8 Mon Sep 17 00:00:00 2001
From: Mark Andrews
Date: Fri, 24 Feb 2006 00:03:15 +0000
Subject: [PATCH 043/465] 1988. [bug] Remove a bus error from the
SHA256/SHA512 support. [RT #15878]
---
CHANGES | 3 +++
lib/isc/include/isc/sha2.h | 8 +++++++-
lib/isc/sha2.c | 20 +++++++++++++-------
3 files changed, 23 insertions(+), 8 deletions(-)
diff --git a/CHANGES b/CHANGES
index bc5e58647d..50b5c5e5ee 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+1988. [bug] Remove a bus error from the SHA256/SHA512 support.
+ [RT #15878]
+
1987. [func] DS/DLV SHA256 digest algorithm support. [RT #15608]
1986. [func] Report when a zone is removed. [RT #15849]
diff --git a/lib/isc/include/isc/sha2.h b/lib/isc/include/isc/sha2.h
index d84d7a060d..511d75ce01 100644
--- a/lib/isc/include/isc/sha2.h
+++ b/lib/isc/include/isc/sha2.h
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: sha2.h,v 1.5 2006/01/31 23:01:23 marka Exp $ */
+/* $Id: sha2.h,v 1.6 2006/02/24 00:03:15 marka Exp $ */
/* $FreeBSD: src/sys/crypto/sha2/sha2.h,v 1.1.2.1 2001/07/03 11:01:36 ume Exp $ */
/* $KAME: sha2.h,v 1.3 2001/03/12 08:27:48 itojun Exp $ */
@@ -79,12 +79,18 @@ ISC_LANG_BEGINDECLS
/*** SHA-256/384/512 Context Structures *******************************/
+/*
+ * Keep buffer immediately after bitcount to preserve alignment.
+ */
typedef struct {
isc_uint32_t state[8];
isc_uint64_t bitcount;
isc_uint8_t buffer[ISC_SHA256_BLOCK_LENGTH];
} isc_sha256_t;
+/*
+ * Keep buffer immediately after bitcount to preserve alignment.
+ */
typedef struct {
isc_uint64_t state[8];
isc_uint64_t bitcount[2];
diff --git a/lib/isc/sha2.c b/lib/isc/sha2.c
index b0046836ca..c05844f4ac 100644
--- a/lib/isc/sha2.c
+++ b/lib/isc/sha2.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: sha2.c,v 1.7 2006/01/31 23:01:23 marka Exp $ */
+/* $Id: sha2.c,v 1.8 2006/02/24 00:03:15 marka Exp $ */
/* $FreeBSD: src/sys/crypto/sha2/sha2.c,v 1.2.2.2 2002/03/05 08:36:47 ume Exp $ */
/* $KAME: sha2.c,v 1.8 2001/11/08 01:07:52 itojun Exp $ */
@@ -592,7 +592,8 @@ isc_sha256_update(isc_sha256_t *context, const isc_uint8_t *data, size_t len) {
context->bitcount += freespace << 3;
len -= freespace;
data += freespace;
- isc_sha256_transform(context, (isc_uint32_t*)context->buffer);
+ isc_sha256_transform(context,
+ (isc_uint32_t*)context->buffer);
} else {
/* The buffer is not yet full */
memcpy(&context->buffer[usedspace], data, len);
@@ -604,7 +605,8 @@ isc_sha256_update(isc_sha256_t *context, const isc_uint8_t *data, size_t len) {
}
while (len >= ISC_SHA256_BLOCK_LENGTH) {
/* Process as many complete blocks as we can */
- isc_sha256_transform(context, (const isc_uint32_t*)data);
+ memcpy(context->buffer, data, ISC_SHA256_BLOCK_LENGTH);
+ isc_sha256_transform(context, (isc_uint32_t*)context->buffer);
context->bitcount += ISC_SHA256_BLOCK_LENGTH << 3;
len -= ISC_SHA256_BLOCK_LENGTH;
data += ISC_SHA256_BLOCK_LENGTH;
@@ -648,7 +650,8 @@ isc_sha256_final(isc_uint8_t digest[], isc_sha256_t *context) {
usedspace);
}
/* Do second-to-last transform: */
- isc_sha256_transform(context, (isc_uint32_t*)context->buffer);
+ isc_sha256_transform(context,
+ (isc_uint32_t*)context->buffer);
/* And set-up for the last transform: */
memset(context->buffer, 0,
@@ -926,7 +929,8 @@ void isc_sha512_update(isc_sha512_t *context, const isc_uint8_t *data, size_t le
ADDINC128(context->bitcount, freespace << 3);
len -= freespace;
data += freespace;
- isc_sha512_transform(context, (isc_uint64_t*)context->buffer);
+ isc_sha512_transform(context,
+ (isc_uint64_t*)context->buffer);
} else {
/* The buffer is not yet full */
memcpy(&context->buffer[usedspace], data, len);
@@ -938,7 +942,8 @@ void isc_sha512_update(isc_sha512_t *context, const isc_uint8_t *data, size_t le
}
while (len >= ISC_SHA512_BLOCK_LENGTH) {
/* Process as many complete blocks as we can */
- isc_sha512_transform(context, (const isc_uint64_t*)data);
+ memcpy(context->buffer, data, ISC_SHA512_BLOCK_LENGTH);
+ isc_sha512_transform(context, (isc_uint64_t*)context->buffer);
ADDINC128(context->bitcount, ISC_SHA512_BLOCK_LENGTH << 3);
len -= ISC_SHA512_BLOCK_LENGTH;
data += ISC_SHA512_BLOCK_LENGTH;
@@ -975,7 +980,8 @@ void isc_sha512_last(isc_sha512_t *context) {
ISC_SHA512_BLOCK_LENGTH - usedspace);
}
/* Do second-to-last transform: */
- isc_sha512_transform(context, (isc_uint64_t*)context->buffer);
+ isc_sha512_transform(context,
+ (isc_uint64_t*)context->buffer);
/* And set-up for the last transform: */
memset(context->buffer, 0, ISC_SHA512_BLOCK_LENGTH - 2);
From 4f54d095945d6f60f146112d37d31815ad73eb02 Mon Sep 17 00:00:00 2001
From: Mark Andrews
Date: Fri, 24 Feb 2006 03:47:22 +0000
Subject: [PATCH 044/465] 1989. [bug] win32: don't check the
service password when re-installing. [RT #15882]
---
CHANGES | 3 +++
bin/win32/BINDInstall/BINDInstallDlg.cpp | 24 +++++++++++++-----------
2 files changed, 16 insertions(+), 11 deletions(-)
diff --git a/CHANGES b/CHANGES
index 50b5c5e5ee..77ed0de85e 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+1989. [bug] win32: don't check the service password when
+ re-installing. [RT #15882]
+
1988. [bug] Remove a bus error from the SHA256/SHA512 support.
[RT #15878]
diff --git a/bin/win32/BINDInstall/BINDInstallDlg.cpp b/bin/win32/BINDInstall/BINDInstallDlg.cpp
index 0b44c2ee15..5bc27d8ba3 100644
--- a/bin/win32/BINDInstall/BINDInstallDlg.cpp
+++ b/bin/win32/BINDInstall/BINDInstallDlg.cpp
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: BINDInstallDlg.cpp,v 1.21 2005/10/11 22:54:45 marka Exp $ */
+/* $Id: BINDInstallDlg.cpp,v 1.22 2006/02/24 03:47:22 marka Exp $ */
/*
* Copyright (c) 1999-2000 by Nortel Networks Corporation
@@ -416,27 +416,29 @@ void CBINDInstallDlg::OnInstall() {
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.
*/
- if(m_accountName != m_currentAccount)
+ if (m_accountName != m_currentAccount)
m_accountUsed = FALSE;
+ if (m_accountUsed == FALSE && m_serviceExists == FALSE)
+ {
+ /*
+ * Check that the Password is not null.
+ */
+ if (m_accountPassword.GetLength() == 0) {
+ MsgBox(IDS_ERR_NULLPASSWORD);
+ return;
+ }
+ }
+
/* Directories */
m_etcDir = m_targetDir + "\\etc";
m_binDir = m_targetDir + "\\bin";
From 113aa279d1f5dbe77dfaa5a7f35623d49c85b77f Mon Sep 17 00:00:00 2001
From: Mark Andrews
Date: Fri, 24 Feb 2006 23:30:26 +0000
Subject: [PATCH 045/465] newcopyrights
---
util/copyrights | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/util/copyrights b/util/copyrights
index daa9fd5ada..e69d78c15e 100644
--- a/util/copyrights
+++ b/util/copyrights
@@ -808,7 +808,7 @@
./bin/win32/BINDInstall/BINDInstall.h C.PORTION 2001,2004
./bin/win32/BINDInstall/BINDInstall.mak X 2001
./bin/win32/BINDInstall/BINDInstall.rc X 2001,2005
-./bin/win32/BINDInstall/BINDInstallDlg.cpp C.PORTION 2001,2003,2004,2005
+./bin/win32/BINDInstall/BINDInstallDlg.cpp C.PORTION 2001,2003,2004,2005,2006
./bin/win32/BINDInstall/BINDInstallDlg.h C.PORTION 2001,2004
./bin/win32/BINDInstall/DirBrowse.cpp C.PORTION 2001,2004
./bin/win32/BINDInstall/DirBrowse.h C.PORTION 2001,2004
From 69f56d4ef26da3898498a0d6ef04d92a28c2ebb2 Mon Sep 17 00:00:00 2001
From: Mark Andrews
Date: Sun, 26 Feb 2006 22:28:22 +0000
Subject: [PATCH 046/465] remove redundant memset
---
lib/isc/hmacmd5.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/lib/isc/hmacmd5.c b/lib/isc/hmacmd5.c
index bf611a01e6..2f21a36dd1 100644
--- a/lib/isc/hmacmd5.c
+++ b/lib/isc/hmacmd5.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: hmacmd5.c,v 1.11 2006/01/27 23:57:46 marka Exp $ */
+/* $Id: hmacmd5.c,v 1.12 2006/02/26 22:28:22 marka Exp $ */
/*! \file
* This code implements the HMAC-MD5 keyed hash algorithm
@@ -65,7 +65,6 @@ void
isc_hmacmd5_invalidate(isc_hmacmd5_t *ctx) {
isc_md5_invalidate(&ctx->md5ctx);
memset(ctx->key, 0, sizeof(ctx->key));
- memset(ctx, 0, sizeof(ctx));
}
/*!
From 6c4435e3eec4421c0e6b3250cf97db65f788b7d9 Mon Sep 17 00:00:00 2001
From: Mark Andrews
Date: Sun, 26 Feb 2006 22:28:38 +0000
Subject: [PATCH 047/465] update copyright notice
---
bin/win32/BINDInstall/BINDInstallDlg.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/bin/win32/BINDInstall/BINDInstallDlg.cpp b/bin/win32/BINDInstall/BINDInstallDlg.cpp
index 5bc27d8ba3..7f20277ce5 100644
--- a/bin/win32/BINDInstall/BINDInstallDlg.cpp
+++ b/bin/win32/BINDInstall/BINDInstallDlg.cpp
@@ -1,5 +1,5 @@
/*
- * Portions Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+ * Portions Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
* Portions Copyright (C) 2001, 2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: BINDInstallDlg.cpp,v 1.22 2006/02/24 03:47:22 marka Exp $ */
+/* $Id: BINDInstallDlg.cpp,v 1.23 2006/02/26 22:28:38 marka Exp $ */
/*
* Copyright (c) 1999-2000 by Nortel Networks Corporation
From e86581466652132f069eae8d1c5427d59e50602d Mon Sep 17 00:00:00 2001
From: Mark Andrews
Date: Sun, 26 Feb 2006 22:34:05 +0000
Subject: [PATCH 048/465] remove redundant memset
---
lib/isc/hmacmd5.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/lib/isc/hmacmd5.c b/lib/isc/hmacmd5.c
index 42dc6435ac..8acd717565 100644
--- a/lib/isc/hmacmd5.c
+++ b/lib/isc/hmacmd5.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: hmacmd5.c,v 1.5.2.1 2004/03/09 06:11:46 marka Exp $ */
+/* $Id: hmacmd5.c,v 1.5.2.2 2006/02/26 22:34:05 marka Exp $ */
/*
* This code implements the HMAC-MD5 keyed hash algorithm
@@ -65,7 +65,6 @@ void
isc_hmacmd5_invalidate(isc_hmacmd5_t *ctx) {
isc_md5_invalidate(&ctx->md5ctx);
memset(ctx->key, 0, sizeof (ctx->key));
- memset(ctx, 0, sizeof (ctx));
}
/*
From 95b484c9580d06eb2f9735a22e9841389c2859ba Mon Sep 17 00:00:00 2001
From: Mark Andrews
Date: Sun, 26 Feb 2006 22:57:18 +0000
Subject: [PATCH 049/465] fix minor typos
---
CHANGES | 8 ++++----
bin/named/server.c | 4 ++--
bin/tests/compress_test.c | 4 ++--
bin/tests/rdata_test.c | 8 ++++----
bin/tests/system/dnssec/tests.sh | 4 ++--
configure | 8 ++++----
configure.in | 4 ++--
doc/arm/Bv9ARM-book.xml | 6 +++---
lib/bind/configure | 2 +-
lib/bind/irs/irp.c | 4 ++--
lib/dns/validator.c | 4 ++--
libtool.m4 | 2 +-
12 files changed, 29 insertions(+), 29 deletions(-)
diff --git a/CHANGES b/CHANGES
index 77ed0de85e..06a25e348e 100644
--- a/CHANGES
+++ b/CHANGES
@@ -141,7 +141,7 @@
when using forwarders. [RT #15549]
1945. [cleanup] dnssec-keygen: RSA (RSAMD5) is nolonger recommended.
- To generate a RSAMD5 key you must explictly request
+ To generate a RSAMD5 key you must explicitly request
RSAMD5. [RT #13780]
1944. [cleanup] isc_hash_create() does not need a read/write lock.
@@ -1714,8 +1714,8 @@
1414. [func] Support for KSK flag.
-1413. [func] Explictly request the (re-)generation of DS records from
- keysets (dnssec-signzone -g).
+1413. [func] Explicitly request the (re-)generation of DS records
+ from keysets (dnssec-signzone -g).
1412. [func] You can now specify servers to be tried if a nameserver
has IPv6 address and you only support IPv4 or the
@@ -5964,7 +5964,7 @@
, , or
.
- 119. [cleanup] structure definitions for generic rdata stuctures do
+ 119. [cleanup] structure definitions for generic rdata structures do
not have _generic_ in their names.
118. [cleanup] libdns.a is now namespace-clean, on NetBSD, excepting
diff --git a/bin/named/server.c b/bin/named/server.c
index 43ab0dcdf9..a78b07951b 100644
--- a/bin/named/server.c
+++ b/bin/named/server.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: server.c,v 1.457 2006/02/21 23:12:27 marka Exp $ */
+/* $Id: server.c,v 1.458 2006/02/26 22:54:46 marka Exp $ */
/*! \file */
@@ -622,7 +622,7 @@ configure_order(dns_order_t *order, cfg_obj_t *ent) {
/*
* "*" should match everything including the root (BIND 8 compat).
* As dns_name_matcheswildcard(".", "*.") returns FALSE add a
- * explict entry for "." when the name is "*".
+ * explicit entry for "." when the name is "*".
*/
if (addroot) {
result = dns_order_add(order, dns_rootname,
diff --git a/bin/tests/compress_test.c b/bin/tests/compress_test.c
index 3f1b4f4f7e..587f66a625 100644
--- a/bin/tests/compress_test.c
+++ b/bin/tests/compress_test.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: compress_test.c,v 1.29 2005/04/29 00:22:38 marka Exp $ */
+/* $Id: compress_test.c,v 1.30 2006/02/26 22:54:46 marka Exp $ */
/*! \file */
@@ -133,7 +133,7 @@ test(unsigned int allowed, dns_name_t *name1, dns_name_t *name2,
case DNS_COMPRESS_NONE: s = "DNS_COMPRESS_NONE"; break;
case DNS_COMPRESS_GLOBAL14: s = "DNS_COMPRESS_GLOBAL14"; break;
/* case DNS_COMPRESS_ALL: s = "DNS_COMPRESS_ALL"; break; */
- default: s = "UNKOWN"; break;
+ default: s = "UNKNOWN"; break;
}
fprintf(stdout, "Allowed = %s\n", s);
}
diff --git a/bin/tests/rdata_test.c b/bin/tests/rdata_test.c
index 37256dadde..e95894e4e0 100644
--- a/bin/tests/rdata_test.c
+++ b/bin/tests/rdata_test.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: rdata_test.c,v 1.44 2005/07/14 06:46:44 marka Exp $ */
+/* $Id: rdata_test.c,v 1.45 2006/02/26 22:54:46 marka Exp $ */
#include
@@ -309,7 +309,7 @@ viastruct(dns_rdata_t *rdata, isc_mem_t *mctx,
break;
}
if (result != ISC_R_SUCCESS)
- fprintf(stdout, "viastruct: tostuct %d %d return %s\n",
+ fprintf(stdout, "viastruct: tostruct %d %d return %s\n",
rdata->type, rdata->rdclass,
dns_result_totext(result));
else
@@ -571,7 +571,7 @@ viastruct(dns_rdata_t *rdata, isc_mem_t *mctx,
break;
}
if (result != ISC_R_SUCCESS)
- fprintf(stdout, "viastruct: tostuct %d %d return %s\n",
+ fprintf(stdout, "viastruct: tostruct %d %d return %s\n",
rdata->type, rdata->rdclass,
dns_result_totext(result));
else {
@@ -582,7 +582,7 @@ viastruct(dns_rdata_t *rdata, isc_mem_t *mctx,
result = dns_rdata_fromstruct(rdata2, rdc, rdt, sp, b);
if (result != ISC_R_SUCCESS)
fprintf(stdout,
- "viastruct: fromstuct %d %d return %s\n",
+ "viastruct: fromstruct %d %d return %s\n",
rdata->type, rdata->rdclass,
dns_result_totext(result));
else if (rdata->length != rdata2->length ||
diff --git a/bin/tests/system/dnssec/tests.sh b/bin/tests/system/dnssec/tests.sh
index db78ff8c42..0a708e3fc5 100644
--- a/bin/tests/system/dnssec/tests.sh
+++ b/bin/tests/system/dnssec/tests.sh
@@ -15,7 +15,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
-# $Id: tests.sh,v 1.47 2005/09/06 03:51:34 marka Exp $
+# $Id: tests.sh,v 1.48 2006/02/26 22:54:46 marka Exp $
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
@@ -428,7 +428,7 @@ n=`expr $n + 1`
if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
-echo "I:checking privately secure wilcard to nxdomain works ($n)"
+echo "I:checking privately secure wildcard to nxdomain works ($n)"
ret=0
$DIG $DIGOPTS +noauth a.wild.private.secure.example. SOA @10.53.0.2 \
> dig.out.ns2.test$n || ret=1
diff --git a/configure b/configure
index 4a12f43c4b..ea0f9938df 100755
--- a/configure
+++ b/configure
@@ -14,7 +14,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
#
-# $Id: configure,v 1.389 2006/02/02 23:07:53 marka Exp $
+# $Id: configure,v 1.390 2006/02/26 22:57:17 marka Exp $
#
# Portions Copyright (C) 1996-2001 Nominum, Inc.
#
@@ -29,7 +29,7 @@
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-# From configure.in Revision: 1.401 .
+# From configure.in Revision: 1.402 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.59.
#
@@ -12919,7 +12919,7 @@ echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
fi
-# Report which librarie types wil actually be built
+# Report which libraries types will actually be built
echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
echo "$as_me:$LINENO: result: $can_build_shared" >&5
@@ -27279,7 +27279,7 @@ fi
esac
#
-# Some hosts need msg_namelen to match the size of the socket stucture.
+# Some hosts need msg_namelen to match the size of the socket structure.
# Some hosts don't set msg_namelen appropriately on return from recvmsg().
#
case $host in
diff --git a/configure.in b/configure.in
index 1920ccadbf..fdc2d316fc 100644
--- a/configure.in
+++ b/configure.in
@@ -18,7 +18,7 @@ AC_DIVERT_PUSH(1)dnl
esyscmd([sed "s/^/# /" COPYRIGHT])dnl
AC_DIVERT_POP()dnl
-AC_REVISION($Revision: 1.401 $)
+AC_REVISION($Revision: 1.402 $)
AC_INIT(lib/dns/name.c)
AC_PREREQ(2.59)
@@ -1781,7 +1781,7 @@ case "$host" in
esac
#
-# Some hosts need msg_namelen to match the size of the socket stucture.
+# Some hosts need msg_namelen to match the size of the socket structure.
# Some hosts don't set msg_namelen appropriately on return from recvmsg().
#
case $host in
diff --git a/doc/arm/Bv9ARM-book.xml b/doc/arm/Bv9ARM-book.xml
index a2310f16ac..8f44de9b72 100644
--- a/doc/arm/Bv9ARM-book.xml
+++ b/doc/arm/Bv9ARM-book.xml
@@ -18,7 +18,7 @@
- PERFORMANCE OF THIS SOFTWARE.
-->
-
+
BIND 9 Administrator Reference Manual
@@ -7269,10 +7269,10 @@ query-source-v6 address * port *;
If you are using the address ranges covered here you should
already have reverse zones covering the addresses you use.
In practice this appears to not be the case with many queries
- being made to the infrustucture servers for names in these
+ being made to the infrustructure servers for names in these
spaces. So many in fact that sacrificial servers were needed
to be deployed to channel the query load away from the
- infrustucture servers.
+ infrustructure servers.
The real parent servers for these zones should disable all
diff --git a/lib/bind/configure b/lib/bind/configure
index a9d0ab78d8..65bca20b04 100644
--- a/lib/bind/configure
+++ b/lib/bind/configure
@@ -12350,7 +12350,7 @@ echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
fi
-# Report which librarie types wil actually be built
+# Report which libraries types will actually be built
echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
echo "$as_me:$LINENO: result: $can_build_shared" >&5
diff --git a/lib/bind/irs/irp.c b/lib/bind/irs/irp.c
index 15eb261b05..e4915aebd3 100644
--- a/lib/bind/irs/irp.c
+++ b/lib/bind/irs/irp.c
@@ -16,7 +16,7 @@
*/
#if !defined(LINT) && !defined(CODECENTER)
-static const char rcsid[] = "$Id: irp.c,v 1.7 2005/04/27 04:56:27 sra Exp $";
+static const char rcsid[] = "$Id: irp.c,v 1.8 2006/02/26 22:54:47 marka Exp $";
#endif
/* Imports */
@@ -504,7 +504,7 @@ irs_irp_get_full_response(struct irp_p *pvt, int *code, char *text,
* int irs_irp_send_command(struct irp_p *pvt, const char *fmt, ...);
*
* Sends command to remote connected via the PVT
- * struture. FMT and args after it are fprintf-like
+ * structure. FMT and args after it are fprintf-like
* arguments for formatting.
*
* Returns:
diff --git a/lib/dns/validator.c b/lib/dns/validator.c
index f2ae4cfe6a..d21abb5376 100644
--- a/lib/dns/validator.c
+++ b/lib/dns/validator.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: validator.c,v 1.142 2006/02/22 01:55:10 marka Exp $ */
+/* $Id: validator.c,v 1.143 2006/02/26 22:54:47 marka Exp $ */
/*! \file */
@@ -734,7 +734,7 @@ nsecnoexistnodata(dns_validator_t *val, dns_name_t* name, dns_name_t *nsecname,
wild, NULL);
if (result != ISC_R_SUCCESS) {
validator_log(val, ISC_LOG_DEBUG(3),
- "failure generating wilcard name");
+ "failure generating wildcard name");
return (result);
}
}
diff --git a/libtool.m4 b/libtool.m4
index c3b71e8932..551ffd0d83 100644
--- a/libtool.m4
+++ b/libtool.m4
@@ -2557,7 +2557,7 @@ AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
AC_LIBTOOL_SYS_LIB_STRIP
AC_LIBTOOL_DLOPEN_SELF($1)
-# Report which librarie types wil actually be built
+# Report which libraries types will actually be built
AC_MSG_CHECKING([if libtool supports shared libraries])
AC_MSG_RESULT([$can_build_shared])
From 36775ac557a76e1eefaba12feef35817d8ceca26 Mon Sep 17 00:00:00 2001
From: Mark Andrews
Date: Sun, 26 Feb 2006 23:08:41 +0000
Subject: [PATCH 050/465] fix minor typos
---
CHANGES | 2 +-
bin/tests/compress_test.c | 4 ++--
bin/tests/rdata_test.c | 8 ++++----
configure | 6 +++---
configure.in | 4 ++--
lib/bind/irs/irp.c | 4 ++--
libtool.m4 | 2 +-
7 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/CHANGES b/CHANGES
index 1859eab79d..739ab81066 100644
--- a/CHANGES
+++ b/CHANGES
@@ -4717,7 +4717,7 @@
, , or
.
- 119. [cleanup] structure definitions for generic rdata stuctures do
+ 119. [cleanup] structure definitions for generic rdata structures do
not have _generic_ in their names.
118. [cleanup] libdns.a is now namespace-clean, on NetBSD, excepting
diff --git a/bin/tests/compress_test.c b/bin/tests/compress_test.c
index 6f1f1994c9..2b7f39863a 100644
--- a/bin/tests/compress_test.c
+++ b/bin/tests/compress_test.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: compress_test.c,v 1.24.2.1 2004/03/09 06:09:30 marka Exp $ */
+/* $Id: compress_test.c,v 1.24.2.2 2006/02/26 23:07:35 marka Exp $ */
#include
@@ -131,7 +131,7 @@ test(unsigned int allowed, dns_name_t *name1, dns_name_t *name2,
case DNS_COMPRESS_NONE: s = "DNS_COMPRESS_NONE"; break;
case DNS_COMPRESS_GLOBAL14: s = "DNS_COMPRESS_GLOBAL14"; break;
/* case DNS_COMPRESS_ALL: s = "DNS_COMPRESS_ALL"; break; */
- default: s = "UNKOWN"; break;
+ default: s = "UNKNOWN"; break;
}
fprintf(stdout, "Allowed = %s\n", s);
}
diff --git a/bin/tests/rdata_test.c b/bin/tests/rdata_test.c
index 13229de560..c529bfd731 100644
--- a/bin/tests/rdata_test.c
+++ b/bin/tests/rdata_test.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: rdata_test.c,v 1.35.2.3 2005/03/17 03:59:31 marka Exp $ */
+/* $Id: rdata_test.c,v 1.35.2.4 2006/02/26 23:07:35 marka Exp $ */
#include
@@ -276,7 +276,7 @@ viastruct(dns_rdata_t *rdata, isc_mem_t *mctx,
break;
}
if (result != ISC_R_SUCCESS)
- fprintf(stdout, "viastruct: tostuct %d %d return %s\n",
+ fprintf(stdout, "viastruct: tostruct %d %d return %s\n",
rdata->type, rdata->rdclass,
dns_result_totext(result));
else
@@ -505,7 +505,7 @@ viastruct(dns_rdata_t *rdata, isc_mem_t *mctx,
break;
}
if (result != ISC_R_SUCCESS)
- fprintf(stdout, "viastruct: tostuct %d %d return %s\n",
+ fprintf(stdout, "viastruct: tostruct %d %d return %s\n",
rdata->type, rdata->rdclass,
dns_result_totext(result));
else {
@@ -516,7 +516,7 @@ viastruct(dns_rdata_t *rdata, isc_mem_t *mctx,
result = dns_rdata_fromstruct(rdata2, rdc, rdt, sp, b);
if (result != ISC_R_SUCCESS)
fprintf(stdout,
- "viastruct: fromstuct %d %d return %s\n",
+ "viastruct: fromstruct %d %d return %s\n",
rdata->type, rdata->rdclass,
dns_result_totext(result));
else if (rdata->length != rdata2->length ||
diff --git a/configure b/configure
index d58e402d54..6253d4007e 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.in Revision: 1.294.2.58 .
+# From configure.in Revision: 1.294.2.59 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.59.
#
@@ -12721,7 +12721,7 @@ echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
fi
-# Report which librarie types wil actually be built
+# Report which libraries types will actually be built
echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
echo "$as_me:$LINENO: result: $can_build_shared" >&5
@@ -25813,7 +25813,7 @@ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
#
-# Some hosts need msg_namelen to match the size of the socket stucture.
+# Some hosts need msg_namelen to match the size of the socket structure.
# Some hosts don't set msg_namelen appropriately on return from recvmsg().
#
case $host in
diff --git a/configure.in b/configure.in
index 0fd87385cb..64c4aac29a 100644
--- a/configure.in
+++ b/configure.in
@@ -13,7 +13,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
-AC_REVISION($Revision: 1.294.2.58 $)
+AC_REVISION($Revision: 1.294.2.59 $)
AC_INIT(lib/dns/name.c)
AC_PREREQ(2.13)
@@ -1554,7 +1554,7 @@ AC_MSG_RESULT(cannot determine type of rlim_cur when cross compiling - assuming
AC_SUBST(ISC_PLATFORM_RLIMITTYPE)
#
-# Some hosts need msg_namelen to match the size of the socket stucture.
+# Some hosts need msg_namelen to match the size of the socket structure.
# Some hosts don't set msg_namelen appropriately on return from recvmsg().
#
case $host in
diff --git a/lib/bind/irs/irp.c b/lib/bind/irs/irp.c
index 9c73310684..433264ba0b 100644
--- a/lib/bind/irs/irp.c
+++ b/lib/bind/irs/irp.c
@@ -16,7 +16,7 @@
*/
#if !defined(LINT) && !defined(CODECENTER)
-static const char rcsid[] = "$Id: irp.c,v 1.3.2.3 2004/03/17 01:54:21 marka Exp $";
+static const char rcsid[] = "$Id: irp.c,v 1.3.2.4 2006/02/26 23:07:35 marka Exp $";
#endif
/* Imports */
@@ -517,7 +517,7 @@ irs_irp_get_full_response(struct irp_p *pvt, int *code, char *text,
* int irs_irp_send_command(struct irp_p *pvt, const char *fmt, ...);
*
* Sends command to remote connected via the PVT
- * struture. FMT and args after it are fprintf-like
+ * structure. FMT and args after it are fprintf-like
* arguments for formatting.
*
* Returns:
diff --git a/libtool.m4 b/libtool.m4
index c3b71e8932..551ffd0d83 100644
--- a/libtool.m4
+++ b/libtool.m4
@@ -2557,7 +2557,7 @@ AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
AC_LIBTOOL_SYS_LIB_STRIP
AC_LIBTOOL_DLOPEN_SELF($1)
-# Report which librarie types wil actually be built
+# Report which libraries types will actually be built
AC_MSG_CHECKING([if libtool supports shared libraries])
AC_MSG_RESULT([$can_build_shared])
From 615ad124f8f81c76b19f03651f231809c74b313f Mon Sep 17 00:00:00 2001
From: Mark Andrews
Date: Sun, 26 Feb 2006 23:30:03 +0000
Subject: [PATCH 051/465] newcopyrights
---
util/copyrights | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/util/copyrights b/util/copyrights
index 10dd171f45..b9010aab97 100644
--- a/util/copyrights
+++ b/util/copyrights
@@ -208,7 +208,7 @@
./bin/tests/byaddr_test.c C 2000,2001,2004
./bin/tests/byname_test.c C 2000,2001,2004,2005
./bin/tests/cfg_test.c C 2001,2004
-./bin/tests/compress_test.c C 1999,2000,2001,2004
+./bin/tests/compress_test.c C 1999,2000,2001,2004,2006
./bin/tests/db/.cvsignore X 1999,2000,2001
./bin/tests/db/Makefile.in MAKE 1999,2000,2001,2004
./bin/tests/db/dns_db_class_1.data X 1999,2000,2001
@@ -410,7 +410,7 @@
./bin/tests/rbt_test.c C 1999,2000,2001,2004,2005
./bin/tests/rbt_test.out X 1999,2000,2001
./bin/tests/rbt_test.txt SH 1999,2000,2001,2003,2004
-./bin/tests/rdata_test.c C 1998,1999,2000,2001,2004,2005
+./bin/tests/rdata_test.c C 1998,1999,2000,2001,2004,2005,2006
./bin/tests/resolv.conf.sample CONF-SH 2000,2001,2004
./bin/tests/rwlock_test.c C 1998,1999,2000,2001,2004,2005
./bin/tests/serial_test.c C 1999,2000,2001,2004
@@ -1261,7 +1261,7 @@
./lib/bind/irs/getservent_r.c X 2001
./lib/bind/irs/hesiod.c X 2001,2005
./lib/bind/irs/hesiod_p.h X 2001
-./lib/bind/irs/irp.c X 2001
+./lib/bind/irs/irp.c X 2001,2006
./lib/bind/irs/irp_gr.c X 2001
./lib/bind/irs/irp_ho.c X 2001
./lib/bind/irs/irp_ng.c X 2001
@@ -1828,7 +1828,7 @@
./lib/isc/hash.c C 2003,2004,2006
./lib/isc/heap.c C 1997,1998,1999,2000,2001,2004
./lib/isc/hex.c C 2000,2001,2002,2004
-./lib/isc/hmacmd5.c C 2000,2001,2004
+./lib/isc/hmacmd5.c C 2000,2001,2004,2006
./lib/isc/include/.cvsignore X 1999,2000,2001
./lib/isc/include/Makefile.in MAKE 1998,1999,2000,2001,2004
./lib/isc/include/isc/.cvsignore X 1999,2000,2001
@@ -2238,7 +2238,7 @@
./lib/win32/bindevt/bindevt.dsw X 2001
./lib/win32/bindevt/bindevt.mak X 2001
./lib/win32/bindevt/bindevt.mc MC 2001,2004
-./libtool.m4 X 2000,2001
+./libtool.m4 X 2000,2001,2006
./ltmain.sh X 1999,2000,2001
./make/.cvsignore X 1999,2000,2001
./make/Makefile.in MAKE 1998,1999,2000,2001,2004
From abf32d940f8f674b3971ef41b306a01b3da8d2cf Mon Sep 17 00:00:00 2001
From: Mark Andrews
Date: Sun, 26 Feb 2006 23:30:20 +0000
Subject: [PATCH 052/465] newcopyrights
---
util/copyrights | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/util/copyrights b/util/copyrights
index e69d78c15e..e091a388a0 100644
--- a/util/copyrights
+++ b/util/copyrights
@@ -194,7 +194,7 @@
./bin/tests/byaddr_test.c C 2000,2001,2002,2004,2005
./bin/tests/byname_test.c C 2000,2001,2004,2005
./bin/tests/cfg_test.c C 2001,2002,2004,2005
-./bin/tests/compress_test.c C 1999,2000,2001,2004,2005
+./bin/tests/compress_test.c C 1999,2000,2001,2004,2005,2006
./bin/tests/db/.cvsignore X 1999,2000,2001
./bin/tests/db/Makefile.in MAKE 1999,2000,2001,2002,2004
./bin/tests/db/dns_db_class_1.data X 1999,2000,2001
@@ -394,7 +394,7 @@
./bin/tests/rbt_test.c C 1999,2000,2001,2004,2005
./bin/tests/rbt_test.out X 1999,2000,2001
./bin/tests/rbt_test.txt SH 1999,2000,2001,2004
-./bin/tests/rdata_test.c C 1998,1999,2000,2001,2002,2003,2004,2005
+./bin/tests/rdata_test.c C 1998,1999,2000,2001,2002,2003,2004,2005,2006
./bin/tests/resolv.conf.sample CONF-SH 2000,2001,2004
./bin/tests/rwlock_test.c C 1998,1999,2000,2001,2004,2005
./bin/tests/serial_test.c C 1999,2000,2001,2003,2004
@@ -505,7 +505,7 @@
./bin/tests/system/dnssec/ns6/named.conf CONF-C 2004
./bin/tests/system/dnssec/prereq.sh SH 2000,2001,2002,2004,2006
./bin/tests/system/dnssec/setup.sh SH 2000,2001,2004
-./bin/tests/system/dnssec/tests.sh SH 2000,2001,2002,2004,2005
+./bin/tests/system/dnssec/tests.sh SH 2000,2001,2002,2004,2005,2006
./bin/tests/system/forward/clean.sh SH 2000,2001,2004
./bin/tests/system/forward/ns1/.cvsignore X 2000,2001
./bin/tests/system/forward/ns1/example.db X 2000,2001
@@ -1258,7 +1258,7 @@
./lib/bind/bsd/utimes.c X 2001,2005
./lib/bind/bsd/writev.c X 2001,2005
./lib/bind/config.h.in X 2001,2005
-./lib/bind/configure X 2001,2005
+./lib/bind/configure X 2001,2005,2006
./lib/bind/configure.in SH 2001,2004,2005
./lib/bind/dst/.cvsignore X 2001
./lib/bind/dst/Makefile.in MAKE 2001,2004
@@ -1349,7 +1349,7 @@
./lib/bind/irs/getservent_r.c X 2001,2005
./lib/bind/irs/hesiod.c X 2001,2005
./lib/bind/irs/hesiod_p.h X 2001,2005
-./lib/bind/irs/irp.c X 2001,2005
+./lib/bind/irs/irp.c X 2001,2005,2006
./lib/bind/irs/irp_gr.c X 2001,2005
./lib/bind/irs/irp_ho.c X 2001,2005
./lib/bind/irs/irp_ng.c X 2001,2005
@@ -2410,7 +2410,7 @@
./lib/win32/bindevt/bindevt.dsw X 2001
./lib/win32/bindevt/bindevt.mak X 2001
./lib/win32/bindevt/bindevt.mc MC 2001,2004
-./libtool.m4 X 2000,2001
+./libtool.m4 X 2000,2001,2006
./ltmain.sh X 1999,2000,2001
./make/.cvsignore X 1999,2000,2001
./make/Makefile.in MAKE 1998,1999,2000,2001,2004
From 022d5f388ccf648aec870b7c872fcdff1e45ee15 Mon Sep 17 00:00:00 2001
From: Mark Andrews
Date: Sun, 26 Feb 2006 23:49:47 +0000
Subject: [PATCH 053/465] update copyright notice
---
bin/tests/compress_test.c | 4 ++--
bin/tests/rdata_test.c | 4 ++--
lib/isc/hmacmd5.c | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/bin/tests/compress_test.c b/bin/tests/compress_test.c
index 2b7f39863a..5448f1d963 100644
--- a/bin/tests/compress_test.c
+++ b/bin/tests/compress_test.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: compress_test.c,v 1.24.2.2 2006/02/26 23:07:35 marka Exp $ */
+/* $Id: compress_test.c,v 1.24.2.3 2006/02/26 23:49:47 marka Exp $ */
#include
diff --git a/bin/tests/rdata_test.c b/bin/tests/rdata_test.c
index c529bfd731..1b877c361e 100644
--- a/bin/tests/rdata_test.c
+++ b/bin/tests/rdata_test.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: rdata_test.c,v 1.35.2.4 2006/02/26 23:07:35 marka Exp $ */
+/* $Id: rdata_test.c,v 1.35.2.5 2006/02/26 23:49:47 marka Exp $ */
#include
diff --git a/lib/isc/hmacmd5.c b/lib/isc/hmacmd5.c
index 8acd717565..e6836f1db8 100644
--- a/lib/isc/hmacmd5.c
+++ b/lib/isc/hmacmd5.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000, 2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: hmacmd5.c,v 1.5.2.2 2006/02/26 22:34:05 marka Exp $ */
+/* $Id: hmacmd5.c,v 1.5.2.3 2006/02/26 23:49:47 marka Exp $ */
/*
* This code implements the HMAC-MD5 keyed hash algorithm
From 8131d4ed6d6231ec8bc2940845d1b5282dc6c1ba Mon Sep 17 00:00:00 2001
From: Mark Andrews
Date: Sun, 26 Feb 2006 23:49:50 +0000
Subject: [PATCH 054/465] update copyright notice
---
bin/tests/compress_test.c | 4 ++--
bin/tests/rdata_test.c | 4 ++--
bin/tests/system/dnssec/tests.sh | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/bin/tests/compress_test.c b/bin/tests/compress_test.c
index 587f66a625..814094b488 100644
--- a/bin/tests/compress_test.c
+++ b/bin/tests/compress_test.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: compress_test.c,v 1.30 2006/02/26 22:54:46 marka Exp $ */
+/* $Id: compress_test.c,v 1.31 2006/02/26 23:49:50 marka Exp $ */
/*! \file */
diff --git a/bin/tests/rdata_test.c b/bin/tests/rdata_test.c
index e95894e4e0..6b338db1ce 100644
--- a/bin/tests/rdata_test.c
+++ b/bin/tests/rdata_test.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: rdata_test.c,v 1.45 2006/02/26 22:54:46 marka Exp $ */
+/* $Id: rdata_test.c,v 1.46 2006/02/26 23:49:50 marka Exp $ */
#include
diff --git a/bin/tests/system/dnssec/tests.sh b/bin/tests/system/dnssec/tests.sh
index 0a708e3fc5..d48524718e 100644
--- a/bin/tests/system/dnssec/tests.sh
+++ b/bin/tests/system/dnssec/tests.sh
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 2000-2002 Internet Software Consortium.
#
# Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
-# $Id: tests.sh,v 1.48 2006/02/26 22:54:46 marka Exp $
+# $Id: tests.sh,v 1.49 2006/02/26 23:49:50 marka Exp $
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
From 20cacd1459af74d1b4a10e274506562b230822e1 Mon Sep 17 00:00:00 2001
From: Mark Andrews
Date: Mon, 27 Feb 2006 02:18:24 +0000
Subject: [PATCH 055/465] regen
---
doc/arm/Bv9ARM.ch06.html | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/doc/arm/Bv9ARM.ch06.html b/doc/arm/Bv9ARM.ch06.html
index 9e396ae0ab..0e95897b36 100644
--- a/doc/arm/Bv9ARM.ch06.html
+++ b/doc/arm/Bv9ARM.ch06.html
@@ -14,7 +14,7 @@
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-->
-
+
@@ -4057,10 +4057,10 @@ query-source-v6 address * port *;
If you are using the address ranges covered here you should
already have reverse zones covering the addresses you use.
In practice this appears to not be the case with many queries
- being made to the infrustucture servers for names in these
+ being made to the infrustructure servers for names in these
spaces. So many in fact that sacrificial servers were needed
to be deployed to channel the query load away from the
- infrustucture servers.
+ infrustructure servers.
Note
From 9af69f2d83d5ff0776f4ce6cb136c755266be903 Mon Sep 17 00:00:00 2001
From: Mark Andrews
Date: Mon, 27 Feb 2006 21:08:42 +0000
Subject: [PATCH 056/465] update entry
---
FAQ | 3 +++
FAQ.xml | 6 +++++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/FAQ b/FAQ
index 4c4b7648f7..5c6a2a7368 100644
--- a/FAQ
+++ b/FAQ
@@ -54,6 +54,9 @@ A: Linux threads each show up as a process under ps. The approximate number of
memory used is not cumulative; if each process is using 10M of memory, only a
total of 10M is used.
+ Newer versions of Linux's ps command hide the individual threads and require -L
+ to display them.
+
Q: Why does BIND 9 log "permission denied" errors accessing its configuration
files or zones on my Linux system even though it is running as root?
diff --git a/FAQ.xml b/FAQ.xml
index 0826ead71e..221ef87707 100644
--- a/FAQ.xml
+++ b/FAQ.xml
@@ -17,7 +17,7 @@
- PERFORMANCE OF THIS SOFTWARE.
-->
-
+
Frequently Asked Questions about BIND 9
@@ -125,6 +125,10 @@ example.com. 86400 IN SOA ns hostmaster ( 1 3600 1800 1814400 3600 )
+
+ Newer versions of Linux's ps command hide the individual threads
+ and require -L to display them.
+
From 1547f4c84161f6ab0c300301ced8ecb9aabcc07c Mon Sep 17 00:00:00 2001
From: Mark Andrews
Date: Mon, 27 Feb 2006 21:11:57 +0000
Subject: [PATCH 057/465] update entry
---
FAQ | 3 +++
FAQ.xml | 6 +++++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/FAQ b/FAQ
index 4c4b7648f7..5c6a2a7368 100644
--- a/FAQ
+++ b/FAQ
@@ -54,6 +54,9 @@ A: Linux threads each show up as a process under ps. The approximate number of
memory used is not cumulative; if each process is using 10M of memory, only a
total of 10M is used.
+ Newer versions of Linux's ps command hide the individual threads and require -L
+ to display them.
+
Q: Why does BIND 9 log "permission denied" errors accessing its configuration
files or zones on my Linux system even though it is running as root?
diff --git a/FAQ.xml b/FAQ.xml
index 634cfe3845..d6196185d0 100644
--- a/FAQ.xml
+++ b/FAQ.xml
@@ -17,7 +17,7 @@
- PERFORMANCE OF THIS SOFTWARE.
-->
-
+
Frequently Asked Questions about BIND 9
@@ -125,6 +125,10 @@ example.com. 86400 IN SOA ns hostmaster ( 1 3600 1800 1814400 3600 )
+
+ Newer versions of Linux's ps command hide the individual threads
+ and require -L to display them.
+
From 886fff19f145c93c64967a87e1ff5a9ce18503a6 Mon Sep 17 00:00:00 2001
From: Mark Andrews
Date: Mon, 27 Feb 2006 23:06:40 +0000
Subject: [PATCH 058/465] 4431: The DNSSEC Lookaside Validation (DLV) DNS
Resource Record
---
doc/rfc/index | 1 +
doc/rfc/rfc4431.txt | 227 ++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 228 insertions(+)
create mode 100644 doc/rfc/rfc4431.txt
diff --git a/doc/rfc/index b/doc/rfc/index
index fe97d27ce6..947827e59a 100644
--- a/doc/rfc/index
+++ b/doc/rfc/index
@@ -105,3 +105,4 @@
4255: Using DNS to Securely Publish Secure Shell (SSH) Key Fingerprints
4343: Domain Name System (DNS) Case Insensitivity Clarification
4367: What's in a Name: False Assumptions about DNS Names
+4431: The DNSSEC Lookaside Validation (DLV) DNS Resource Record
diff --git a/doc/rfc/rfc4431.txt b/doc/rfc/rfc4431.txt
new file mode 100644
index 0000000000..8b3887229c
--- /dev/null
+++ b/doc/rfc/rfc4431.txt
@@ -0,0 +1,227 @@
+
+
+
+
+
+
+Network Working Group M. Andrews
+Request for Comments: 4431 Internet Systems Consortium
+Category: Informational S. Weiler
+ SPARTA, Inc.
+ February 2006
+
+
+ The DNSSEC Lookaside Validation (DLV) DNS Resource Record
+
+Status of This Memo
+
+ This memo provides information for the Internet community. It does
+ not specify an Internet standard of any kind. Distribution of this
+ memo is unlimited.
+
+Copyright Notice
+
+ Copyright (C) The Internet Society (2006).
+
+Abstract
+
+ This document defines a new DNS resource record, called the DNSSEC
+ Lookaside Validation (DLV) RR, for publishing DNSSEC trust anchors
+ outside of the DNS delegation chain.
+
+1. Introduction
+
+ DNSSEC [1] [2] [3] authenticates DNS data by building public-key
+ signature chains along the DNS delegation chain from a trust anchor,
+ ideally a trust anchor for the DNS root.
+
+ This document defines a new resource record for publishing such trust
+ anchors outside of the DNS's normal delegation chain. Use of these
+ records by DNSSEC validators is outside the scope of this document,
+ but it is expected that these records will help resolvers validate
+ DNSSEC-signed data from zones whose ancestors either aren't signed or
+ refuse to publish delegation signer (DS) records for their children.
+
+2. DLV Resource Record
+
+ The DLV resource record has exactly the same wire and presentation
+ formats as the DS resource record, defined in RFC 4034, Section 5.
+ It uses the same IANA-assigned values in the algorithm and digest
+ type fields as the DS record. (Those IANA registries are known as
+ the "DNS Security Algorithm Numbers" and "DS RR Type Algorithm
+ Numbers" registries.)
+
+
+
+
+
+Andrews & Weiler Informational [Page 1]
+
+RFC 4431 DLV Resource Record February 2006
+
+
+ The DLV record is a normal DNS record type without any special
+ processing requirements. In particular, the DLV record does not
+ inherit any of the special processing or handling requirements of the
+ DS record type (described in Section 3.1.4.1 of RFC 4035). Unlike
+ the DS record, the DLV record may not appear on the parent's side of
+ a zone cut. A DLV record may, however, appear at the apex of a zone.
+
+3. Security Considerations
+
+ For authoritative servers and resolvers that do not attempt to use
+ DLV RRs as part of DNSSEC validation, there are no particular
+ security concerns -- DLV RRs are just like any other DNS data.
+
+ Software using DLV RRs as part of DNSSEC validation will almost
+ certainly want to impose constraints on their use, but those
+ constraints are best left to be described by the documents that more
+ fully describe the particulars of how the records are used. At a
+ minimum, it would be unwise to use the records without some sort of
+ cryptographic authentication. More likely than not, DNSSEC itself
+ will be used to authenticate the DLV RRs. Depending on how a DLV RR
+ is used, failure to properly authenticate it could lead to
+ significant additional security problems including failure to detect
+ spoofed DNS data.
+
+ RFC 4034, Section 8, describes security considerations specific to
+ the DS RR. Those considerations are equally applicable to DLV RRs.
+ Of particular note, the key tag field is used to help select DNSKEY
+ RRs efficiently, but it does not uniquely identify a single DNSKEY
+ RR. It is possible for two distinct DNSKEY RRs to have the same
+ owner name, the same algorithm type, and the same key tag. An
+ implementation that uses only the key tag to select a DNSKEY RR might
+ select the wrong public key in some circumstances.
+
+ For further discussion of the security implications of DNSSEC, see
+ RFC 4033, RFC 4034, and RFC 4035.
+
+4. IANA Considerations
+
+ IANA has assigned DNS type code 32769 to the DLV resource record from
+ the Specification Required portion of the DNS Resource Record Type
+ registry, as defined in [4].
+
+ The DLV resource record reuses the same algorithm and digest type
+ registries already used for the DS resource record, currently known
+ as the "DNS Security Algorithm Numbers" and "DS RR Type Algorithm
+ Numbers" registries.
+
+
+
+
+
+Andrews & Weiler Informational [Page 2]
+
+RFC 4431 DLV Resource Record February 2006
+
+
+5. Normative References
+
+ [1] Arends, R., Austein, R., Larson, M., Massey, D., and S. Rose,
+ "DNS Security Introduction and Requirements", RFC 4033,
+ March 2005.
+
+ [2] Arends, R., Austein, R., Larson, M., Massey, D., and S. Rose,
+ "Resource Records for the DNS Security Extensions", RFC 4034,
+ March 2005.
+
+ [3] Arends, R., Austein, R., Larson, M., Massey, D., and S. Rose,
+ "Protocol Modifications for the DNS Security Extensions",
+ RFC 4035, March 2005.
+
+ [4] Eastlake, D., Brunner-Williams, E., and B. Manning, "Domain Name
+ System (DNS) IANA Considerations", BCP 42, RFC 2929,
+ September 2000.
+
+Authors' Addresses
+
+ Mark Andrews
+ Internet Systems Consortium
+ 950 Charter St.
+ Redwood City, CA 94063
+ US
+
+ EMail: Mark_Andrews@isc.org
+
+
+ Samuel Weiler
+ SPARTA, Inc.
+ 7075 Samuel Morse Drive
+ Columbia, Maryland 21046
+ US
+
+ EMail: weiler@tislabs.com
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Andrews & Weiler Informational [Page 3]
+
+RFC 4431 DLV Resource Record February 2006
+
+
+Full Copyright Statement
+
+ Copyright (C) The Internet Society (2006).
+
+ This document is subject to the rights, licenses and restrictions
+ contained in BCP 78, and except as set forth therein, the authors
+ retain all their rights.
+
+ This document and the information contained herein are provided on an
+ "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
+ OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
+ ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
+ INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
+ INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
+ WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+
+Intellectual Property
+
+ The IETF takes no position regarding the validity or scope of any
+ Intellectual Property Rights or other rights that might be claimed to
+ pertain to the implementation or use of the technology described in
+ this document or the extent to which any license under such rights
+ might or might not be available; nor does it represent that it has
+ made any independent effort to identify any such rights. Information
+ on the procedures with respect to rights in RFC documents can be
+ found in BCP 78 and BCP 79.
+
+ Copies of IPR disclosures made to the IETF Secretariat and any
+ assurances of licenses to be made available, or the result of an
+ attempt made to obtain a general license or permission for the use of
+ such proprietary rights by implementers or users of this
+ specification can be obtained from the IETF on-line IPR repository at
+ http://www.ietf.org/ipr.
+
+ The IETF invites any interested party to bring to its attention any
+ copyrights, patents or patent applications, or other proprietary
+ rights that may cover technology that may be required to implement
+ this standard. Please address the information to the IETF at
+ ietf-ipr@ietf.org.
+
+Acknowledgement
+
+ Funding for the RFC Editor function is provided by the IETF
+ Administrative Support Activity (IASA).
+
+
+
+
+
+
+
+Andrews & Weiler Informational [Page 4]
+
From c4008fdd56a8045802ed125e40a06bf1df9b7fbe Mon Sep 17 00:00:00 2001
From: Mark Andrews
Date: Mon, 27 Feb 2006 23:55:15 +0000
Subject: [PATCH 059/465] 1990. [bug] libbind: isc's override of
broken gettimeofday() implementions was not always
effective. [RT #15709]
---
CHANGES | 4 ++++
lib/bind/port_after.h.in | 1 +
2 files changed, 5 insertions(+)
diff --git a/CHANGES b/CHANGES
index 06a25e348e..303cc11103 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,7 @@
+1990. [bug] libbind: isc's override of broken gettimeofday()
+ implementions was not always effective.
+ [RT #15709]
+
1989. [bug] win32: don't check the service password when
re-installing. [RT #15882]
diff --git a/lib/bind/port_after.h.in b/lib/bind/port_after.h.in
index 0c956b71ed..12d8d2bc34 100644
--- a/lib/bind/port_after.h.in
+++ b/lib/bind/port_after.h.in
@@ -5,6 +5,7 @@
#include
#include
#include
+#include
#if (!defined(BSD)) || (BSD < 199306)
#include
#endif
From 36f9c51bda508a4b7afba4e14204193e4d673e23 Mon Sep 17 00:00:00 2001
From: Mark Andrews
Date: Tue, 28 Feb 2006 00:10:10 +0000
Subject: [PATCH 060/465] 1990. [bug] libbind: isc's override of
broken gettimeofday() implementions was not always
effective. [RT #15709]
---
CHANGES | 4 ++++
lib/bind/port_after.h.in | 1 +
2 files changed, 5 insertions(+)
diff --git a/CHANGES b/CHANGES
index 739ab81066..9e9a15f630 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,7 @@
+1990. [bug] libbind: isc's override of broken gettimeofday()
+ implementions was not always effective.
+ [RT #15709]
+
1981. [bug] win32: condition.c:wait() could fail to reattain
the mutex lock.
diff --git a/lib/bind/port_after.h.in b/lib/bind/port_after.h.in
index 0c956b71ed..12d8d2bc34 100644
--- a/lib/bind/port_after.h.in
+++ b/lib/bind/port_after.h.in
@@ -5,6 +5,7 @@
#include
#include
#include
+#include
#if (!defined(BSD)) || (BSD < 199306)
#include
#endif
From 45e1bd63587102c3bb361eaca42ee7b714fb3542 Mon Sep 17 00:00:00 2001
From: Mark Andrews
Date: Tue, 28 Feb 2006 02:39:52 +0000
Subject: [PATCH 061/465] 1991. [cleanup] The configuration data, once
read, should be treated as readonly. Expand the use
of const to enforce this at compile time. [RT #15813]
---
CHANGES | 4 +
bin/check/named-checkconf.c | 61 +++---
bin/named/config.c | 70 +++----
bin/named/controlconf.c | 102 +++++-----
bin/named/include/named/config.h | 25 +--
bin/named/include/named/control.h | 4 +-
bin/named/include/named/globals.h | 4 +-
bin/named/include/named/logconf.h | 4 +-
bin/named/include/named/lwresd.h | 7 +-
bin/named/include/named/server.h | 4 +-
bin/named/include/named/sortlist.h | 13 +-
bin/named/include/named/tkeyconf.h | 6 +-
bin/named/include/named/tsigconf.h | 4 +-
bin/named/include/named/zoneconf.h | 9 +-
bin/named/logconf.c | 52 ++---
bin/named/lwdgabn.c | 4 +-
bin/named/lwresd.c | 20 +-
bin/named/query.c | 10 +-
bin/named/server.c | 236 +++++++++++------------
bin/named/sortlist.c | 18 +-
bin/named/tkeyconf.c | 8 +-
bin/named/tsigconf.c | 20 +-
bin/named/zoneconf.c | 61 +++---
bin/rndc/rndc.c | 32 ++--
lib/bind9/check.c | 284 ++++++++++++++--------------
lib/bind9/include/bind9/check.h | 7 +-
lib/dns/acl.c | 40 ++--
lib/dns/compress.c | 10 +-
lib/dns/include/dns/acl.h | 36 ++--
lib/dns/include/dns/compress.h | 8 +-
lib/dns/include/dns/message.h | 6 +-
lib/dns/include/dns/name.h | 10 +-
lib/dns/include/dns/peer.h | 9 +-
lib/dns/include/dns/rdataset.h | 10 +-
lib/dns/include/dns/types.h | 4 +-
lib/dns/include/dns/zone.h | 28 +--
lib/dns/message.c | 6 +-
lib/dns/name.c | 12 +-
lib/dns/peer.c | 12 +-
lib/dns/rdataset.c | 14 +-
lib/dns/zone.c | 30 +--
lib/isc/include/isc/sockaddr.h | 12 +-
lib/isc/include/isc/symtab.h | 3 +-
lib/isc/sockaddr.c | 12 +-
lib/isccfg/aclconf.c | 24 +--
lib/isccfg/include/isccfg/aclconf.h | 6 +-
lib/isccfg/include/isccfg/cfg.h | 71 +++----
lib/isccfg/include/isccfg/grammar.h | 30 +--
lib/isccfg/namedconf.c | 16 +-
lib/isccfg/parser.c | 122 ++++++------
50 files changed, 832 insertions(+), 768 deletions(-)
diff --git a/CHANGES b/CHANGES
index 303cc11103..0d7d8fd621 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,7 @@
+1991. [cleanup] The configuration data, once read, should be treated
+ as readonly. Expand the use of const to enforce this
+ at compile time. [RT #15813]
+
1990. [bug] libbind: isc's override of broken gettimeofday()
implementions was not always effective.
[RT #15709]
diff --git a/bin/check/named-checkconf.c b/bin/check/named-checkconf.c
index b0eb11e705..be834bcb79 100644
--- a/bin/check/named-checkconf.c
+++ b/bin/check/named-checkconf.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: named-checkconf.c,v 1.41 2006/01/07 00:23:35 marka Exp $ */
+/* $Id: named-checkconf.c,v 1.42 2006/02/28 02:39:51 marka Exp $ */
/*! \file */
@@ -66,7 +66,7 @@ usage(void) {
/*% directory callback */
static isc_result_t
-directory_callback(const char *clausename, cfg_obj_t *obj, void *arg) {
+directory_callback(const char *clausename, const cfg_obj_t *obj, void *arg) {
isc_result_t result;
const char *directory;
@@ -91,7 +91,7 @@ directory_callback(const char *clausename, cfg_obj_t *obj, void *arg) {
}
static isc_boolean_t
-get_maps(cfg_obj_t **maps, const char *name, cfg_obj_t **obj) {
+get_maps(const cfg_obj_t **maps, const char *name, const cfg_obj_t **obj) {
int i;
for (i = 0;; i++) {
if (maps[i] == NULL)
@@ -102,11 +102,11 @@ get_maps(cfg_obj_t **maps, const char *name, cfg_obj_t **obj) {
}
static isc_boolean_t
-get_checknames(cfg_obj_t **maps, cfg_obj_t **obj) {
- cfg_listelt_t *element;
- cfg_obj_t *checknames;
- cfg_obj_t *type;
- cfg_obj_t *value;
+get_checknames(const cfg_obj_t **maps, const cfg_obj_t **obj) {
+ const cfg_listelt_t *element;
+ const cfg_obj_t *checknames;
+ const cfg_obj_t *type;
+ const cfg_obj_t *value;
isc_result_t result;
int i;
@@ -135,7 +135,7 @@ get_checknames(cfg_obj_t **maps, cfg_obj_t **obj) {
}
static isc_result_t
-config_get(cfg_obj_t **maps, const char *name, cfg_obj_t **obj) {
+config_get(const cfg_obj_t **maps, const char *name, const cfg_obj_t **obj) {
int i;
for (i = 0;; i++) {
@@ -148,22 +148,23 @@ config_get(cfg_obj_t **maps, const char *name, cfg_obj_t **obj) {
/*% configure the zone */
static isc_result_t
-configure_zone(const char *vclass, const char *view, cfg_obj_t *zconfig,
- cfg_obj_t *vconfig, cfg_obj_t *config, isc_mem_t *mctx)
+configure_zone(const char *vclass, const char *view,
+ const cfg_obj_t *zconfig, const cfg_obj_t *vconfig,
+ const cfg_obj_t *config, isc_mem_t *mctx)
{
int i = 0;
isc_result_t result;
const char *zclass;
const char *zname;
const char *zfile;
- cfg_obj_t *maps[4];
- cfg_obj_t *zoptions = NULL;
- cfg_obj_t *classobj = NULL;
- cfg_obj_t *typeobj = NULL;
- cfg_obj_t *fileobj = NULL;
- cfg_obj_t *dbobj = NULL;
- cfg_obj_t *obj = NULL;
- cfg_obj_t *fmtobj = NULL;
+ const cfg_obj_t *maps[4];
+ const cfg_obj_t *zoptions = NULL;
+ const cfg_obj_t *classobj = NULL;
+ const cfg_obj_t *typeobj = NULL;
+ const cfg_obj_t *fileobj = NULL;
+ const cfg_obj_t *dbobj = NULL;
+ const cfg_obj_t *obj = NULL;
+ const cfg_obj_t *fmtobj = NULL;
dns_masterformat_t masterformat;
zone_options = DNS_ZONEOPT_CHECKNS | DNS_ZONEOPT_MANYERRORS;
@@ -309,12 +310,12 @@ configure_zone(const char *vclass, const char *view, cfg_obj_t *zconfig,
/*% configure a view */
static isc_result_t
-configure_view(const char *vclass, const char *view, cfg_obj_t *config,
- cfg_obj_t *vconfig, isc_mem_t *mctx)
+configure_view(const char *vclass, const char *view, const cfg_obj_t *config,
+ const cfg_obj_t *vconfig, isc_mem_t *mctx)
{
- cfg_listelt_t *element;
- cfg_obj_t *voptions;
- cfg_obj_t *zonelist;
+ const cfg_listelt_t *element;
+ const cfg_obj_t *voptions;
+ const cfg_obj_t *zonelist;
isc_result_t result = ISC_R_SUCCESS;
isc_result_t tresult;
@@ -332,7 +333,7 @@ configure_view(const char *vclass, const char *view, cfg_obj_t *config,
element != NULL;
element = cfg_list_next(element))
{
- cfg_obj_t *zconfig = cfg_listelt_value(element);
+ const cfg_obj_t *zconfig = cfg_listelt_value(element);
tresult = configure_zone(vclass, view, zconfig, vconfig,
config, mctx);
if (tresult != ISC_R_SUCCESS)
@@ -344,11 +345,11 @@ configure_view(const char *vclass, const char *view, cfg_obj_t *config,
/*% load zones from the configuration */
static isc_result_t
-load_zones_fromconfig(cfg_obj_t *config, isc_mem_t *mctx) {
- cfg_listelt_t *element;
- cfg_obj_t *classobj;
- cfg_obj_t *views;
- cfg_obj_t *vconfig;
+load_zones_fromconfig(const cfg_obj_t *config, isc_mem_t *mctx) {
+ const cfg_listelt_t *element;
+ const cfg_obj_t *classobj;
+ const cfg_obj_t *views;
+ const cfg_obj_t *vconfig;
const char *vclass;
isc_result_t result = ISC_R_SUCCESS;
isc_result_t tresult;
diff --git a/bin/named/config.c b/bin/named/config.c
index 04a9b36fe4..7cf5d3c841 100644
--- a/bin/named/config.c
+++ b/bin/named/config.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: config.c,v 1.68 2006/01/27 02:35:14 marka Exp $ */
+/* $Id: config.c,v 1.69 2006/02/28 02:39:51 marka Exp $ */
/*! \file */
@@ -216,7 +216,7 @@ ns_config_parsedefaults(cfg_parser_t *parser, cfg_obj_t **conf) {
}
isc_result_t
-ns_config_get(cfg_obj_t **maps, const char *name, cfg_obj_t **obj) {
+ns_config_get(const cfg_obj_t **maps, const char *name, const cfg_obj_t **obj) {
int i;
for (i = 0;; i++) {
@@ -228,11 +228,13 @@ ns_config_get(cfg_obj_t **maps, const char *name, cfg_obj_t **obj) {
}
isc_result_t
-ns_checknames_get(cfg_obj_t **maps, const char *which, cfg_obj_t **obj) {
- cfg_listelt_t *element;
- cfg_obj_t *checknames;
- cfg_obj_t *type;
- cfg_obj_t *value;
+ns_checknames_get(const cfg_obj_t **maps, const char *which,
+ const cfg_obj_t **obj)
+{
+ const cfg_listelt_t *element;
+ const cfg_obj_t *checknames;
+ const cfg_obj_t *type;
+ const cfg_obj_t *value;
int i;
for (i = 0;; i++) {
@@ -263,8 +265,8 @@ ns_checknames_get(cfg_obj_t **maps, const char *which, cfg_obj_t **obj) {
}
int
-ns_config_listcount(cfg_obj_t *list) {
- cfg_listelt_t *e;
+ns_config_listcount(const cfg_obj_t *list) {
+ const cfg_listelt_t *e;
int i = 0;
for (e = cfg_list_first(list); e != NULL; e = cfg_list_next(e))
@@ -274,7 +276,7 @@ ns_config_listcount(cfg_obj_t *list) {
}
isc_result_t
-ns_config_getclass(cfg_obj_t *classobj, dns_rdataclass_t defclass,
+ns_config_getclass(const cfg_obj_t *classobj, dns_rdataclass_t defclass,
dns_rdataclass_t *classp) {
isc_textregion_t r;
isc_result_t result;
@@ -293,7 +295,7 @@ ns_config_getclass(cfg_obj_t *classobj, dns_rdataclass_t defclass,
}
isc_result_t
-ns_config_gettype(cfg_obj_t *typeobj, dns_rdatatype_t deftype,
+ns_config_gettype(const cfg_obj_t *typeobj, dns_rdatatype_t deftype,
dns_rdatatype_t *typep) {
isc_textregion_t r;
isc_result_t result;
@@ -312,7 +314,7 @@ ns_config_gettype(cfg_obj_t *typeobj, dns_rdatatype_t deftype,
}
dns_zonetype_t
-ns_config_getzonetype(cfg_obj_t *zonetypeobj) {
+ns_config_getzonetype(const cfg_obj_t *zonetypeobj) {
dns_zonetype_t ztype = dns_zone_none;
const char *str;
@@ -329,14 +331,14 @@ ns_config_getzonetype(cfg_obj_t *zonetypeobj) {
}
isc_result_t
-ns_config_getiplist(cfg_obj_t *config, cfg_obj_t *list,
+ns_config_getiplist(const cfg_obj_t *config, const cfg_obj_t *list,
in_port_t defport, isc_mem_t *mctx,
isc_sockaddr_t **addrsp, isc_uint32_t *countp)
{
int count, i = 0;
- cfg_obj_t *addrlist;
- cfg_obj_t *portobj;
- cfg_listelt_t *element;
+ const cfg_obj_t *addrlist;
+ const cfg_obj_t *portobj;
+ const cfg_listelt_t *element;
isc_sockaddr_t *addrs;
in_port_t port;
isc_result_t result;
@@ -396,10 +398,12 @@ ns_config_putiplist(isc_mem_t *mctx, isc_sockaddr_t **addrsp,
}
static isc_result_t
-get_masters_def(cfg_obj_t *cctx, const char *name, cfg_obj_t **ret) {
+get_masters_def(const cfg_obj_t *cctx, const char *name,
+ const cfg_obj_t **ret)
+{
isc_result_t result;
- cfg_obj_t *masters = NULL;
- cfg_listelt_t *elt;
+ const cfg_obj_t *masters = NULL;
+ const cfg_listelt_t *elt;
result = cfg_map_get(cctx, "masters", &masters);
if (result != ISC_R_SUCCESS)
@@ -407,7 +411,7 @@ get_masters_def(cfg_obj_t *cctx, const char *name, cfg_obj_t **ret) {
for (elt = cfg_list_first(masters);
elt != NULL;
elt = cfg_list_next(elt)) {
- cfg_obj_t *list;
+ const cfg_obj_t *list;
const char *listname;
list = cfg_listelt_value(elt);
@@ -422,24 +426,24 @@ get_masters_def(cfg_obj_t *cctx, const char *name, cfg_obj_t **ret) {
}
isc_result_t
-ns_config_getipandkeylist(cfg_obj_t *config, cfg_obj_t *list, isc_mem_t *mctx,
- isc_sockaddr_t **addrsp, dns_name_t ***keysp,
- isc_uint32_t *countp)
+ns_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
+ isc_mem_t *mctx, isc_sockaddr_t **addrsp,
+ dns_name_t ***keysp, isc_uint32_t *countp)
{
isc_uint32_t addrcount = 0, keycount = 0, i = 0;
isc_uint32_t listcount = 0, l = 0, j;
isc_uint32_t stackcount = 0, pushed = 0;
isc_result_t result;
- cfg_listelt_t *element;
- cfg_obj_t *addrlist;
- cfg_obj_t *portobj;
+ const cfg_listelt_t *element;
+ const cfg_obj_t *addrlist;
+ const cfg_obj_t *portobj;
in_port_t port;
dns_fixedname_t fname;
isc_sockaddr_t *addrs = NULL;
dns_name_t **keys = NULL;
struct { const char *name; } *lists = NULL;
struct {
- cfg_listelt_t *element;
+ const cfg_listelt_t *element;
in_port_t port;
} *stack = NULL;
@@ -473,8 +477,8 @@ ns_config_getipandkeylist(cfg_obj_t *config, cfg_obj_t *list, isc_mem_t *mctx,
element != NULL;
element = cfg_list_next(element))
{
- cfg_obj_t *addr;
- cfg_obj_t *key;
+ const cfg_obj_t *addr;
+ const cfg_obj_t *key;
const char *keystr;
isc_buffer_t b;
@@ -699,10 +703,10 @@ ns_config_putipandkeylist(isc_mem_t *mctx, isc_sockaddr_t **addrsp,
}
isc_result_t
-ns_config_getport(cfg_obj_t *config, in_port_t *portp) {
- cfg_obj_t *maps[3];
- cfg_obj_t *options = NULL;
- cfg_obj_t *portobj = NULL;
+ns_config_getport(const cfg_obj_t *config, in_port_t *portp) {
+ const cfg_obj_t *maps[3];
+ const cfg_obj_t *options = NULL;
+ const cfg_obj_t *portobj = NULL;
isc_result_t result;
int i;
diff --git a/bin/named/controlconf.c b/bin/named/controlconf.c
index e7a4bb6929..65ad781f34 100644
--- a/bin/named/controlconf.c
+++ b/bin/named/controlconf.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: controlconf.c,v 1.49 2006/01/27 23:57:46 marka Exp $ */
+/* $Id: controlconf.c,v 1.50 2006/02/28 02:39:51 marka Exp $ */
/*! \file */
@@ -659,10 +659,12 @@ ns_controls_shutdown(ns_controls_t *controls) {
}
static isc_result_t
-cfgkeylist_find(cfg_obj_t *keylist, const char *keyname, cfg_obj_t **objp) {
- cfg_listelt_t *element;
+cfgkeylist_find(const cfg_obj_t *keylist, const char *keyname,
+ const cfg_obj_t **objp)
+{
+ const cfg_listelt_t *element;
const char *str;
- cfg_obj_t *obj;
+ const cfg_obj_t *obj;
for (element = cfg_list_first(keylist);
element != NULL;
@@ -681,13 +683,13 @@ cfgkeylist_find(cfg_obj_t *keylist, const char *keyname, cfg_obj_t **objp) {
}
static isc_result_t
-controlkeylist_fromcfg(cfg_obj_t *keylist, isc_mem_t *mctx,
+controlkeylist_fromcfg(const cfg_obj_t *keylist, isc_mem_t *mctx,
controlkeylist_t *keyids)
{
- cfg_listelt_t *element;
+ const cfg_listelt_t *element;
char *newstr = NULL;
const char *str;
- cfg_obj_t *obj;
+ const cfg_obj_t *obj;
controlkey_t *key = NULL;
for (element = cfg_list_first(keylist);
@@ -722,11 +724,11 @@ controlkeylist_fromcfg(cfg_obj_t *keylist, isc_mem_t *mctx,
}
static void
-register_keys(cfg_obj_t *control, cfg_obj_t *keylist,
+register_keys(const cfg_obj_t *control, const cfg_obj_t *keylist,
controlkeylist_t *keyids, isc_mem_t *mctx, const char *socktext)
{
controlkey_t *keyid, *next;
- cfg_obj_t *keydef;
+ const cfg_obj_t *keydef;
char secret[1024];
isc_buffer_t b;
isc_result_t result;
@@ -746,8 +748,8 @@ register_keys(cfg_obj_t *control, cfg_obj_t *keylist,
ISC_LIST_UNLINK(*keyids, keyid, link);
free_controlkey(keyid, mctx);
} else {
- cfg_obj_t *algobj = NULL;
- cfg_obj_t *secretobj = NULL;
+ const cfg_obj_t *algobj = NULL;
+ const cfg_obj_t *secretobj = NULL;
const char *algstr = NULL;
const char *secretstr = NULL;
@@ -815,9 +817,9 @@ get_rndckey(isc_mem_t *mctx, controlkeylist_t *keyids) {
isc_result_t result;
cfg_parser_t *pctx = NULL;
cfg_obj_t *config = NULL;
- cfg_obj_t *key = NULL;
- cfg_obj_t *algobj = NULL;
- cfg_obj_t *secretobj = NULL;
+ const cfg_obj_t *key = NULL;
+ const cfg_obj_t *algobj = NULL;
+ const cfg_obj_t *secretobj = NULL;
const char *algstr = NULL;
const char *secretstr = NULL;
controlkey_t *keyid = NULL;
@@ -898,12 +900,13 @@ get_rndckey(isc_mem_t *mctx, controlkeylist_t *keyids) {
* valid or both are NULL.
*/
static void
-get_key_info(cfg_obj_t *config, cfg_obj_t *control,
- cfg_obj_t **global_keylistp, cfg_obj_t **control_keylistp)
+get_key_info(const cfg_obj_t *config, const cfg_obj_t *control,
+ const cfg_obj_t **global_keylistp,
+ const cfg_obj_t **control_keylistp)
{
isc_result_t result;
- cfg_obj_t *control_keylist = NULL;
- cfg_obj_t *global_keylist = NULL;
+ const cfg_obj_t *control_keylist = NULL;
+ const cfg_obj_t *global_keylist = NULL;
REQUIRE(global_keylistp != NULL && *global_keylistp == NULL);
REQUIRE(control_keylistp != NULL && *control_keylistp == NULL);
@@ -922,16 +925,15 @@ get_key_info(cfg_obj_t *config, cfg_obj_t *control,
}
static void
-update_listener(ns_controls_t *cp,
- controllistener_t **listenerp, cfg_obj_t *control,
- cfg_obj_t *config, isc_sockaddr_t *addr,
- cfg_aclconfctx_t *aclconfctx, const char *socktext,
- isc_sockettype_t type)
+update_listener(ns_controls_t *cp, controllistener_t **listenerp,
+ const cfg_obj_t *control, const cfg_obj_t *config,
+ isc_sockaddr_t *addr, cfg_aclconfctx_t *aclconfctx,
+ const char *socktext, isc_sockettype_t type)
{
controllistener_t *listener;
- cfg_obj_t *allow;
- cfg_obj_t *global_keylist = NULL;
- cfg_obj_t *control_keylist = NULL;
+ const cfg_obj_t *allow;
+ const cfg_obj_t *global_keylist = NULL;
+ const cfg_obj_t *control_keylist = NULL;
dns_acl_t *new_acl = NULL;
controlkeylist_t keys;
isc_result_t result = ISC_R_SUCCESS;
@@ -1062,15 +1064,15 @@ update_listener(ns_controls_t *cp,
static void
add_listener(ns_controls_t *cp, controllistener_t **listenerp,
- cfg_obj_t *control, cfg_obj_t *config, isc_sockaddr_t *addr,
- cfg_aclconfctx_t *aclconfctx, const char *socktext,
- isc_sockettype_t type)
+ const cfg_obj_t *control, const cfg_obj_t *config,
+ isc_sockaddr_t *addr, cfg_aclconfctx_t *aclconfctx,
+ const char *socktext, isc_sockettype_t type)
{
isc_mem_t *mctx = cp->server->mctx;
controllistener_t *listener;
- cfg_obj_t *allow;
- cfg_obj_t *global_keylist = NULL;
- cfg_obj_t *control_keylist = NULL;
+ const cfg_obj_t *allow;
+ const cfg_obj_t *global_keylist = NULL;
+ const cfg_obj_t *control_keylist = NULL;
dns_acl_t *new_acl = NULL;
isc_result_t result = ISC_R_SUCCESS;
@@ -1200,13 +1202,13 @@ add_listener(ns_controls_t *cp, controllistener_t **listenerp,
}
isc_result_t
-ns_controls_configure(ns_controls_t *cp, cfg_obj_t *config,
+ns_controls_configure(ns_controls_t *cp, const cfg_obj_t *config,
cfg_aclconfctx_t *aclconfctx)
{
controllistener_t *listener;
controllistenerlist_t new_listeners;
- cfg_obj_t *controlslist = NULL;
- cfg_listelt_t *element, *element2;
+ const cfg_obj_t *controlslist = NULL;
+ const cfg_listelt_t *element, *element2;
char socktext[ISC_SOCKADDR_FORMATSIZE];
ISC_LIST_INIT(new_listeners);
@@ -1228,8 +1230,8 @@ ns_controls_configure(ns_controls_t *cp, cfg_obj_t *config,
for (element = cfg_list_first(controlslist);
element != NULL;
element = cfg_list_next(element)) {
- cfg_obj_t *controls;
- cfg_obj_t *inetcontrols = NULL;
+ const cfg_obj_t *controls;
+ const cfg_obj_t *inetcontrols = NULL;
controls = cfg_listelt_value(element);
(void)cfg_map_get(controls, "inet", &inetcontrols);
@@ -1239,9 +1241,9 @@ ns_controls_configure(ns_controls_t *cp, cfg_obj_t *config,
for (element2 = cfg_list_first(inetcontrols);
element2 != NULL;
element2 = cfg_list_next(element2)) {
- cfg_obj_t *control;
- cfg_obj_t *obj;
- isc_sockaddr_t *addr;
+ const cfg_obj_t *control;
+ const cfg_obj_t *obj;
+ isc_sockaddr_t addr;
/*
* The parser handles BIND 8 configuration file
@@ -1251,12 +1253,12 @@ ns_controls_configure(ns_controls_t *cp, cfg_obj_t *config,
control = cfg_listelt_value(element2);
obj = cfg_tuple_get(control, "address");
- addr = cfg_obj_assockaddr(obj);
- if (isc_sockaddr_getport(addr) == 0)
- isc_sockaddr_setport(addr,
+ addr = *cfg_obj_assockaddr(obj);
+ if (isc_sockaddr_getport(&addr) == 0)
+ isc_sockaddr_setport(&addr,
NS_CONTROL_PORT);
- isc_sockaddr_format(addr, socktext,
+ isc_sockaddr_format(&addr, socktext,
sizeof(socktext));
isc_log_write(ns_g_lctx,
@@ -1267,7 +1269,7 @@ ns_controls_configure(ns_controls_t *cp, cfg_obj_t *config,
socktext);
update_listener(cp, &listener, control, config,
- addr, aclconfctx, socktext,
+ &addr, aclconfctx, socktext,
isc_sockettype_tcp);
if (listener != NULL)
@@ -1282,7 +1284,7 @@ ns_controls_configure(ns_controls_t *cp, cfg_obj_t *config,
* This is a new listener.
*/
add_listener(cp, &listener, control,
- config, addr, aclconfctx,
+ config, &addr, aclconfctx,
socktext,
isc_sockettype_tcp);
@@ -1294,8 +1296,8 @@ ns_controls_configure(ns_controls_t *cp, cfg_obj_t *config,
for (element = cfg_list_first(controlslist);
element != NULL;
element = cfg_list_next(element)) {
- cfg_obj_t *controls;
- cfg_obj_t *unixcontrols = NULL;
+ const cfg_obj_t *controls;
+ const cfg_obj_t *unixcontrols = NULL;
controls = cfg_listelt_value(element);
(void)cfg_map_get(controls, "unix", &unixcontrols);
@@ -1305,8 +1307,8 @@ ns_controls_configure(ns_controls_t *cp, cfg_obj_t *config,
for (element2 = cfg_list_first(unixcontrols);
element2 != NULL;
element2 = cfg_list_next(element2)) {
- cfg_obj_t *control;
- cfg_obj_t *path;
+ const cfg_obj_t *control;
+ const cfg_obj_t *path;
isc_sockaddr_t addr;
isc_result_t result;
diff --git a/bin/named/include/named/config.h b/bin/named/include/named/config.h
index b81004fa1c..8c3fe202d5 100644
--- a/bin/named/include/named/config.h
+++ b/bin/named/include/named/config.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: config.h,v 1.11 2006/01/27 23:57:46 marka Exp $ */
+/* $Id: config.h,v 1.12 2006/02/28 02:39:51 marka Exp $ */
#ifndef NAMED_CONFIG_H
#define NAMED_CONFIG_H 1
@@ -31,27 +31,28 @@ isc_result_t
ns_config_parsedefaults(cfg_parser_t *parser, cfg_obj_t **conf);
isc_result_t
-ns_config_get(cfg_obj_t **maps, const char* name, cfg_obj_t **obj);
+ns_config_get(const cfg_obj_t **maps, const char* name, const cfg_obj_t **obj);
isc_result_t
-ns_checknames_get(cfg_obj_t **maps, const char* name, cfg_obj_t **obj);
+ns_checknames_get(const cfg_obj_t **maps, const char* name,
+ const cfg_obj_t **obj);
int
-ns_config_listcount(cfg_obj_t *list);
+ns_config_listcount(const cfg_obj_t *list);
isc_result_t
-ns_config_getclass(cfg_obj_t *classobj, dns_rdataclass_t defclass,
+ns_config_getclass(const cfg_obj_t *classobj, dns_rdataclass_t defclass,
dns_rdataclass_t *classp);
isc_result_t
-ns_config_gettype(cfg_obj_t *typeobj, dns_rdatatype_t deftype,
+ns_config_gettype(const cfg_obj_t *typeobj, dns_rdatatype_t deftype,
dns_rdatatype_t *typep);
dns_zonetype_t
-ns_config_getzonetype(cfg_obj_t *zonetypeobj);
+ns_config_getzonetype(const cfg_obj_t *zonetypeobj);
isc_result_t
-ns_config_getiplist(cfg_obj_t *config, cfg_obj_t *list,
+ns_config_getiplist(const cfg_obj_t *config, const cfg_obj_t *list,
in_port_t defport, isc_mem_t *mctx,
isc_sockaddr_t **addrsp, isc_uint32_t *countp);
@@ -60,16 +61,16 @@ ns_config_putiplist(isc_mem_t *mctx, isc_sockaddr_t **addrsp,
isc_uint32_t count);
isc_result_t
-ns_config_getipandkeylist(cfg_obj_t *config, cfg_obj_t *list, isc_mem_t *mctx,
- isc_sockaddr_t **addrsp, dns_name_t ***keys,
- isc_uint32_t *countp);
+ns_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
+ isc_mem_t *mctx, isc_sockaddr_t **addrsp,
+ dns_name_t ***keys, isc_uint32_t *countp);
void
ns_config_putipandkeylist(isc_mem_t *mctx, isc_sockaddr_t **addrsp,
dns_name_t ***keys, isc_uint32_t count);
isc_result_t
-ns_config_getport(cfg_obj_t *config, in_port_t *portp);
+ns_config_getport(const cfg_obj_t *config, in_port_t *portp);
isc_result_t
ns_config_getkeyalgorithm(const char *str, dns_name_t **name,
diff --git a/bin/named/include/named/control.h b/bin/named/include/named/control.h
index 525faa35f3..800aaf078e 100644
--- a/bin/named/include/named/control.h
+++ b/bin/named/include/named/control.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: control.h,v 1.19 2005/04/27 04:55:57 sra Exp $ */
+/* $Id: control.h,v 1.20 2006/02/28 02:39:51 marka Exp $ */
#ifndef NAMED_CONTROL_H
#define NAMED_CONTROL_H 1
@@ -71,7 +71,7 @@ ns_controls_destroy(ns_controls_t **ctrlsp);
*/
isc_result_t
-ns_controls_configure(ns_controls_t *controls, cfg_obj_t *config,
+ns_controls_configure(ns_controls_t *controls, const cfg_obj_t *config,
cfg_aclconfctx_t *aclconfctx);
/*%<
* Configure zero or more command channels into 'controls'
diff --git a/bin/named/include/named/globals.h b/bin/named/include/named/globals.h
index ba39bdc606..0b13ee6bcc 100644
--- a/bin/named/include/named/globals.h
+++ b/bin/named/include/named/globals.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: globals.h,v 1.66 2005/04/29 00:22:30 marka Exp $ */
+/* $Id: globals.h,v 1.67 2006/02/28 02:39:51 marka Exp $ */
#ifndef NAMED_GLOBALS_H
#define NAMED_GLOBALS_H 1
@@ -77,7 +77,7 @@ EXTERN unsigned int ns_g_debuglevel INIT(0);
* Current configuration information.
*/
EXTERN cfg_obj_t * ns_g_config INIT(NULL);
-EXTERN cfg_obj_t * ns_g_defaults INIT(NULL);
+EXTERN const cfg_obj_t * ns_g_defaults INIT(NULL);
EXTERN const char * ns_g_conffile INIT(NS_SYSCONFDIR
"/named.conf");
EXTERN const char * ns_g_keyfile INIT(NS_SYSCONFDIR
diff --git a/bin/named/include/named/logconf.h b/bin/named/include/named/logconf.h
index 9b4ec0f727..6b42865c15 100644
--- a/bin/named/include/named/logconf.h
+++ b/bin/named/include/named/logconf.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: logconf.h,v 1.13 2005/04/29 00:22:30 marka Exp $ */
+/* $Id: logconf.h,v 1.14 2006/02/28 02:39:51 marka Exp $ */
#ifndef NAMED_LOGCONF_H
#define NAMED_LOGCONF_H 1
@@ -25,7 +25,7 @@
#include
isc_result_t
-ns_log_configure(isc_logconfig_t *logconf, cfg_obj_t *logstmt);
+ns_log_configure(isc_logconfig_t *logconf, const cfg_obj_t *logstmt);
/*%<
* Set up the logging configuration in '*logconf' according to
* the named.conf data in 'logstmt'.
diff --git a/bin/named/include/named/lwresd.h b/bin/named/include/named/lwresd.h
index 1a3b868e4a..18056caa25 100644
--- a/bin/named/include/named/lwresd.h
+++ b/bin/named/include/named/lwresd.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: lwresd.h,v 1.15 2005/04/29 00:22:31 marka Exp $ */
+/* $Id: lwresd.h,v 1.16 2006/02/28 02:39:51 marka Exp $ */
#ifndef NAMED_LWRESD_H
#define NAMED_LWRESD_H 1
@@ -58,7 +58,7 @@ struct ns_lwreslistener {
* Configure lwresd.
*/
isc_result_t
-ns_lwresd_configure(isc_mem_t *mctx, cfg_obj_t *config);
+ns_lwresd_configure(isc_mem_t *mctx, const cfg_obj_t *config);
isc_result_t
ns_lwresd_parseeresolvconf(isc_mem_t *mctx, cfg_parser_t *pctx,
@@ -75,7 +75,8 @@ ns_lwresd_shutdown(void);
*/
/*% create manager */
isc_result_t
-ns_lwdmanager_create(isc_mem_t *mctx, cfg_obj_t *lwres, ns_lwresd_t **lwresdp);
+ns_lwdmanager_create(isc_mem_t *mctx, const cfg_obj_t *lwres,
+ ns_lwresd_t **lwresdp);
/*% attach to manager */
void
diff --git a/bin/named/include/named/server.h b/bin/named/include/named/server.h
index 1237de15fa..0ccaf08edd 100644
--- a/bin/named/include/named/server.h
+++ b/bin/named/include/named/server.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: server.h,v 1.80 2005/08/18 00:57:27 marka Exp $ */
+/* $Id: server.h,v 1.81 2006/02/28 02:39:51 marka Exp $ */
#ifndef NAMED_SERVER_H
#define NAMED_SERVER_H 1
@@ -219,6 +219,6 @@ ns_server_dumprecursing(ns_server_t *server);
* Maintain a list of dispatches that require reserved ports.
*/
void
-ns_add_reserved_dispatch(ns_server_t *server, isc_sockaddr_t *addr);
+ns_add_reserved_dispatch(ns_server_t *server, const isc_sockaddr_t *addr);
#endif /* NAMED_SERVER_H */
diff --git a/bin/named/include/named/sortlist.h b/bin/named/include/named/sortlist.h
index fe85595f88..a5ab613991 100644
--- a/bin/named/include/named/sortlist.h
+++ b/bin/named/include/named/sortlist.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: sortlist.h,v 1.7 2005/04/29 00:22:32 marka Exp $ */
+/* $Id: sortlist.h,v 1.8 2006/02/28 02:39:51 marka Exp $ */
#ifndef NAMED_SORTLIST_H
#define NAMED_SORTLIST_H 1
@@ -30,7 +30,7 @@
* Type for callback functions that rank addresses.
*/
typedef int
-(*dns_addressorderfunc_t)(isc_netaddr_t *address, void *arg);
+(*dns_addressorderfunc_t)(const isc_netaddr_t *address, const void *arg);
/*%
* Return value type for setup_sortlist.
@@ -42,7 +42,8 @@ typedef enum {
} ns_sortlisttype_t;
ns_sortlisttype_t
-ns_sortlist_setup(dns_acl_t *acl, isc_netaddr_t *clientaddr, void **argp);
+ns_sortlist_setup(dns_acl_t *acl, isc_netaddr_t *clientaddr,
+ const void **argp);
/*%<
* Find the sortlist statement in 'acl' that applies to 'clientaddr', if any.
*
@@ -57,14 +58,14 @@ ns_sortlist_setup(dns_acl_t *acl, isc_netaddr_t *clientaddr, void **argp);
*/
int
-ns_sortlist_addrorder1(isc_netaddr_t *addr, void *arg);
+ns_sortlist_addrorder1(const isc_netaddr_t *addr, const void *arg);
/*%<
* Find the sort order of 'addr' in 'arg', the matching element
* of a 1-element top-level sortlist statement.
*/
int
-ns_sortlist_addrorder2(isc_netaddr_t *addr, void *arg);
+ns_sortlist_addrorder2(const isc_netaddr_t *addr, const void *arg);
/*%<
* Find the sort order of 'addr' in 'arg', a topology-like
* ACL forming the second element in a 2-element top-level
@@ -74,7 +75,7 @@ ns_sortlist_addrorder2(isc_netaddr_t *addr, void *arg);
void
ns_sortlist_byaddrsetup(dns_acl_t *sortlist_acl, isc_netaddr_t *client_addr,
dns_addressorderfunc_t *orderp,
- void **argp);
+ const void **argp);
/*%<
* Find the sortlist statement in 'acl' that applies to 'clientaddr', if any.
* If a sortlist statement applies, return in '*orderp' a pointer to a function
diff --git a/bin/named/include/named/tkeyconf.h b/bin/named/include/named/tkeyconf.h
index 290c94ff13..637c0b227c 100644
--- a/bin/named/include/named/tkeyconf.h
+++ b/bin/named/include/named/tkeyconf.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: tkeyconf.h,v 1.12 2005/04/29 00:22:33 marka Exp $ */
+/* $Id: tkeyconf.h,v 1.13 2006/02/28 02:39:51 marka Exp $ */
#ifndef NS_TKEYCONF_H
#define NS_TKEYCONF_H 1
@@ -30,8 +30,8 @@
ISC_LANG_BEGINDECLS
isc_result_t
-ns_tkeyctx_fromconfig(cfg_obj_t *options, isc_mem_t *mctx, isc_entropy_t *ectx,
- dns_tkeyctx_t **tctxp);
+ns_tkeyctx_fromconfig(const cfg_obj_t *options, isc_mem_t *mctx,
+ isc_entropy_t *ectx, dns_tkeyctx_t **tctxp);
/*%<
* Create a TKEY context and configure it, including the default DH key
* and default domain, according to 'options'.
diff --git a/bin/named/include/named/tsigconf.h b/bin/named/include/named/tsigconf.h
index 8338111984..6472a4bd3d 100644
--- a/bin/named/include/named/tsigconf.h
+++ b/bin/named/include/named/tsigconf.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: tsigconf.h,v 1.12 2005/04/29 00:22:33 marka Exp $ */
+/* $Id: tsigconf.h,v 1.13 2006/02/28 02:39:51 marka Exp $ */
#ifndef NS_TSIGCONF_H
#define NS_TSIGCONF_H 1
@@ -28,7 +28,7 @@
ISC_LANG_BEGINDECLS
isc_result_t
-ns_tsigkeyring_fromconfig(cfg_obj_t *config, cfg_obj_t *vconfig,
+ns_tsigkeyring_fromconfig(const cfg_obj_t *config, const cfg_obj_t *vconfig,
isc_mem_t *mctx, dns_tsig_keyring_t **ringp);
/*%<
* Create a TSIG key ring and configure it according to the 'key'
diff --git a/bin/named/include/named/zoneconf.h b/bin/named/include/named/zoneconf.h
index d73faab67d..676f0981ab 100644
--- a/bin/named/include/named/zoneconf.h
+++ b/bin/named/include/named/zoneconf.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: zoneconf.h,v 1.22 2005/04/27 04:56:01 sra Exp $ */
+/* $Id: zoneconf.h,v 1.23 2006/02/28 02:39:51 marka Exp $ */
#ifndef NS_ZONECONF_H
#define NS_ZONECONF_H 1
@@ -31,8 +31,9 @@
ISC_LANG_BEGINDECLS
isc_result_t
-ns_zone_configure(cfg_obj_t *config, cfg_obj_t *vconfig, cfg_obj_t *zconfig,
- cfg_aclconfctx_t *ac, dns_zone_t *zone);
+ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
+ const cfg_obj_t *zconfig, cfg_aclconfctx_t *ac,
+ dns_zone_t *zone);
/*%<
* Configure or reconfigure a zone according to the named.conf
* data in 'cctx' and 'czone'.
@@ -49,7 +50,7 @@ ns_zone_configure(cfg_obj_t *config, cfg_obj_t *vconfig, cfg_obj_t *zconfig,
*/
isc_boolean_t
-ns_zone_reusable(dns_zone_t *zone, cfg_obj_t *zconfig);
+ns_zone_reusable(dns_zone_t *zone, const cfg_obj_t *zconfig);
/*%<
* If 'zone' can be safely reconfigured according to the configuration
* data in 'zconfig', return ISC_TRUE. If the configuration data is so
diff --git a/bin/named/logconf.c b/bin/named/logconf.c
index fb485cfc27..8d0b4b0335 100644
--- a/bin/named/logconf.c
+++ b/bin/named/logconf.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: logconf.c,v 1.38 2005/08/23 02:36:06 marka Exp $ */
+/* $Id: logconf.c,v 1.39 2006/02/28 02:39:51 marka Exp $ */
/*! \file */
@@ -43,13 +43,13 @@
* in 'ccat' and add it to 'lctx'.
*/
static isc_result_t
-category_fromconf(cfg_obj_t *ccat, isc_logconfig_t *lctx) {
+category_fromconf(const cfg_obj_t *ccat, isc_logconfig_t *lctx) {
isc_result_t result;
const char *catname;
isc_logcategory_t *category;
isc_logmodule_t *module;
- cfg_obj_t *destinations = NULL;
- cfg_listelt_t *element = NULL;
+ const cfg_obj_t *destinations = NULL;
+ const cfg_listelt_t *element = NULL;
catname = cfg_obj_asstring(cfg_tuple_get(ccat, "name"));
category = isc_log_categorybyname(ns_g_lctx, catname);
@@ -70,7 +70,7 @@ category_fromconf(cfg_obj_t *ccat, isc_logconfig_t *lctx) {
element != NULL;
element = cfg_list_next(element))
{
- cfg_obj_t *channel = cfg_listelt_value(element);
+ const cfg_obj_t *channel = cfg_listelt_value(element);
const char *channelname = cfg_obj_asstring(channel);
result = isc_log_usechannel(lctx, channelname, category,
@@ -91,18 +91,18 @@ category_fromconf(cfg_obj_t *ccat, isc_logconfig_t *lctx) {
* in 'cchan' and add it to 'lctx'.
*/
static isc_result_t
-channel_fromconf(cfg_obj_t *channel, isc_logconfig_t *lctx) {
+channel_fromconf(const cfg_obj_t *channel, isc_logconfig_t *lctx) {
isc_result_t result;
isc_logdestination_t dest;
unsigned int type;
unsigned int flags = 0;
int level;
const char *channelname;
- cfg_obj_t *fileobj = NULL;
- cfg_obj_t *syslogobj = NULL;
- cfg_obj_t *nullobj = NULL;
- cfg_obj_t *stderrobj = NULL;
- cfg_obj_t *severity = NULL;
+ const cfg_obj_t *fileobj = NULL;
+ const cfg_obj_t *syslogobj = NULL;
+ const cfg_obj_t *nullobj = NULL;
+ const cfg_obj_t *stderrobj = NULL;
+ const cfg_obj_t *severity = NULL;
int i;
channelname = cfg_obj_asstring(cfg_map_getname(channel));
@@ -132,9 +132,10 @@ channel_fromconf(cfg_obj_t *channel, isc_logconfig_t *lctx) {
type = ISC_LOG_TONULL;
if (fileobj != NULL) {
- cfg_obj_t *pathobj = cfg_tuple_get(fileobj, "file");
- cfg_obj_t *sizeobj = cfg_tuple_get(fileobj, "size");
- cfg_obj_t *versionsobj = cfg_tuple_get(fileobj, "versions");
+ const cfg_obj_t *pathobj = cfg_tuple_get(fileobj, "file");
+ const cfg_obj_t *sizeobj = cfg_tuple_get(fileobj, "size");
+ const cfg_obj_t *versionsobj =
+ cfg_tuple_get(fileobj, "versions");
isc_int32_t versions = ISC_LOG_ROLLNEVER;
isc_offset_t size = 0;
@@ -176,9 +177,9 @@ channel_fromconf(cfg_obj_t *channel, isc_logconfig_t *lctx) {
* Munge flags.
*/
{
- cfg_obj_t *printcat = NULL;
- cfg_obj_t *printsev = NULL;
- cfg_obj_t *printtime = NULL;
+ const cfg_obj_t *printcat = NULL;
+ const cfg_obj_t *printsev = NULL;
+ const cfg_obj_t *printtime = NULL;
(void)cfg_map_get(channel, "print-category", &printcat);
(void)cfg_map_get(channel, "print-severity", &printsev);
@@ -244,13 +245,14 @@ channel_fromconf(cfg_obj_t *channel, isc_logconfig_t *lctx) {
}
isc_result_t
-ns_log_configure(isc_logconfig_t *logconf, cfg_obj_t *logstmt) {
+ns_log_configure(isc_logconfig_t *logconf, const cfg_obj_t *logstmt) {
isc_result_t result;
- cfg_obj_t *channels = NULL;
- cfg_obj_t *categories = NULL;
- cfg_listelt_t *element;
+ const cfg_obj_t *channels = NULL;
+ const cfg_obj_t *categories = NULL;
+ const cfg_listelt_t *element;
isc_boolean_t default_set = ISC_FALSE;
isc_boolean_t unmatched_set = ISC_FALSE;
+ const cfg_obj_t *catname;
CHECK(ns_log_setdefaultchannels(logconf));
@@ -259,7 +261,7 @@ ns_log_configure(isc_logconfig_t *logconf, cfg_obj_t *logstmt) {
element != NULL;
element = cfg_list_next(element))
{
- cfg_obj_t *channel = cfg_listelt_value(element);
+ const cfg_obj_t *channel = cfg_listelt_value(element);
CHECK(channel_fromconf(channel, logconf));
}
@@ -268,15 +270,15 @@ ns_log_configure(isc_logconfig_t *logconf, cfg_obj_t *logstmt) {
element != NULL;
element = cfg_list_next(element))
{
- cfg_obj_t *category = cfg_listelt_value(element);
+ const cfg_obj_t *category = cfg_listelt_value(element);
CHECK(category_fromconf(category, logconf));
if (!default_set) {
- cfg_obj_t *catname = cfg_tuple_get(category, "name");
+ catname = cfg_tuple_get(category, "name");
if (strcmp(cfg_obj_asstring(catname), "default") == 0)
default_set = ISC_TRUE;
}
if (!unmatched_set) {
- cfg_obj_t *catname = cfg_tuple_get(category, "name");
+ catname = cfg_tuple_get(category, "name");
if (strcmp(cfg_obj_asstring(catname), "unmatched") == 0)
unmatched_set = ISC_TRUE;
}
diff --git a/bin/named/lwdgabn.c b/bin/named/lwdgabn.c
index d5da2f1db9..b7c84de12b 100644
--- a/bin/named/lwdgabn.c
+++ b/bin/named/lwdgabn.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: lwdgabn.c,v 1.18 2005/06/23 04:21:59 marka Exp $ */
+/* $Id: lwdgabn.c,v 1.19 2006/02/28 02:39:51 marka Exp $ */
/*! \file */
@@ -122,7 +122,7 @@ sort_addresses(ns_lwdclient_t *client) {
rankedaddress *addrs;
isc_netaddr_t remote;
dns_addressorderfunc_t order;
- void *arg;
+ const void *arg;
ns_lwresd_t *lwresd = client->clientmgr->listener->manager;
unsigned int i;
isc_result_t result;
diff --git a/bin/named/lwresd.c b/bin/named/lwresd.c
index 67c2edae25..3726706fd9 100644
--- a/bin/named/lwresd.c
+++ b/bin/named/lwresd.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: lwresd.c,v 1.51 2005/11/30 03:33:48 marka Exp $ */
+/* $Id: lwresd.c,v 1.52 2006/02/28 02:39:51 marka Exp $ */
/*! \file
* \brief
@@ -286,14 +286,14 @@ ns_lwresd_parseeresolvconf(isc_mem_t *mctx, cfg_parser_t *pctx,
* Handle lwresd manager objects
*/
isc_result_t
-ns_lwdmanager_create(isc_mem_t *mctx, cfg_obj_t *lwres,
+ns_lwdmanager_create(isc_mem_t *mctx, const cfg_obj_t *lwres,
ns_lwresd_t **lwresdp)
{
ns_lwresd_t *lwresd;
const char *vname;
dns_rdataclass_t vclass;
- cfg_obj_t *obj, *viewobj, *searchobj;
- cfg_listelt_t *element;
+ const cfg_obj_t *obj, *viewobj, *searchobj;
+ const cfg_listelt_t *element;
isc_result_t result;
INSIST(lwresdp != NULL && *lwresdp == NULL);
@@ -357,7 +357,7 @@ ns_lwdmanager_create(isc_mem_t *mctx, cfg_obj_t *lwres,
element != NULL;
element = cfg_list_next(element))
{
- cfg_obj_t *search;
+ const cfg_obj_t *search;
const char *searchstr;
isc_buffer_t namebuf;
dns_fixedname_t fname;
@@ -752,11 +752,11 @@ configure_listener(isc_sockaddr_t *address, ns_lwresd_t *lwresd,
}
isc_result_t
-ns_lwresd_configure(isc_mem_t *mctx, cfg_obj_t *config) {
- cfg_obj_t *lwreslist = NULL;
- cfg_obj_t *lwres = NULL;
- cfg_obj_t *listenerslist = NULL;
- cfg_listelt_t *element = NULL;
+ns_lwresd_configure(isc_mem_t *mctx, const cfg_obj_t *config) {
+ const cfg_obj_t *lwreslist = NULL;
+ const cfg_obj_t *lwres = NULL;
+ const cfg_obj_t *listenerslist = NULL;
+ const cfg_listelt_t *element = NULL;
ns_lwreslistener_t *listener;
ns_lwreslistenerlist_t newlisteners;
isc_result_t result;
diff --git a/bin/named/query.c b/bin/named/query.c
index e51ea3af66..098cb6d824 100644
--- a/bin/named/query.c
+++ b/bin/named/query.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: query.c,v 1.280 2006/02/02 22:48:58 marka Exp $ */
+/* $Id: query.c,v 1.281 2006/02/28 02:39:51 marka Exp $ */
/*! \file */
@@ -3052,7 +3052,7 @@ do { \
* ISC_R_NOTIMPLEMENTED The rdata is not a known address type.
*/
static isc_result_t
-rdata_tonetaddr(dns_rdata_t *rdata, isc_netaddr_t *netaddr) {
+rdata_tonetaddr(const dns_rdata_t *rdata, isc_netaddr_t *netaddr) {
struct in_addr ina;
struct in6_addr in6a;
@@ -3078,7 +3078,7 @@ rdata_tonetaddr(dns_rdata_t *rdata, isc_netaddr_t *netaddr) {
* sortlist statement.
*/
static int
-query_sortlist_order_2element(dns_rdata_t *rdata, void *arg) {
+query_sortlist_order_2element(const dns_rdata_t *rdata, const void *arg) {
isc_netaddr_t netaddr;
if (rdata_tonetaddr(rdata, &netaddr) != ISC_R_SUCCESS)
@@ -3091,7 +3091,7 @@ query_sortlist_order_2element(dns_rdata_t *rdata, void *arg) {
* of a 1-element top-level sortlist statement.
*/
static int
-query_sortlist_order_1element(dns_rdata_t *rdata, void *arg) {
+query_sortlist_order_1element(const dns_rdata_t *rdata, const void *arg) {
isc_netaddr_t netaddr;
if (rdata_tonetaddr(rdata, &netaddr) != ISC_R_SUCCESS)
@@ -3107,7 +3107,7 @@ static void
setup_query_sortlist(ns_client_t *client) {
isc_netaddr_t netaddr;
dns_rdatasetorderfunc_t order = NULL;
- void *order_arg = NULL;
+ const void *order_arg = NULL;
isc_netaddr_fromsockaddr(&netaddr, &client->peeraddr);
switch (ns_sortlist_setup(client->view->sortlist,
diff --git a/bin/named/server.c b/bin/named/server.c
index a78b07951b..fa62826319 100644
--- a/bin/named/server.c
+++ b/bin/named/server.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: server.c,v 1.458 2006/02/26 22:54:46 marka Exp $ */
+/* $Id: server.c,v 1.459 2006/02/28 02:39:51 marka Exp $ */
/*! \file */
@@ -222,25 +222,25 @@ static void
ns_server_reload(isc_task_t *task, isc_event_t *event);
static isc_result_t
-ns_listenelt_fromconfig(cfg_obj_t *listener, cfg_obj_t *config,
+ns_listenelt_fromconfig(const cfg_obj_t *listener, const cfg_obj_t *config,
cfg_aclconfctx_t *actx,
isc_mem_t *mctx, ns_listenelt_t **target);
static isc_result_t
-ns_listenlist_fromconfig(cfg_obj_t *listenlist, cfg_obj_t *config,
+ns_listenlist_fromconfig(const cfg_obj_t *listenlist, const cfg_obj_t *config,
cfg_aclconfctx_t *actx,
isc_mem_t *mctx, ns_listenlist_t **target);
static isc_result_t
-configure_forward(cfg_obj_t *config, dns_view_t *view, dns_name_t *origin,
- cfg_obj_t *forwarders, cfg_obj_t *forwardtype);
+configure_forward(const cfg_obj_t *config, dns_view_t *view, dns_name_t *origin,
+ const cfg_obj_t *forwarders, const cfg_obj_t *forwardtype);
static isc_result_t
-configure_alternates(cfg_obj_t *config, dns_view_t *view,
- cfg_obj_t *alternates);
+configure_alternates(const cfg_obj_t *config, dns_view_t *view,
+ const cfg_obj_t *alternates);
static isc_result_t
-configure_zone(cfg_obj_t *config, cfg_obj_t *zconfig, cfg_obj_t *vconfig,
- isc_mem_t *mctx, dns_view_t *view,
+configure_zone(const cfg_obj_t *config, const cfg_obj_t *zconfig,
+ const cfg_obj_t *vconfig, isc_mem_t *mctx, dns_view_t *view,
cfg_aclconfctx_t *aclconf);
static void
@@ -252,13 +252,13 @@ end_reserved_dispatches(ns_server_t *server, isc_boolean_t all);
* (for a global default).
*/
static isc_result_t
-configure_view_acl(cfg_obj_t *vconfig, cfg_obj_t *config,
+configure_view_acl(const cfg_obj_t *vconfig, const cfg_obj_t *config,
const char *aclname, cfg_aclconfctx_t *actx,
isc_mem_t *mctx, dns_acl_t **aclp)
{
isc_result_t result;
- cfg_obj_t *maps[3];
- cfg_obj_t *aclobj = NULL;
+ const cfg_obj_t *maps[3];
+ const cfg_obj_t *aclobj = NULL;
int i = 0;
if (*aclp != NULL)
@@ -266,7 +266,7 @@ configure_view_acl(cfg_obj_t *vconfig, cfg_obj_t *config,
if (vconfig != NULL)
maps[i++] = cfg_tuple_get(vconfig, "options");
if (config != NULL) {
- cfg_obj_t *options = NULL;
+ const cfg_obj_t *options = NULL;
(void)cfg_map_get(config, "options", &options);
if (options != NULL)
maps[i++] = options;
@@ -287,7 +287,7 @@ configure_view_acl(cfg_obj_t *vconfig, cfg_obj_t *config,
}
static isc_result_t
-configure_view_dnsseckey(cfg_obj_t *vconfig, cfg_obj_t *key,
+configure_view_dnsseckey(const cfg_obj_t *vconfig, const cfg_obj_t *key,
dns_keytable_t *keytable, isc_mem_t *mctx)
{
dns_rdataclass_t viewclass;
@@ -314,7 +314,7 @@ configure_view_dnsseckey(cfg_obj_t *vconfig, cfg_obj_t *key,
if (vconfig == NULL)
viewclass = dns_rdataclass_in;
else {
- cfg_obj_t *classobj = cfg_tuple_get(vconfig, "class");
+ const cfg_obj_t *classobj = cfg_tuple_get(vconfig, "class");
CHECK(ns_config_getclass(classobj, dns_rdataclass_in,
&viewclass));
}
@@ -390,15 +390,15 @@ configure_view_dnsseckey(cfg_obj_t *vconfig, cfg_obj_t *key,
* from 'vconfig' and 'config'. The variable to be configured is '*target'.
*/
static isc_result_t
-configure_view_dnsseckeys(cfg_obj_t *vconfig, cfg_obj_t *config,
+configure_view_dnsseckeys(const cfg_obj_t *vconfig, const cfg_obj_t *config,
isc_mem_t *mctx, dns_keytable_t **target)
{
isc_result_t result;
- cfg_obj_t *keys = NULL;
- cfg_obj_t *voptions = NULL;
- cfg_listelt_t *element, *element2;
- cfg_obj_t *keylist;
- cfg_obj_t *key;
+ const cfg_obj_t *keys = NULL;
+ const cfg_obj_t *voptions = NULL;
+ const cfg_listelt_t *element, *element2;
+ const cfg_obj_t *keylist;
+ const cfg_obj_t *key;
dns_keytable_t *keytable = NULL;
CHECK(dns_keytable_create(mctx, &keytable));
@@ -437,10 +437,10 @@ configure_view_dnsseckeys(cfg_obj_t *vconfig, cfg_obj_t *config,
}
static isc_result_t
-mustbesecure(cfg_obj_t *mbs, dns_resolver_t *resolver)
+mustbesecure(const cfg_obj_t *mbs, dns_resolver_t *resolver)
{
- cfg_listelt_t *element;
- cfg_obj_t *obj;
+ const cfg_listelt_t *element;
+ const cfg_obj_t *obj;
const char *str;
dns_fixedname_t fixed;
dns_name_t *name;
@@ -474,14 +474,14 @@ mustbesecure(cfg_obj_t *mbs, dns_resolver_t *resolver)
* Get a dispatch appropriate for the resolver of a given view.
*/
static isc_result_t
-get_view_querysource_dispatch(cfg_obj_t **maps,
+get_view_querysource_dispatch(const cfg_obj_t **maps,
int af, dns_dispatch_t **dispatchp)
{
isc_result_t result;
dns_dispatch_t *disp;
isc_sockaddr_t sa;
unsigned int attrs, attrmask;
- cfg_obj_t *obj = NULL;
+ const cfg_obj_t *obj = NULL;
/*
* Make compiler happy.
@@ -572,10 +572,10 @@ get_view_querysource_dispatch(cfg_obj_t **maps,
}
static isc_result_t
-configure_order(dns_order_t *order, cfg_obj_t *ent) {
+configure_order(dns_order_t *order, const cfg_obj_t *ent) {
dns_rdataclass_t rdclass;
dns_rdatatype_t rdtype;
- cfg_obj_t *obj;
+ const cfg_obj_t *obj;
dns_fixedname_t fixed;
unsigned int mode = 0;
const char *str;
@@ -636,10 +636,10 @@ configure_order(dns_order_t *order, cfg_obj_t *ent) {
}
static isc_result_t
-configure_peer(cfg_obj_t *cpeer, isc_mem_t *mctx, dns_peer_t **peerp) {
+configure_peer(const cfg_obj_t *cpeer, isc_mem_t *mctx, dns_peer_t **peerp) {
isc_netaddr_t na;
dns_peer_t *peer;
- cfg_obj_t *obj;
+ const cfg_obj_t *obj;
const char *str;
isc_result_t result;
unsigned int prefixlen;
@@ -768,10 +768,10 @@ configure_peer(cfg_obj_t *cpeer, isc_mem_t *mctx, dns_peer_t **peerp) {
}
static isc_result_t
-disable_algorithms(cfg_obj_t *disabled, dns_resolver_t *resolver) {
+disable_algorithms(const cfg_obj_t *disabled, dns_resolver_t *resolver) {
isc_result_t result;
- cfg_obj_t *algorithms;
- cfg_listelt_t *element;
+ const cfg_obj_t *algorithms;
+ const cfg_listelt_t *element;
const char *str;
dns_fixedname_t fixed;
dns_name_t *name;
@@ -814,12 +814,12 @@ disable_algorithms(cfg_obj_t *disabled, dns_resolver_t *resolver) {
}
static isc_boolean_t
-on_disable_list(cfg_obj_t *disablelist, dns_name_t *zonename) {
- cfg_listelt_t *element;
+on_disable_list(const cfg_obj_t *disablelist, dns_name_t *zonename) {
+ const cfg_listelt_t *element;
dns_fixedname_t fixed;
dns_name_t *name;
isc_result_t result;
- cfg_obj_t *value;
+ const cfg_obj_t *value;
const char *str;
isc_buffer_t b;
@@ -883,26 +883,26 @@ check_dbtype(dns_zone_t **zonep, unsigned int dbtypec, const char **dbargv,
* global defaults in 'config' used exclusively.
*/
static isc_result_t
-configure_view(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig,
- isc_mem_t *mctx, cfg_aclconfctx_t *actx,
- isc_boolean_t need_hints)
+configure_view(dns_view_t *view, const cfg_obj_t *config,
+ const cfg_obj_t *vconfig, isc_mem_t *mctx,
+ cfg_aclconfctx_t *actx, isc_boolean_t need_hints)
{
- cfg_obj_t *maps[4];
- cfg_obj_t *cfgmaps[3];
- cfg_obj_t *options = NULL;
- cfg_obj_t *voptions = NULL;
- cfg_obj_t *forwardtype;
- cfg_obj_t *forwarders;
- cfg_obj_t *alternates;
- cfg_obj_t *zonelist;
+ const cfg_obj_t *maps[4];
+ const cfg_obj_t *cfgmaps[3];
+ const cfg_obj_t *options = NULL;
+ const cfg_obj_t *voptions = NULL;
+ const cfg_obj_t *forwardtype;
+ const cfg_obj_t *forwarders;
+ const cfg_obj_t *alternates;
+ const cfg_obj_t *zonelist;
#ifdef DLZ
- cfg_obj_t *dlz;
+ const cfg_obj_t *dlz;
unsigned int dlzargc;
char **dlzargv;
#endif
- cfg_obj_t *disabled;
- cfg_obj_t *obj;
- cfg_listelt_t *element;
+ const cfg_obj_t *disabled;
+ const cfg_obj_t *obj;
+ const cfg_listelt_t *element;
in_port_t port;
dns_cache_t *cache = NULL;
isc_result_t result;
@@ -928,7 +928,7 @@ configure_view(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig,
const char *forview = " for view ";
isc_boolean_t rfc1918;
isc_boolean_t empty_zones_enable;
- cfg_obj_t *disablelist = NULL;
+ const cfg_obj_t *disablelist = NULL;
REQUIRE(DNS_VIEW_VALID(view));
@@ -1023,7 +1023,7 @@ configure_view(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig,
element != NULL;
element = cfg_list_next(element))
{
- cfg_obj_t *zconfig = cfg_listelt_value(element);
+ const cfg_obj_t *zconfig = cfg_listelt_value(element);
CHECK(configure_zone(config, zconfig, vconfig, mctx, view,
actx));
}
@@ -1306,8 +1306,8 @@ configure_view(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig,
* Configure the view's peer list.
*/
{
- cfg_obj_t *peers = NULL;
- cfg_listelt_t *element;
+ const cfg_obj_t *peers = NULL;
+ const cfg_listelt_t *element;
dns_peerlist_t *newpeers = NULL;
(void)ns_config_get(cfgmaps, "server", &peers);
@@ -1316,7 +1316,7 @@ configure_view(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig,
element != NULL;
element = cfg_list_next(element))
{
- cfg_obj_t *cpeer = cfg_listelt_value(element);
+ const cfg_obj_t *cpeer = cfg_listelt_value(element);
dns_peer_t *peer;
CHECK(configure_peer(cpeer, mctx, &peer));
@@ -1331,8 +1331,8 @@ configure_view(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig,
* Configure the views rrset-order.
*/
{
- cfg_obj_t *rrsetorder = NULL;
- cfg_listelt_t *element;
+ const cfg_obj_t *rrsetorder = NULL;
+ const cfg_listelt_t *element;
(void)ns_config_get(maps, "rrset-order", &rrsetorder);
CHECK(dns_order_create(mctx, &order));
@@ -1340,7 +1340,7 @@ configure_view(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig,
element != NULL;
element = cfg_list_next(element))
{
- cfg_obj_t *ent = cfg_listelt_value(element);
+ const cfg_obj_t *ent = cfg_listelt_value(element);
CHECK(configure_order(order, ent));
}
@@ -1575,7 +1575,7 @@ configure_view(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig,
dns_name_t *name;
isc_buffer_t b;
const char *str;
- cfg_obj_t *exclude;
+ const cfg_obj_t *exclude;
dns_fixedname_init(&fixed);
name = dns_fixedname_name(&fixed);
@@ -1800,12 +1800,12 @@ configure_hints(dns_view_t *view, const char *filename) {
}
static isc_result_t
-configure_alternates(cfg_obj_t *config, dns_view_t *view,
- cfg_obj_t *alternates)
+configure_alternates(const cfg_obj_t *config, dns_view_t *view,
+ const cfg_obj_t *alternates)
{
- cfg_obj_t *portobj;
- cfg_obj_t *addresses;
- cfg_listelt_t *element;
+ const cfg_obj_t *portobj;
+ const cfg_obj_t *addresses;
+ const cfg_listelt_t *element;
isc_result_t result = ISC_R_SUCCESS;
in_port_t port;
@@ -1838,7 +1838,7 @@ configure_alternates(cfg_obj_t *config, dns_view_t *view,
element != NULL;
element = cfg_list_next(element))
{
- cfg_obj_t *alternate = cfg_listelt_value(element);
+ const cfg_obj_t *alternate = cfg_listelt_value(element);
isc_sockaddr_t sa;
if (!cfg_obj_issockaddr(alternate)) {
@@ -1885,12 +1885,12 @@ configure_alternates(cfg_obj_t *config, dns_view_t *view,
}
static isc_result_t
-configure_forward(cfg_obj_t *config, dns_view_t *view, dns_name_t *origin,
- cfg_obj_t *forwarders, cfg_obj_t *forwardtype)
+configure_forward(const cfg_obj_t *config, dns_view_t *view, dns_name_t *origin,
+ const cfg_obj_t *forwarders, const cfg_obj_t *forwardtype)
{
- cfg_obj_t *portobj;
- cfg_obj_t *faddresses;
- cfg_listelt_t *element;
+ const cfg_obj_t *portobj;
+ const cfg_obj_t *faddresses;
+ const cfg_listelt_t *element;
dns_fwdpolicy_t fwdpolicy = dns_fwdpolicy_none;
isc_sockaddrlist_t addresses;
isc_sockaddr_t *sa;
@@ -1928,7 +1928,7 @@ configure_forward(cfg_obj_t *config, dns_view_t *view, dns_name_t *origin,
element != NULL;
element = cfg_list_next(element))
{
- cfg_obj_t *forwarder = cfg_listelt_value(element);
+ const cfg_obj_t *forwarder = cfg_listelt_value(element);
sa = isc_mem_get(view->mctx, sizeof(isc_sockaddr_t));
if (sa == NULL) {
result = ISC_R_NOMEMORY;
@@ -1993,14 +1993,16 @@ configure_forward(cfg_obj_t *config, dns_view_t *view, dns_name_t *origin,
* The view created is attached to '*viewp'.
*/
static isc_result_t
-create_view(cfg_obj_t *vconfig, dns_viewlist_t *viewlist, dns_view_t **viewp) {
+create_view(const cfg_obj_t *vconfig, dns_viewlist_t *viewlist,
+ dns_view_t **viewp)
+{
isc_result_t result;
const char *viewname;
dns_rdataclass_t viewclass;
dns_view_t *view = NULL;
if (vconfig != NULL) {
- cfg_obj_t *classobj = NULL;
+ const cfg_obj_t *classobj = NULL;
viewname = cfg_obj_asstring(cfg_tuple_get(vconfig, "name"));
classobj = cfg_tuple_get(vconfig, "class");
@@ -2030,19 +2032,19 @@ create_view(cfg_obj_t *vconfig, dns_viewlist_t *viewlist, dns_view_t **viewp) {
* Configure or reconfigure a zone.
*/
static isc_result_t
-configure_zone(cfg_obj_t *config, cfg_obj_t *zconfig, cfg_obj_t *vconfig,
- isc_mem_t *mctx, dns_view_t *view,
+configure_zone(const cfg_obj_t *config, const cfg_obj_t *zconfig,
+ const cfg_obj_t *vconfig, isc_mem_t *mctx, dns_view_t *view,
cfg_aclconfctx_t *aclconf)
{
dns_view_t *pview = NULL; /* Production view */
dns_zone_t *zone = NULL; /* New or reused zone */
dns_zone_t *dupzone = NULL;
- cfg_obj_t *options = NULL;
- cfg_obj_t *zoptions = NULL;
- cfg_obj_t *typeobj = NULL;
- cfg_obj_t *forwarders = NULL;
- cfg_obj_t *forwardtype = NULL;
- cfg_obj_t *only = NULL;
+ const cfg_obj_t *options = NULL;
+ const cfg_obj_t *zoptions = NULL;
+ const cfg_obj_t *typeobj = NULL;
+ const cfg_obj_t *forwarders = NULL;
+ const cfg_obj_t *forwardtype = NULL;
+ const cfg_obj_t *only = NULL;
isc_result_t result;
isc_result_t tresult;
isc_buffer_t buffer;
@@ -2099,7 +2101,7 @@ configure_zone(cfg_obj_t *config, cfg_obj_t *zconfig, cfg_obj_t *vconfig,
* configure it and return.
*/
if (strcasecmp(ztypestr, "hint") == 0) {
- cfg_obj_t *fileobj = NULL;
+ const cfg_obj_t *fileobj = NULL;
if (cfg_map_get(zoptions, "file", &fileobj) != ISC_R_SUCCESS) {
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
NS_LOGMODULE_SERVER, ISC_LOG_ERROR,
@@ -2267,9 +2269,10 @@ configure_zone(cfg_obj_t *config, cfg_obj_t *zconfig, cfg_obj_t *vconfig,
* Configure a single server quota.
*/
static void
-configure_server_quota(cfg_obj_t **maps, const char *name, isc_quota_t *quota)
+configure_server_quota(const cfg_obj_t **maps, const char *name,
+ isc_quota_t *quota)
{
- cfg_obj_t *obj = NULL;
+ const cfg_obj_t *obj = NULL;
isc_result_t result;
result = ns_config_get(maps, name, &obj);
@@ -2282,7 +2285,7 @@ configure_server_quota(cfg_obj_t **maps, const char *name, isc_quota_t *quota)
* parsed. This can be extended to support other options if necessary.
*/
static isc_result_t
-directory_callback(const char *clausename, cfg_obj_t *obj, void *arg) {
+directory_callback(const char *clausename, const cfg_obj_t *obj, void *arg) {
isc_result_t result;
const char *directory;
@@ -2535,7 +2538,7 @@ setstring(ns_server_t *server, char **field, const char *value) {
* or NULL if whether 'obj' is a string or void value, respectively.
*/
static isc_result_t
-setoptstring(ns_server_t *server, char **field, cfg_obj_t *obj) {
+setoptstring(ns_server_t *server, char **field, const cfg_obj_t *obj) {
if (cfg_obj_isvoid(obj))
return (setstring(server, field, NULL));
else
@@ -2543,10 +2546,11 @@ setoptstring(ns_server_t *server, char **field, cfg_obj_t *obj) {
}
static void
-set_limit(cfg_obj_t **maps, const char *configname, const char *description,
- isc_resource_t resourceid, isc_resourcevalue_t defaultvalue)
+set_limit(const cfg_obj_t **maps, const char *configname,
+ const char *description, isc_resource_t resourceid,
+ isc_resourcevalue_t defaultvalue)
{
- cfg_obj_t *obj = NULL;
+ const cfg_obj_t *obj = NULL;
const char *resource;
isc_resourcevalue_t value;
isc_result_t result;
@@ -2578,7 +2582,7 @@ set_limit(cfg_obj_t **maps, const char *configname, const char *description,
ns_g_init ## resource)
static void
-set_limits(cfg_obj_t **maps) {
+set_limits(const cfg_obj_t **maps) {
SETLIMIT("stacksize", stacksize, "stack size");
SETLIMIT("datasize", datasize, "data size");
SETLIMIT("coresize", coresize, "core size");
@@ -2587,15 +2591,15 @@ set_limits(cfg_obj_t **maps) {
static isc_result_t
portlist_fromconf(dns_portlist_t *portlist, unsigned int family,
- cfg_obj_t *ports)
+ const cfg_obj_t *ports)
{
- cfg_listelt_t *element;
+ const cfg_listelt_t *element;
isc_result_t result = ISC_R_SUCCESS;
for (element = cfg_list_first(ports);
element != NULL;
element = cfg_list_next(element)) {
- cfg_obj_t *obj = cfg_listelt_value(element);
+ const cfg_obj_t *obj = cfg_listelt_value(element);
in_port_t port = (in_port_t)cfg_obj_asuint32(obj);
result = dns_portlist_add(portlist, family, port);
@@ -2638,13 +2642,13 @@ load_configuration(const char *filename, ns_server_t *server,
isc_interval_t interval;
cfg_parser_t *parser = NULL;
cfg_obj_t *config;
- cfg_obj_t *options;
- cfg_obj_t *views;
- cfg_obj_t *obj;
- cfg_obj_t *v4ports, *v6ports;
- cfg_obj_t *maps[3];
- cfg_obj_t *builtin_views;
- cfg_listelt_t *element;
+ const cfg_obj_t *options;
+ const cfg_obj_t *views;
+ const cfg_obj_t *obj;
+ const cfg_obj_t *v4ports, *v6ports;
+ const cfg_obj_t *maps[3];
+ const cfg_obj_t *builtin_views;
+ const cfg_listelt_t *element;
dns_view_t *view = NULL;
dns_view_t *view_next;
dns_viewlist_t viewlist;
@@ -2831,7 +2835,7 @@ load_configuration(const char *filename, ns_server_t *server,
* statement.
*/
{
- cfg_obj_t *clistenon = NULL;
+ const cfg_obj_t *clistenon = NULL;
ns_listenlist_t *listenon = NULL;
clistenon = NULL;
@@ -2865,7 +2869,7 @@ load_configuration(const char *filename, ns_server_t *server,
* Ditto for IPv6.
*/
{
- cfg_obj_t *clistenon = NULL;
+ const cfg_obj_t *clistenon = NULL;
ns_listenlist_t *listenon = NULL;
if (options != NULL)
@@ -2952,7 +2956,7 @@ load_configuration(const char *filename, ns_server_t *server,
element != NULL;
element = cfg_list_next(element))
{
- cfg_obj_t *vconfig = cfg_listelt_value(element);
+ const cfg_obj_t *vconfig = cfg_listelt_value(element);
view = NULL;
CHECK(create_view(vconfig, &viewlist, &view));
@@ -2992,7 +2996,7 @@ load_configuration(const char *filename, ns_server_t *server,
element != NULL;
element = cfg_list_next(element))
{
- cfg_obj_t *vconfig = cfg_listelt_value(element);
+ const cfg_obj_t *vconfig = cfg_listelt_value(element);
CHECK(create_view(vconfig, &viewlist, &view));
CHECK(configure_view(view, config, vconfig, ns_g_mctx,
&aclconfctx, ISC_FALSE));
@@ -3096,7 +3100,7 @@ load_configuration(const char *filename, ns_server_t *server,
"ignoring config file logging "
"statement due to -g option");
} else {
- cfg_obj_t *logobj = NULL;
+ const cfg_obj_t *logobj = NULL;
isc_logconfig_t *logc = NULL;
CHECKM(isc_logconfig_create(ns_g_lctx, &logc),
@@ -3135,8 +3139,8 @@ load_configuration(const char *filename, ns_server_t *server,
* compatibility.
*/
if (first_time) {
- cfg_obj_t *logobj = NULL;
- cfg_obj_t *categories = NULL;
+ const cfg_obj_t *logobj = NULL;
+ const cfg_obj_t *categories = NULL;
obj = NULL;
if (ns_config_get(maps, "querylog", &obj) == ISC_R_SUCCESS) {
@@ -3148,12 +3152,12 @@ load_configuration(const char *filename, ns_server_t *server,
(void)cfg_map_get(logobj, "category",
&categories);
if (categories != NULL) {
- cfg_listelt_t *element;
+ const cfg_listelt_t *element;
for (element = cfg_list_first(categories);
element != NULL;
element = cfg_list_next(element))
{
- cfg_obj_t *catobj;
+ const cfg_obj_t *catobj;
const char *str;
obj = cfg_listelt_value(element);
@@ -3657,7 +3661,7 @@ end_reserved_dispatches(ns_server_t *server, isc_boolean_t all) {
}
void
-ns_add_reserved_dispatch(ns_server_t *server, isc_sockaddr_t *addr) {
+ns_add_reserved_dispatch(ns_server_t *server, const isc_sockaddr_t *addr) {
ns_dispatch_t *dispatch;
in_port_t port;
char addrbuf[ISC_SOCKADDR_FORMATSIZE];
@@ -4033,12 +4037,12 @@ ns_server_togglequerylog(ns_server_t *server) {
}
static isc_result_t
-ns_listenlist_fromconfig(cfg_obj_t *listenlist, cfg_obj_t *config,
+ns_listenlist_fromconfig(const cfg_obj_t *listenlist, const cfg_obj_t *config,
cfg_aclconfctx_t *actx,
isc_mem_t *mctx, ns_listenlist_t **target)
{
isc_result_t result;
- cfg_listelt_t *element;
+ const cfg_listelt_t *element;
ns_listenlist_t *dlist = NULL;
REQUIRE(target != NULL && *target == NULL);
@@ -4052,7 +4056,7 @@ ns_listenlist_fromconfig(cfg_obj_t *listenlist, cfg_obj_t *config,
element = cfg_list_next(element))
{
ns_listenelt_t *delt = NULL;
- cfg_obj_t *listener = cfg_listelt_value(element);
+ const cfg_obj_t *listener = cfg_listelt_value(element);
result = ns_listenelt_fromconfig(listener, config, actx,
mctx, &delt);
if (result != ISC_R_SUCCESS)
@@ -4072,12 +4076,12 @@ ns_listenlist_fromconfig(cfg_obj_t *listenlist, cfg_obj_t *config,
* data structure.
*/
static isc_result_t
-ns_listenelt_fromconfig(cfg_obj_t *listener, cfg_obj_t *config,
+ns_listenelt_fromconfig(const cfg_obj_t *listener, const cfg_obj_t *config,
cfg_aclconfctx_t *actx,
isc_mem_t *mctx, ns_listenelt_t **target)
{
isc_result_t result;
- cfg_obj_t *portobj;
+ const cfg_obj_t *portobj;
in_port_t port;
ns_listenelt_t *delt = NULL;
REQUIRE(target != NULL && *target == NULL);
diff --git a/bin/named/sortlist.c b/bin/named/sortlist.c
index 09c33f4a94..72267e78c2 100644
--- a/bin/named/sortlist.c
+++ b/bin/named/sortlist.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: sortlist.c,v 1.11 2005/04/29 00:22:29 marka Exp $ */
+/* $Id: sortlist.c,v 1.12 2006/02/28 02:39:51 marka Exp $ */
/*! \file */
@@ -32,7 +32,9 @@
#include
ns_sortlisttype_t
-ns_sortlist_setup(dns_acl_t *acl, isc_netaddr_t *clientaddr, void **argp) {
+ns_sortlist_setup(dns_acl_t *acl, isc_netaddr_t *clientaddr,
+ const void **argp)
+{
unsigned int i;
if (acl == NULL)
@@ -46,7 +48,7 @@ ns_sortlist_setup(dns_acl_t *acl, isc_netaddr_t *clientaddr, void **argp) {
dns_aclelement_t *e = &acl->elements[i];
dns_aclelement_t *try_elt;
dns_aclelement_t *order_elt = NULL;
- dns_aclelement_t *matched_elt = NULL;
+ const dns_aclelement_t *matched_elt = NULL;
if (e->type == dns_aclelementtype_nestedacl) {
dns_acl_t *inner = e->u.nestedacl;
@@ -108,8 +110,8 @@ ns_sortlist_setup(dns_acl_t *acl, isc_netaddr_t *clientaddr, void **argp) {
}
int
-ns_sortlist_addrorder2(isc_netaddr_t *addr, void *arg) {
- dns_acl_t *sortacl = (dns_acl_t *) arg;
+ns_sortlist_addrorder2(const isc_netaddr_t *addr, const void *arg) {
+ const dns_acl_t *sortacl = (const dns_acl_t *) arg;
int match;
(void)dns_acl_match(addr, NULL, sortacl,
@@ -124,8 +126,8 @@ ns_sortlist_addrorder2(isc_netaddr_t *addr, void *arg) {
}
int
-ns_sortlist_addrorder1(isc_netaddr_t *addr, void *arg) {
- dns_aclelement_t *matchelt = (dns_aclelement_t *) arg;
+ns_sortlist_addrorder1(const isc_netaddr_t *addr, const void *arg) {
+ const dns_aclelement_t *matchelt = (const dns_aclelement_t *) arg;
if (dns_aclelement_match(addr, NULL, matchelt,
&ns_g_server->aclenv,
NULL)) {
@@ -138,7 +140,7 @@ ns_sortlist_addrorder1(isc_netaddr_t *addr, void *arg) {
void
ns_sortlist_byaddrsetup(dns_acl_t *sortlist_acl, isc_netaddr_t *client_addr,
dns_addressorderfunc_t *orderp,
- void **argp)
+ const void **argp)
{
ns_sortlisttype_t sortlisttype;
diff --git a/bin/named/tkeyconf.c b/bin/named/tkeyconf.c
index f7dd5dd247..f4039c17b9 100644
--- a/bin/named/tkeyconf.c
+++ b/bin/named/tkeyconf.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: tkeyconf.c,v 1.24 2005/08/23 02:36:07 marka Exp $ */
+/* $Id: tkeyconf.c,v 1.25 2006/02/28 02:39:51 marka Exp $ */
/*! \file */
@@ -44,8 +44,8 @@
isc_result_t
-ns_tkeyctx_fromconfig(cfg_obj_t *options, isc_mem_t *mctx, isc_entropy_t *ectx,
- dns_tkeyctx_t **tctxp)
+ns_tkeyctx_fromconfig(const cfg_obj_t *options, isc_mem_t *mctx,
+ isc_entropy_t *ectx, dns_tkeyctx_t **tctxp)
{
isc_result_t result;
dns_tkeyctx_t *tctx = NULL;
@@ -54,7 +54,7 @@ ns_tkeyctx_fromconfig(cfg_obj_t *options, isc_mem_t *mctx, isc_entropy_t *ectx,
dns_fixedname_t fname;
dns_name_t *name;
isc_buffer_t b;
- cfg_obj_t *obj;
+ const cfg_obj_t *obj;
int type;
result = dns_tkeyctx_create(mctx, ectx, &tctx);
diff --git a/bin/named/tsigconf.c b/bin/named/tsigconf.c
index 830dc78553..37142e1ec5 100644
--- a/bin/named/tsigconf.c
+++ b/bin/named/tsigconf.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: tsigconf.c,v 1.27 2006/01/27 23:57:46 marka Exp $ */
+/* $Id: tsigconf.c,v 1.28 2006/02/28 02:39:51 marka Exp $ */
/*! \file */
@@ -37,10 +37,12 @@
#include
static isc_result_t
-add_initial_keys(cfg_obj_t *list, dns_tsig_keyring_t *ring, isc_mem_t *mctx) {
+add_initial_keys(const cfg_obj_t *list, dns_tsig_keyring_t *ring,
+ isc_mem_t *mctx)
+{
dns_tsigkey_t *tsigkey = NULL;
- cfg_listelt_t *element;
- cfg_obj_t *key = NULL;
+ const cfg_listelt_t *element;
+ const cfg_obj_t *key = NULL;
const char *keyid = NULL;
unsigned char *secret = NULL;
int secretalloc = 0;
@@ -53,8 +55,8 @@ add_initial_keys(cfg_obj_t *list, dns_tsig_keyring_t *ring, isc_mem_t *mctx) {
element != NULL;
element = cfg_list_next(element))
{
- cfg_obj_t *algobj = NULL;
- cfg_obj_t *secretobj = NULL;
+ const cfg_obj_t *algobj = NULL;
+ const cfg_obj_t *secretobj = NULL;
dns_name_t keyname;
dns_name_t *alg;
const char *algstr;
@@ -138,11 +140,11 @@ add_initial_keys(cfg_obj_t *list, dns_tsig_keyring_t *ring, isc_mem_t *mctx) {
}
isc_result_t
-ns_tsigkeyring_fromconfig(cfg_obj_t *config, cfg_obj_t *vconfig,
+ns_tsigkeyring_fromconfig(const cfg_obj_t *config, const cfg_obj_t *vconfig,
isc_mem_t *mctx, dns_tsig_keyring_t **ringp)
{
- cfg_obj_t *maps[3];
- cfg_obj_t *keylist;
+ const cfg_obj_t *maps[3];
+ const cfg_obj_t *keylist;
dns_tsig_keyring_t *ring = NULL;
isc_result_t result;
int i;
diff --git a/bin/named/zoneconf.c b/bin/named/zoneconf.c
index 8594d133a4..ad1f6c1823 100644
--- a/bin/named/zoneconf.c
+++ b/bin/named/zoneconf.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: zoneconf.c,v 1.130 2006/02/16 01:34:24 marka Exp $ */
+/* $Id: zoneconf.c,v 1.131 2006/02/28 02:39:51 marka Exp $ */
/*% */
@@ -58,15 +58,15 @@
* Convenience function for configuring a single zone ACL.
*/
static isc_result_t
-configure_zone_acl(cfg_obj_t *zconfig, cfg_obj_t *vconfig, cfg_obj_t *config,
- const char *aclname, cfg_aclconfctx_t *actx,
- dns_zone_t *zone,
+configure_zone_acl(const cfg_obj_t *zconfig, const cfg_obj_t *vconfig,
+ const cfg_obj_t *config, const char *aclname,
+ cfg_aclconfctx_t *actx, dns_zone_t *zone,
void (*setzacl)(dns_zone_t *, dns_acl_t *),
void (*clearzacl)(dns_zone_t *))
{
isc_result_t result;
- cfg_obj_t *maps[4];
- cfg_obj_t *aclobj = NULL;
+ const cfg_obj_t *maps[4];
+ const cfg_obj_t *aclobj = NULL;
int i = 0;
dns_acl_t *dacl = NULL;
@@ -75,7 +75,7 @@ configure_zone_acl(cfg_obj_t *zconfig, cfg_obj_t *vconfig, cfg_obj_t *config,
if (vconfig != NULL)
maps[i++] = cfg_tuple_get(vconfig, "options");
if (config != NULL) {
- cfg_obj_t *options = NULL;
+ const cfg_obj_t *options = NULL;
(void)cfg_map_get(config, "options", &options);
if (options != NULL)
maps[i++] = options;
@@ -101,9 +101,9 @@ configure_zone_acl(cfg_obj_t *zconfig, cfg_obj_t *vconfig, cfg_obj_t *config,
* Parse the zone update-policy statement.
*/
static isc_result_t
-configure_zone_ssutable(cfg_obj_t *zconfig, dns_zone_t *zone) {
- cfg_obj_t *updatepolicy = NULL;
- cfg_listelt_t *element, *element2;
+configure_zone_ssutable(const cfg_obj_t *zconfig, dns_zone_t *zone) {
+ const cfg_obj_t *updatepolicy = NULL;
+ const cfg_listelt_t *element, *element2;
dns_ssutable_t *table = NULL;
isc_mem_t *mctx = dns_zone_getmctx(zone);
isc_result_t result;
@@ -122,12 +122,12 @@ configure_zone_ssutable(cfg_obj_t *zconfig, dns_zone_t *zone) {
element != NULL;
element = cfg_list_next(element))
{
- cfg_obj_t *stmt = cfg_listelt_value(element);
- cfg_obj_t *mode = cfg_tuple_get(stmt, "mode");
- cfg_obj_t *identity = cfg_tuple_get(stmt, "identity");
- cfg_obj_t *matchtype = cfg_tuple_get(stmt, "matchtype");
- cfg_obj_t *dname = cfg_tuple_get(stmt, "name");
- cfg_obj_t *typelist = cfg_tuple_get(stmt, "types");
+ const cfg_obj_t *stmt = cfg_listelt_value(element);
+ const cfg_obj_t *mode = cfg_tuple_get(stmt, "mode");
+ const cfg_obj_t *identity = cfg_tuple_get(stmt, "identity");
+ const cfg_obj_t *matchtype = cfg_tuple_get(stmt, "matchtype");
+ const cfg_obj_t *dname = cfg_tuple_get(stmt, "name");
+ const cfg_obj_t *typelist = cfg_tuple_get(stmt, "types");
const char *str;
isc_boolean_t grant = ISC_FALSE;
unsigned int mtype = DNS_SSUMATCHTYPE_NAME;
@@ -200,7 +200,7 @@ configure_zone_ssutable(cfg_obj_t *zconfig, dns_zone_t *zone) {
element2 != NULL;
element2 = cfg_list_next(element2))
{
- cfg_obj_t *typeobj;
+ const cfg_obj_t *typeobj;
isc_textregion_t r;
INSIST(i < n);
@@ -246,8 +246,8 @@ configure_zone_ssutable(cfg_obj_t *zconfig, dns_zone_t *zone) {
* Convert a config file zone type into a server zone type.
*/
static inline dns_zonetype_t
-zonetype_fromconfig(cfg_obj_t *map) {
- cfg_obj_t *obj = NULL;
+zonetype_fromconfig(const cfg_obj_t *map) {
+ const cfg_obj_t *obj = NULL;
isc_result_t result;
result = cfg_map_get(map, "type", &obj);
@@ -302,7 +302,9 @@ strtoargv(isc_mem_t *mctx, char *s, unsigned int *argcp, char ***argvp) {
}
static void
-checknames(dns_zonetype_t ztype, cfg_obj_t **maps, cfg_obj_t **objp) {
+checknames(dns_zonetype_t ztype, const cfg_obj_t **maps,
+ const cfg_obj_t **objp)
+{
const char *zone = NULL;
isc_result_t result;
@@ -317,17 +319,18 @@ checknames(dns_zonetype_t ztype, cfg_obj_t **maps, cfg_obj_t **objp) {
}
isc_result_t
-ns_zone_configure(cfg_obj_t *config, cfg_obj_t *vconfig, cfg_obj_t *zconfig,
- cfg_aclconfctx_t *ac, dns_zone_t *zone)
+ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
+ const cfg_obj_t *zconfig, cfg_aclconfctx_t *ac,
+ dns_zone_t *zone)
{
isc_result_t result;
const char *zname;
dns_rdataclass_t zclass;
dns_rdataclass_t vclass;
- cfg_obj_t *maps[5];
- cfg_obj_t *zoptions = NULL;
- cfg_obj_t *options = NULL;
- cfg_obj_t *obj;
+ const cfg_obj_t *maps[5];
+ const cfg_obj_t *zoptions = NULL;
+ const cfg_obj_t *options = NULL;
+ const cfg_obj_t *obj;
const char *filename = NULL;
dns_notifytype_t notifytype = dns_notifytype_yes;
isc_sockaddr_t *addrs;
@@ -876,9 +879,9 @@ ns_zone_configure(cfg_obj_t *config, cfg_obj_t *vconfig, cfg_obj_t *zconfig,
}
isc_boolean_t
-ns_zone_reusable(dns_zone_t *zone, cfg_obj_t *zconfig) {
- cfg_obj_t *zoptions = NULL;
- cfg_obj_t *obj = NULL;
+ns_zone_reusable(dns_zone_t *zone, const cfg_obj_t *zconfig) {
+ const cfg_obj_t *zoptions = NULL;
+ const cfg_obj_t *obj = NULL;
const char *cfilename;
const char *zfilename;
diff --git a/bin/rndc/rndc.c b/bin/rndc/rndc.c
index ee01bcc05d..b0c4a3542b 100644
--- a/bin/rndc/rndc.c
+++ b/bin/rndc/rndc.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: rndc.c,v 1.108 2005/09/19 00:18:00 marka Exp $ */
+/* $Id: rndc.c,v 1.109 2006/02/28 02:39:51 marka Exp $ */
/*! \file */
@@ -415,25 +415,25 @@ parse_config(isc_mem_t *mctx, isc_log_t *log, const char *keyname,
{
isc_result_t result;
const char *conffile = admin_conffile;
- cfg_obj_t *addresses = NULL;
- cfg_obj_t *defkey = NULL;
- cfg_obj_t *options = NULL;
- cfg_obj_t *servers = NULL;
- cfg_obj_t *server = NULL;
- cfg_obj_t *keys = NULL;
- cfg_obj_t *key = NULL;
- cfg_obj_t *defport = NULL;
- cfg_obj_t *secretobj = NULL;
- cfg_obj_t *algorithmobj = NULL;
+ const cfg_obj_t *addresses = NULL;
+ const cfg_obj_t *defkey = NULL;
+ const cfg_obj_t *options = NULL;
+ const cfg_obj_t *servers = NULL;
+ const cfg_obj_t *server = NULL;
+ const cfg_obj_t *keys = NULL;
+ const cfg_obj_t *key = NULL;
+ const cfg_obj_t *defport = NULL;
+ const cfg_obj_t *secretobj = NULL;
+ const cfg_obj_t *algorithmobj = NULL;
cfg_obj_t *config = NULL;
- cfg_obj_t *address = NULL;
- cfg_listelt_t *elt;
+ const cfg_obj_t *address = NULL;
+ const cfg_listelt_t *elt;
const char *secretstr;
const char *algorithm;
static char secretarray[1024];
const cfg_type_t *conftype = &cfg_type_rndcconf;
isc_boolean_t key_only = ISC_FALSE;
- cfg_listelt_t *element;
+ const cfg_listelt_t *element;
if (! isc_file_exists(conffile)) {
conffile = admin_keyfile;
@@ -460,7 +460,7 @@ parse_config(isc_mem_t *mctx, isc_log_t *log, const char *keyname,
if (key_only && servername == NULL)
servername = "127.0.0.1";
else if (servername == NULL && options != NULL) {
- cfg_obj_t *defserverobj = NULL;
+ const cfg_obj_t *defserverobj = NULL;
(void)cfg_map_get(options, "default-server", &defserverobj);
if (defserverobj != NULL)
servername = cfg_obj_asstring(defserverobj);
@@ -570,7 +570,7 @@ parse_config(isc_mem_t *mctx, isc_log_t *log, const char *keyname,
if (!cfg_obj_issockaddr(address)) {
unsigned int myport;
const char *name;
- cfg_obj_t *obj;
+ const cfg_obj_t *obj;
obj = cfg_tuple_get(address, "name");
name = cfg_obj_asstring(obj);
diff --git a/lib/bind9/check.c b/lib/bind9/check.c
index b94cdaa65e..32a65d6101 100644
--- a/lib/bind9/check.c
+++ b/lib/bind9/check.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: check.c,v 1.69 2006/02/17 00:24:20 marka Exp $ */
+/* $Id: check.c,v 1.70 2006/02/28 02:39:51 marka Exp $ */
/*! \file */
@@ -54,12 +54,12 @@ freekey(char *key, unsigned int type, isc_symvalue_t value, void *userarg) {
}
static isc_result_t
-check_orderent(cfg_obj_t *ent, isc_log_t *logctx) {
+check_orderent(const cfg_obj_t *ent, isc_log_t *logctx) {
isc_result_t result = ISC_R_SUCCESS;
isc_result_t tresult;
isc_textregion_t r;
dns_fixedname_t fixed;
- cfg_obj_t *obj;
+ const cfg_obj_t *obj;
dns_rdataclass_t rdclass;
dns_rdatatype_t rdtype;
isc_buffer_t b;
@@ -136,11 +136,11 @@ check_orderent(cfg_obj_t *ent, isc_log_t *logctx) {
}
static isc_result_t
-check_order(cfg_obj_t *options, isc_log_t *logctx) {
+check_order(const cfg_obj_t *options, isc_log_t *logctx) {
isc_result_t result = ISC_R_SUCCESS;
isc_result_t tresult;
- cfg_listelt_t *element;
- cfg_obj_t *obj = NULL;
+ const cfg_listelt_t *element;
+ const cfg_obj_t *obj = NULL;
if (cfg_map_get(options, "rrset-order", &obj) != ISC_R_SUCCESS)
return (result);
@@ -157,11 +157,11 @@ check_order(cfg_obj_t *options, isc_log_t *logctx) {
}
static isc_result_t
-check_dual_stack(cfg_obj_t *options, isc_log_t *logctx) {
- cfg_listelt_t *element;
- cfg_obj_t *alternates = NULL;
- cfg_obj_t *value;
- cfg_obj_t *obj;
+check_dual_stack(const cfg_obj_t *options, isc_log_t *logctx) {
+ const cfg_listelt_t *element;
+ const cfg_obj_t *alternates = NULL;
+ const cfg_obj_t *value;
+ const cfg_obj_t *obj;
const char *str;
dns_fixedname_t fixed;
dns_name_t *name;
@@ -217,9 +217,9 @@ check_dual_stack(cfg_obj_t *options, isc_log_t *logctx) {
}
static isc_result_t
-check_forward(cfg_obj_t *options, isc_log_t *logctx) {
- cfg_obj_t *forward = NULL;
- cfg_obj_t *forwarders = NULL;
+check_forward(const cfg_obj_t *options, isc_log_t *logctx) {
+ const cfg_obj_t *forward = NULL;
+ const cfg_obj_t *forwarders = NULL;
(void)cfg_map_get(options, "forward", &forward);
(void)cfg_map_get(options, "forwarders", &forwarders);
@@ -233,15 +233,15 @@ check_forward(cfg_obj_t *options, isc_log_t *logctx) {
}
static isc_result_t
-disabled_algorithms(cfg_obj_t *disabled, isc_log_t *logctx) {
+disabled_algorithms(const cfg_obj_t *disabled, isc_log_t *logctx) {
isc_result_t result = ISC_R_SUCCESS;
isc_result_t tresult;
- cfg_listelt_t *element;
+ const cfg_listelt_t *element;
const char *str;
isc_buffer_t b;
dns_fixedname_t fixed;
dns_name_t *name;
- cfg_obj_t *obj;
+ const cfg_obj_t *obj;
dns_fixedname_init(&fixed);
name = dns_fixedname_name(&fixed);
@@ -285,8 +285,9 @@ disabled_algorithms(cfg_obj_t *disabled, isc_log_t *logctx) {
}
static isc_result_t
-nameexist(cfg_obj_t *obj, const char *name, int value, isc_symtab_t *symtab,
- const char *fmt, isc_log_t *logctx, isc_mem_t *mctx)
+nameexist(const cfg_obj_t *obj, const char *name, int value,
+ isc_symtab_t *symtab, const char *fmt, isc_log_t *logctx,
+ isc_mem_t *mctx)
{
char *key;
const char *file;
@@ -297,14 +298,14 @@ nameexist(cfg_obj_t *obj, const char *name, int value, isc_symtab_t *symtab,
key = isc_mem_strdup(mctx, name);
if (key == NULL)
return (ISC_R_NOMEMORY);
- symvalue.as_pointer = obj;
+ symvalue.as_cpointer = obj;
result = isc_symtab_define(symtab, key, value, symvalue,
isc_symexists_reject);
if (result == ISC_R_EXISTS) {
RUNTIME_CHECK(isc_symtab_lookup(symtab, key, value,
&symvalue) == ISC_R_SUCCESS);
- file = cfg_obj_file(symvalue.as_pointer);
- line = cfg_obj_line(symvalue.as_pointer);
+ file = cfg_obj_file(symvalue.as_cpointer);
+ line = cfg_obj_line(symvalue.as_cpointer);
if (file == NULL)
file = "";
@@ -318,10 +319,10 @@ nameexist(cfg_obj_t *obj, const char *name, int value, isc_symtab_t *symtab,
}
static isc_result_t
-mustbesecure(cfg_obj_t *secure, isc_symtab_t *symtab, isc_log_t *logctx,
+mustbesecure(const cfg_obj_t *secure, isc_symtab_t *symtab, isc_log_t *logctx,
isc_mem_t *mctx)
{
- cfg_obj_t *obj;
+ const cfg_obj_t *obj;
char namebuf[DNS_NAME_FORMATSIZE];
const char *str;
dns_fixedname_t fixed;
@@ -350,13 +351,13 @@ mustbesecure(cfg_obj_t *secure, isc_symtab_t *symtab, isc_log_t *logctx,
}
static isc_result_t
-checkacl(const char *aclname, cfg_aclconfctx_t *actx, cfg_obj_t *zconfig,
- cfg_obj_t *voptions, cfg_obj_t *config, isc_log_t *logctx,
- isc_mem_t *mctx)
+checkacl(const char *aclname, cfg_aclconfctx_t *actx, const cfg_obj_t *zconfig,
+ const cfg_obj_t *voptions, const cfg_obj_t *config,
+ isc_log_t *logctx, isc_mem_t *mctx)
{
isc_result_t result;
- cfg_obj_t *aclobj = NULL;
- cfg_obj_t *options;
+ const cfg_obj_t *aclobj = NULL;
+ const cfg_obj_t *options;
dns_acl_t *acl = NULL;
if (zconfig != NULL) {
@@ -380,8 +381,8 @@ checkacl(const char *aclname, cfg_aclconfctx_t *actx, cfg_obj_t *zconfig,
}
static isc_result_t
-check_viewacls(cfg_aclconfctx_t *actx, cfg_obj_t *voptions, cfg_obj_t *config,
- isc_log_t *logctx, isc_mem_t *mctx)
+check_viewacls(cfg_aclconfctx_t *actx, const cfg_obj_t *voptions,
+ const cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx)
{
isc_result_t result = ISC_R_SUCCESS, tresult;
int i = 0;
@@ -406,12 +407,12 @@ typedef struct {
} intervaltable;
static isc_result_t
-check_options(cfg_obj_t *options, isc_log_t *logctx, isc_mem_t *mctx) {
+check_options(const cfg_obj_t *options, isc_log_t *logctx, isc_mem_t *mctx) {
isc_result_t result = ISC_R_SUCCESS;
isc_result_t tresult;
unsigned int i;
- cfg_obj_t *obj = NULL;
- cfg_listelt_t *element;
+ const cfg_obj_t *obj = NULL;
+ const cfg_listelt_t *element;
isc_symtab_t *symtab = NULL;
dns_fixedname_t fixed;
const char *str;
@@ -470,8 +471,8 @@ check_options(cfg_obj_t *options, isc_log_t *logctx, isc_mem_t *mctx) {
(void)cfg_map_get(options, "root-delegation-only", &obj);
if (obj != NULL) {
if (!cfg_obj_isvoid(obj)) {
- cfg_listelt_t *element;
- cfg_obj_t *exclude;
+ const cfg_listelt_t *element;
+ const cfg_obj_t *exclude;
const char *str;
dns_fixedname_t fixed;
dns_name_t *name;
@@ -666,10 +667,10 @@ check_options(cfg_obj_t *options, isc_log_t *logctx, isc_mem_t *mctx) {
}
static isc_result_t
-get_masters_def(cfg_obj_t *cctx, const char *name, cfg_obj_t **ret) {
+get_masters_def(const cfg_obj_t *cctx, const char *name, const cfg_obj_t **ret) {
isc_result_t result;
- cfg_obj_t *masters = NULL;
- cfg_listelt_t *elt;
+ const cfg_obj_t *masters = NULL;
+ const cfg_listelt_t *elt;
result = cfg_map_get(cctx, "masters", &masters);
if (result != ISC_R_SUCCESS)
@@ -677,7 +678,7 @@ get_masters_def(cfg_obj_t *cctx, const char *name, cfg_obj_t **ret) {
for (elt = cfg_list_first(masters);
elt != NULL;
elt = cfg_list_next(elt)) {
- cfg_obj_t *list;
+ const cfg_obj_t *list;
const char *listname;
list = cfg_listelt_value(elt);
@@ -692,18 +693,18 @@ get_masters_def(cfg_obj_t *cctx, const char *name, cfg_obj_t **ret) {
}
static isc_result_t
-validate_masters(cfg_obj_t *obj, cfg_obj_t *config, isc_uint32_t *countp,
- isc_log_t *logctx, isc_mem_t *mctx)
+validate_masters(const cfg_obj_t *obj, const cfg_obj_t *config,
+ isc_uint32_t *countp, isc_log_t *logctx, isc_mem_t *mctx)
{
isc_result_t result = ISC_R_SUCCESS;
isc_result_t tresult;
isc_uint32_t count = 0;
isc_symtab_t *symtab = NULL;
isc_symvalue_t symvalue;
- cfg_listelt_t *element;
- cfg_listelt_t **stack = NULL;
+ const cfg_listelt_t *element;
+ const cfg_listelt_t **stack = NULL;
isc_uint32_t stackcount = 0, pushed = 0;
- cfg_obj_t *list;
+ const cfg_obj_t *list;
REQUIRE(countp != NULL);
result = isc_symtab_create(mctx, 100, NULL, NULL, ISC_FALSE, &symtab);
@@ -721,8 +722,8 @@ validate_masters(cfg_obj_t *obj, cfg_obj_t *config, isc_uint32_t *countp,
element = cfg_list_next(element))
{
const char *listname;
- cfg_obj_t *addr;
- cfg_obj_t *key;
+ const cfg_obj_t *addr;
+ const cfg_obj_t *key;
addr = cfg_tuple_get(cfg_listelt_value(element),
"masterselement");
@@ -740,7 +741,7 @@ validate_masters(cfg_obj_t *obj, cfg_obj_t *config, isc_uint32_t *countp,
result = ISC_R_FAILURE;
}
listname = cfg_obj_asstring(addr);
- symvalue.as_pointer = addr;
+ symvalue.as_cpointer = addr;
tresult = isc_symtab_define(symtab, listname, 1, symvalue,
isc_symexists_reject);
if (tresult == ISC_R_EXISTS)
@@ -788,11 +789,11 @@ validate_masters(cfg_obj_t *obj, cfg_obj_t *config, isc_uint32_t *countp,
}
static isc_result_t
-check_update_policy(cfg_obj_t *policy, isc_log_t *logctx) {
+check_update_policy(const cfg_obj_t *policy, isc_log_t *logctx) {
isc_result_t result = ISC_R_SUCCESS;
isc_result_t tresult;
- cfg_listelt_t *element;
- cfg_listelt_t *element2;
+ const cfg_listelt_t *element;
+ const cfg_listelt_t *element2;
dns_fixedname_t fixed;
const char *str;
isc_buffer_t b;
@@ -801,11 +802,11 @@ check_update_policy(cfg_obj_t *policy, isc_log_t *logctx) {
element != NULL;
element = cfg_list_next(element))
{
- cfg_obj_t *stmt = cfg_listelt_value(element);
- cfg_obj_t *identity = cfg_tuple_get(stmt, "identity");
- cfg_obj_t *matchtype = cfg_tuple_get(stmt, "matchtype");
- cfg_obj_t *dname = cfg_tuple_get(stmt, "name");
- cfg_obj_t *typelist = cfg_tuple_get(stmt, "types");
+ const cfg_obj_t *stmt = cfg_listelt_value(element);
+ const cfg_obj_t *identity = cfg_tuple_get(stmt, "identity");
+ const cfg_obj_t *matchtype = cfg_tuple_get(stmt, "matchtype");
+ const cfg_obj_t *dname = cfg_tuple_get(stmt, "name");
+ const cfg_obj_t *typelist = cfg_tuple_get(stmt, "types");
dns_fixedname_init(&fixed);
str = cfg_obj_asstring(identity);
@@ -842,7 +843,7 @@ check_update_policy(cfg_obj_t *policy, isc_log_t *logctx) {
element2 != NULL;
element2 = cfg_list_next(element2))
{
- cfg_obj_t *typeobj;
+ const cfg_obj_t *typeobj;
isc_textregion_t r;
dns_rdatatype_t type;
@@ -875,15 +876,16 @@ typedef struct {
} optionstable;
static isc_result_t
-check_zoneconf(cfg_obj_t *zconfig, cfg_obj_t *voptions, cfg_obj_t *config,
- isc_symtab_t *symtab, dns_rdataclass_t defclass,
- cfg_aclconfctx_t *actx, isc_log_t *logctx, isc_mem_t *mctx)
+check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
+ const cfg_obj_t *config, isc_symtab_t *symtab,
+ dns_rdataclass_t defclass, cfg_aclconfctx_t *actx,
+ isc_log_t *logctx, isc_mem_t *mctx)
{
const char *zname;
const char *typestr;
unsigned int ztype;
- cfg_obj_t *zoptions;
- cfg_obj_t *obj = NULL;
+ const cfg_obj_t *zoptions;
+ const cfg_obj_t *obj = NULL;
isc_result_t result = ISC_R_SUCCESS;
isc_result_t tresult;
unsigned int i;
@@ -1107,7 +1109,7 @@ check_zoneconf(cfg_obj_t *zconfig, cfg_obj_t *voptions, cfg_obj_t *config,
* Check the excessively complicated "dialup" option.
*/
if (ztype == MASTERZONE || ztype == SLAVEZONE || ztype == STUBZONE) {
- cfg_obj_t *dialup = NULL;
+ const cfg_obj_t *dialup = NULL;
(void)cfg_map_get(zoptions, "dialup", &dialup);
if (dialup != NULL && cfg_obj_isstring(dialup)) {
const char *str = cfg_obj_asstring(dialup);
@@ -1181,9 +1183,9 @@ typedef struct keyalgorithms {
} algorithmtable;
isc_result_t
-bind9_check_key(cfg_obj_t *key, isc_log_t *logctx) {
- cfg_obj_t *algobj = NULL;
- cfg_obj_t *secretobj = NULL;
+bind9_check_key(const cfg_obj_t *key, isc_log_t *logctx) {
+ const cfg_obj_t *algobj = NULL;
+ const cfg_obj_t *secretobj = NULL;
const char *keyname = cfg_obj_asstring(cfg_map_getname(key));
const char *algorithm;
int i;
@@ -1263,16 +1265,16 @@ bind9_check_key(cfg_obj_t *key, isc_log_t *logctx) {
}
static isc_result_t
-check_keylist(cfg_obj_t *keys, isc_symtab_t *symtab, isc_log_t *logctx) {
+check_keylist(const cfg_obj_t *keys, isc_symtab_t *symtab, isc_log_t *logctx) {
isc_result_t result = ISC_R_SUCCESS;
isc_result_t tresult;
- cfg_listelt_t *element;
+ const cfg_listelt_t *element;
for (element = cfg_list_first(keys);
element != NULL;
element = cfg_list_next(element))
{
- cfg_obj_t *key = cfg_listelt_value(element);
+ const cfg_obj_t *key = cfg_listelt_value(element);
const char *keyname = cfg_obj_asstring(cfg_map_getname(key));
isc_symvalue_t symvalue;
@@ -1280,7 +1282,7 @@ check_keylist(cfg_obj_t *keys, isc_symtab_t *symtab, isc_log_t *logctx) {
if (tresult != ISC_R_SUCCESS)
return (tresult);
- symvalue.as_pointer = key;
+ symvalue.as_cpointer = key;
tresult = isc_symtab_define(symtab, keyname, 1,
symvalue, isc_symexists_reject);
if (tresult == ISC_R_EXISTS) {
@@ -1289,8 +1291,8 @@ check_keylist(cfg_obj_t *keys, isc_symtab_t *symtab, isc_log_t *logctx) {
RUNTIME_CHECK(isc_symtab_lookup(symtab, keyname,
1, &symvalue) == ISC_R_SUCCESS);
- file = cfg_obj_file(symvalue.as_pointer);
- line = cfg_obj_line(symvalue.as_pointer);
+ file = cfg_obj_file(symvalue.as_cpointer);
+ line = cfg_obj_line(symvalue.as_cpointer);
if (file == NULL)
file = "";
@@ -1316,14 +1318,14 @@ static struct {
};
static isc_result_t
-check_servers(cfg_obj_t *servers, isc_log_t *logctx) {
+check_servers(const cfg_obj_t *servers, isc_log_t *logctx) {
isc_result_t result = ISC_R_SUCCESS;
isc_result_t tresult;
- cfg_listelt_t *e1, *e2;
- cfg_obj_t *v1, *v2;
+ const cfg_listelt_t *e1, *e2;
+ const cfg_obj_t *v1, *v2;
isc_netaddr_t n1, n2;
unsigned int p1, p2;
- cfg_obj_t *obj;
+ const cfg_obj_t *obj;
char buf[ISC_NETADDR_FORMATSIZE];
const char *xfr;
int source;
@@ -1383,13 +1385,13 @@ check_servers(cfg_obj_t *servers, isc_log_t *logctx) {
}
static isc_result_t
-check_viewconf(cfg_obj_t *config, cfg_obj_t *voptions, dns_rdataclass_t vclass,
- isc_log_t *logctx, isc_mem_t *mctx)
+check_viewconf(const cfg_obj_t *config, const cfg_obj_t *voptions,
+ dns_rdataclass_t vclass, isc_log_t *logctx, isc_mem_t *mctx)
{
- cfg_obj_t *servers = NULL;
- cfg_obj_t *zones = NULL;
- cfg_obj_t *keys = NULL;
- cfg_listelt_t *element;
+ const cfg_obj_t *servers = NULL;
+ const cfg_obj_t *zones = NULL;
+ const cfg_obj_t *keys = NULL;
+ const cfg_listelt_t *element;
isc_symtab_t *symtab = NULL;
isc_result_t result = ISC_R_SUCCESS;
isc_result_t tresult = ISC_R_SUCCESS;
@@ -1416,7 +1418,7 @@ check_viewconf(cfg_obj_t *config, cfg_obj_t *voptions, dns_rdataclass_t vclass,
element = cfg_list_next(element))
{
isc_result_t tresult;
- cfg_obj_t *zone = cfg_listelt_value(element);
+ const cfg_obj_t *zone = cfg_listelt_value(element);
tresult = check_zoneconf(zone, voptions, config, symtab,
vclass, &actx, logctx, mctx);
@@ -1461,7 +1463,7 @@ check_viewconf(cfg_obj_t *config, cfg_obj_t *voptions, dns_rdataclass_t vclass,
* Check that forwarding is reasonable.
*/
if (voptions == NULL) {
- cfg_obj_t *options = NULL;
+ const cfg_obj_t *options = NULL;
(void)cfg_map_get(config, "options", &options);
if (options != NULL)
if (check_forward(options, logctx) != ISC_R_SUCCESS)
@@ -1474,7 +1476,7 @@ check_viewconf(cfg_obj_t *config, cfg_obj_t *voptions, dns_rdataclass_t vclass,
* Check that dual-stack-servers is reasonable.
*/
if (voptions == NULL) {
- cfg_obj_t *options = NULL;
+ const cfg_obj_t *options = NULL;
(void)cfg_map_get(config, "options", &options);
if (options != NULL)
if (check_dual_stack(options, logctx) != ISC_R_SUCCESS)
@@ -1525,20 +1527,22 @@ default_channels[] = {
};
static isc_result_t
-bind9_check_logging(cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx) {
- cfg_obj_t *categories = NULL;
- cfg_obj_t *category;
- cfg_obj_t *channels = NULL;
- cfg_obj_t *channel;
- cfg_listelt_t *element;
- cfg_listelt_t *delement;
+bind9_check_logging(const cfg_obj_t *config, isc_log_t *logctx,
+ isc_mem_t *mctx)
+{
+ const cfg_obj_t *categories = NULL;
+ const cfg_obj_t *category;
+ const cfg_obj_t *channels = NULL;
+ const cfg_obj_t *channel;
+ const cfg_listelt_t *element;
+ const cfg_listelt_t *delement;
const char *channelname;
const char *catname;
- cfg_obj_t *fileobj = NULL;
- cfg_obj_t *syslogobj = NULL;
- cfg_obj_t *nullobj = NULL;
- cfg_obj_t *stderrobj = NULL;
- cfg_obj_t *logobj = NULL;
+ const cfg_obj_t *fileobj = NULL;
+ const cfg_obj_t *syslogobj = NULL;
+ const cfg_obj_t *nullobj = NULL;
+ const cfg_obj_t *stderrobj = NULL;
+ const cfg_obj_t *logobj = NULL;
isc_result_t result = ISC_R_SUCCESS;
isc_result_t tresult;
isc_symtab_t *symtab = NULL;
@@ -1553,7 +1557,7 @@ bind9_check_logging(cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx) {
if (result != ISC_R_SUCCESS)
return (result);
- symvalue.as_pointer = NULL;
+ symvalue.as_cpointer = NULL;
for (i = 0; default_channels[i] != NULL; i++) {
tresult = isc_symtab_define(symtab, default_channels[i], 1,
symvalue, isc_symexists_replace);
@@ -1631,10 +1635,10 @@ bind9_check_logging(cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx) {
}
static isc_result_t
-key_exists(cfg_obj_t *keylist, const char *keyname) {
- cfg_listelt_t *element;
+key_exists(const cfg_obj_t *keylist, const char *keyname) {
+ const cfg_listelt_t *element;
const char *str;
- cfg_obj_t *obj;
+ const cfg_obj_t *obj;
if (keylist == NULL)
return (ISC_R_NOTFOUND);
@@ -1651,13 +1655,13 @@ key_exists(cfg_obj_t *keylist, const char *keyname) {
}
static isc_result_t
-bind9_check_controlskeys(cfg_obj_t *control, cfg_obj_t *keylist,
+bind9_check_controlskeys(const cfg_obj_t *control, const cfg_obj_t *keylist,
isc_log_t *logctx)
{
isc_result_t result = ISC_R_SUCCESS, tresult;
- cfg_obj_t *control_keylist;
- cfg_listelt_t *element;
- cfg_obj_t *key;
+ const cfg_obj_t *control_keylist;
+ const cfg_listelt_t *element;
+ const cfg_obj_t *key;
control_keylist = cfg_tuple_get(control, "keys");
if (cfg_obj_isvoid(control_keylist))
@@ -1679,17 +1683,19 @@ bind9_check_controlskeys(cfg_obj_t *control, cfg_obj_t *keylist,
}
static isc_result_t
-bind9_check_controls(cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx) {
+bind9_check_controls(const cfg_obj_t *config, isc_log_t *logctx,
+ isc_mem_t *mctx)
+{
isc_result_t result = ISC_R_SUCCESS, tresult;
cfg_aclconfctx_t actx;
- cfg_listelt_t *element, *element2;
- cfg_obj_t *allow;
- cfg_obj_t *control;
- cfg_obj_t *controls;
- cfg_obj_t *controlslist = NULL;
- cfg_obj_t *inetcontrols;
- cfg_obj_t *unixcontrols;
- cfg_obj_t *keylist = NULL;
+ const cfg_listelt_t *element, *element2;
+ const cfg_obj_t *allow;
+ const cfg_obj_t *control;
+ const cfg_obj_t *controls;
+ const cfg_obj_t *controlslist = NULL;
+ const cfg_obj_t *inetcontrols;
+ const cfg_obj_t *unixcontrols;
+ const cfg_obj_t *keylist = NULL;
const char *path;
isc_uint32_t perm, mask;
dns_acl_t *acl = NULL;
@@ -1774,14 +1780,16 @@ bind9_check_controls(cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx) {
}
isc_result_t
-bind9_check_namedconf(cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx) {
- cfg_obj_t *options = NULL;
- cfg_obj_t *servers = NULL;
- cfg_obj_t *views = NULL;
- cfg_obj_t *acls = NULL;
- cfg_obj_t *kals = NULL;
- cfg_obj_t *obj;
- cfg_listelt_t *velement;
+bind9_check_namedconf(const cfg_obj_t *config, isc_log_t *logctx,
+ isc_mem_t *mctx)
+{
+ const cfg_obj_t *options = NULL;
+ const cfg_obj_t *servers = NULL;
+ const cfg_obj_t *views = NULL;
+ const cfg_obj_t *acls = NULL;
+ const cfg_obj_t *kals = NULL;
+ const cfg_obj_t *obj;
+ const cfg_listelt_t *velement;
isc_result_t result = ISC_R_SUCCESS;
isc_result_t tresult;
isc_symtab_t *symtab = NULL;
@@ -1821,7 +1829,7 @@ bind9_check_namedconf(cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx) {
logctx, mctx) != ISC_R_SUCCESS)
result = ISC_R_FAILURE;
} else {
- cfg_obj_t *zones = NULL;
+ const cfg_obj_t *zones = NULL;
(void)cfg_map_get(config, "zone", &zones);
if (zones != NULL) {
@@ -1839,10 +1847,10 @@ bind9_check_namedconf(cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx) {
velement != NULL;
velement = cfg_list_next(velement))
{
- cfg_obj_t *view = cfg_listelt_value(velement);
- cfg_obj_t *vname = cfg_tuple_get(view, "name");
- cfg_obj_t *voptions = cfg_tuple_get(view, "options");
- cfg_obj_t *vclassobj = cfg_tuple_get(view, "class");
+ const cfg_obj_t *view = cfg_listelt_value(velement);
+ const cfg_obj_t *vname = cfg_tuple_get(view, "name");
+ const cfg_obj_t *voptions = cfg_tuple_get(view, "options");
+ const cfg_obj_t *vclassobj = cfg_tuple_get(view, "class");
dns_rdataclass_t vclass = dns_rdataclass_in;
isc_result_t tresult = ISC_R_SUCCESS;
const char *key = cfg_obj_asstring(vname);
@@ -1860,7 +1868,7 @@ bind9_check_namedconf(cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx) {
cfg_obj_asstring(vname), r.base);
}
if (tresult == ISC_R_SUCCESS && symtab != NULL) {
- symvalue.as_pointer = view;
+ symvalue.as_cpointer = view;
tresult = isc_symtab_define(symtab, key, vclass,
symvalue,
isc_symexists_reject);
@@ -1869,8 +1877,8 @@ bind9_check_namedconf(cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx) {
unsigned int line;
RUNTIME_CHECK(isc_symtab_lookup(symtab, key,
vclass, &symvalue) == ISC_R_SUCCESS);
- file = cfg_obj_file(symvalue.as_pointer);
- line = cfg_obj_line(symvalue.as_pointer);
+ file = cfg_obj_file(symvalue.as_cpointer);
+ line = cfg_obj_line(symvalue.as_cpointer);
cfg_obj_log(view, logctx, ISC_LOG_ERROR,
"view '%s': already exists "
"previous definition: %s:%u",
@@ -1910,14 +1918,14 @@ bind9_check_namedconf(cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx) {
tresult = cfg_map_get(config, "acl", &acls);
if (tresult == ISC_R_SUCCESS) {
- cfg_listelt_t *elt;
- cfg_listelt_t *elt2;
+ const cfg_listelt_t *elt;
+ const cfg_listelt_t *elt2;
const char *aclname;
for (elt = cfg_list_first(acls);
elt != NULL;
elt = cfg_list_next(elt)) {
- cfg_obj_t *acl = cfg_listelt_value(elt);
+ const cfg_obj_t *acl = cfg_listelt_value(elt);
unsigned int i;
aclname = cfg_obj_asstring(cfg_tuple_get(acl, "name"));
@@ -1936,7 +1944,7 @@ bind9_check_namedconf(cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx) {
for (elt2 = cfg_list_next(elt);
elt2 != NULL;
elt2 = cfg_list_next(elt2)) {
- cfg_obj_t *acl2 = cfg_listelt_value(elt2);
+ const cfg_obj_t *acl2 = cfg_listelt_value(elt2);
const char *name;
name = cfg_obj_asstring(cfg_tuple_get(acl2,
"name"));
@@ -1960,21 +1968,21 @@ bind9_check_namedconf(cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx) {
tresult = cfg_map_get(config, "kal", &kals);
if (tresult == ISC_R_SUCCESS) {
- cfg_listelt_t *elt;
- cfg_listelt_t *elt2;
+ const cfg_listelt_t *elt;
+ const cfg_listelt_t *elt2;
const char *aclname;
for (elt = cfg_list_first(kals);
elt != NULL;
elt = cfg_list_next(elt)) {
- cfg_obj_t *acl = cfg_listelt_value(elt);
+ const cfg_obj_t *acl = cfg_listelt_value(elt);
aclname = cfg_obj_asstring(cfg_tuple_get(acl, "name"));
for (elt2 = cfg_list_next(elt);
elt2 != NULL;
elt2 = cfg_list_next(elt2)) {
- cfg_obj_t *acl2 = cfg_listelt_value(elt2);
+ const cfg_obj_t *acl2 = cfg_listelt_value(elt2);
const char *name;
name = cfg_obj_asstring(cfg_tuple_get(acl2,
"name"));
diff --git a/lib/bind9/include/bind9/check.h b/lib/bind9/include/bind9/check.h
index 5f9ed3e7b3..4a56724eb4 100644
--- a/lib/bind9/include/bind9/check.h
+++ b/lib/bind9/include/bind9/check.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: check.h,v 1.4 2005/04/29 00:22:42 marka Exp $ */
+/* $Id: check.h,v 1.5 2006/02/28 02:39:51 marka Exp $ */
#ifndef BIND9_CHECK_H
#define BIND9_CHECK_H 1
@@ -30,7 +30,8 @@
ISC_LANG_BEGINDECLS
isc_result_t
-bind9_check_namedconf(cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx);
+bind9_check_namedconf(const cfg_obj_t *config, isc_log_t *logctx,
+ isc_mem_t *mctx);
/*%<
* Check the syntactic validity of a configuration parse tree generated from
* a named.conf file.
@@ -46,7 +47,7 @@ bind9_check_namedconf(cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx);
*/
isc_result_t
-bind9_check_key(cfg_obj_t *config, isc_log_t *logctx);
+bind9_check_key(const cfg_obj_t *config, isc_log_t *logctx);
/*%<
* Same as bind9_check_namedconf(), but for a single 'key' statement.
*/
diff --git a/lib/dns/acl.c b/lib/dns/acl.c
index cfc3714681..907a531079 100644
--- a/lib/dns/acl.c
+++ b/lib/dns/acl.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: acl.c,v 1.28 2005/07/12 01:00:14 marka Exp $ */
+/* $Id: acl.c,v 1.29 2006/02/28 02:39:51 marka Exp $ */
/*! \file */
@@ -74,7 +74,7 @@ dns_acl_create(isc_mem_t *mctx, int n, dns_acl_t **target) {
}
isc_result_t
-dns_acl_appendelement(dns_acl_t *acl, dns_aclelement_t *elt) {
+dns_acl_appendelement(dns_acl_t *acl, const dns_aclelement_t *elt) {
if (acl->length + 1 > acl->alloc) {
/*
* Resize the ACL.
@@ -129,12 +129,12 @@ dns_acl_none(isc_mem_t *mctx, dns_acl_t **target) {
}
isc_result_t
-dns_acl_match(isc_netaddr_t *reqaddr,
- dns_name_t *reqsigner,
- dns_acl_t *acl,
- dns_aclenv_t *env,
+dns_acl_match(const isc_netaddr_t *reqaddr,
+ const dns_name_t *reqsigner,
+ const dns_acl_t *acl,
+ const dns_aclenv_t *env,
int *match,
- dns_aclelement_t **matchelt)
+ dns_aclelement_t const**matchelt)
{
unsigned int i;
@@ -156,9 +156,9 @@ dns_acl_match(isc_netaddr_t *reqaddr,
}
isc_result_t
-dns_acl_elementmatch(dns_acl_t *acl,
- dns_aclelement_t *elt,
- dns_aclelement_t **matchelt)
+dns_acl_elementmatch(const dns_acl_t *acl,
+ const dns_aclelement_t *elt,
+ const dns_aclelement_t **matchelt)
{
unsigned int i;
@@ -179,14 +179,14 @@ dns_acl_elementmatch(dns_acl_t *acl,
}
isc_boolean_t
-dns_aclelement_match(isc_netaddr_t *reqaddr,
- dns_name_t *reqsigner,
- dns_aclelement_t *e,
- dns_aclenv_t *env,
- dns_aclelement_t **matchelt)
+dns_aclelement_match(const isc_netaddr_t *reqaddr,
+ const dns_name_t *reqsigner,
+ const dns_aclelement_t *e,
+ const dns_aclenv_t *env,
+ const dns_aclelement_t **matchelt)
{
dns_acl_t *inner = NULL;
- isc_netaddr_t *addr;
+ const isc_netaddr_t *addr;
isc_netaddr_t v4addr;
int indirectmatch;
isc_result_t result;
@@ -318,7 +318,7 @@ dns_acl_detach(dns_acl_t **aclp) {
}
isc_boolean_t
-dns_aclelement_equal(dns_aclelement_t *ea, dns_aclelement_t *eb) {
+dns_aclelement_equal(const dns_aclelement_t *ea, const dns_aclelement_t *eb) {
if (ea->type != eb->type)
return (ISC_FALSE);
switch (ea->type) {
@@ -344,7 +344,7 @@ dns_aclelement_equal(dns_aclelement_t *ea, dns_aclelement_t *eb) {
}
isc_boolean_t
-dns_acl_equal(dns_acl_t *a, dns_acl_t *b) {
+dns_acl_equal(const dns_acl_t *a, const dns_acl_t *b) {
unsigned int i;
if (a == b)
return (ISC_TRUE);
@@ -359,7 +359,7 @@ dns_acl_equal(dns_acl_t *a, dns_acl_t *b) {
}
static isc_boolean_t
-is_loopback(dns_aclipprefix_t *p) {
+is_loopback(const dns_aclipprefix_t *p) {
switch (p->address.family) {
case AF_INET:
if (p->prefixlen == 32 &&
@@ -378,7 +378,7 @@ is_loopback(dns_aclipprefix_t *p) {
}
isc_boolean_t
-dns_acl_isinsecure(dns_acl_t *a) {
+dns_acl_isinsecure(const dns_acl_t *a) {
unsigned int i;
for (i = 0; i < a->length; i++) {
dns_aclelement_t *e = &a->elements[i];
diff --git a/lib/dns/compress.c b/lib/dns/compress.c
index 8eed3fc689..07eea1372b 100644
--- a/lib/dns/compress.c
+++ b/lib/dns/compress.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: compress.c,v 1.55 2005/04/27 04:56:45 sra Exp $ */
+/* $Id: compress.c,v 1.56 2006/02/28 02:39:51 marka Exp $ */
/*! \file */
@@ -131,7 +131,7 @@ do { \
* If no match is found return ISC_FALSE.
*/
isc_boolean_t
-dns_compress_findglobal(dns_compress_t *cctx, dns_name_t *name,
+dns_compress_findglobal(dns_compress_t *cctx, const dns_name_t *name,
dns_name_t *prefix, isc_uint16_t *offset)
{
dns_name_t tname, nname;
@@ -186,15 +186,15 @@ dns_compress_findglobal(dns_compress_t *cctx, dns_name_t *name,
}
static inline unsigned int
-name_length(dns_name_t *name) {
+name_length(const dns_name_t *name) {
isc_region_t r;
dns_name_toregion(name, &r);
return (r.length);
}
void
-dns_compress_add(dns_compress_t *cctx, dns_name_t *name, dns_name_t *prefix,
- isc_uint16_t offset)
+dns_compress_add(dns_compress_t *cctx, const dns_name_t *name,
+ const dns_name_t *prefix, isc_uint16_t offset)
{
dns_name_t tname;
unsigned int start;
diff --git a/lib/dns/include/dns/acl.h b/lib/dns/include/dns/acl.h
index 6df26544b2..fe3592fa87 100644
--- a/lib/dns/include/dns/acl.h
+++ b/lib/dns/include/dns/acl.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: acl.h,v 1.24 2005/04/29 00:22:53 marka Exp $ */
+/* $Id: acl.h,v 1.25 2006/02/28 02:39:51 marka Exp $ */
#ifndef DNS_ACL_H
#define DNS_ACL_H 1
@@ -105,7 +105,7 @@ dns_acl_create(isc_mem_t *mctx, int n, dns_acl_t **target);
*/
isc_result_t
-dns_acl_appendelement(dns_acl_t *acl, dns_aclelement_t *elt);
+dns_acl_appendelement(dns_acl_t *acl, const dns_aclelement_t *elt);
/*%<
* Append an element to an existing ACL.
*/
@@ -129,13 +129,13 @@ void
dns_acl_detach(dns_acl_t **aclp);
isc_boolean_t
-dns_aclelement_equal(dns_aclelement_t *ea, dns_aclelement_t *eb);
+dns_aclelement_equal(const dns_aclelement_t *ea, const dns_aclelement_t *eb);
isc_boolean_t
-dns_acl_equal(dns_acl_t *a, dns_acl_t *b);
+dns_acl_equal(const dns_acl_t *a, const dns_acl_t *b);
isc_boolean_t
-dns_acl_isinsecure(dns_acl_t *a);
+dns_acl_isinsecure(const dns_acl_t *a);
/*%<
* Return #ISC_TRUE iff the acl 'a' is considered insecure, that is,
* if it contains IP addresses other than those of the local host.
@@ -155,12 +155,12 @@ void
dns_aclenv_destroy(dns_aclenv_t *env);
isc_result_t
-dns_acl_match(isc_netaddr_t *reqaddr,
- dns_name_t *reqsigner,
- dns_acl_t *acl,
- dns_aclenv_t *env,
+dns_acl_match(const isc_netaddr_t *reqaddr,
+ const dns_name_t *reqsigner,
+ const dns_acl_t *acl,
+ const dns_aclenv_t *env,
int *match,
- dns_aclelement_t **matchelt);
+ const dns_aclelement_t **matchelt);
/*%<
* General, low-level ACL matching. This is expected to
* be useful even for weird stuff like the topology and sortlist statements.
@@ -186,11 +186,11 @@ dns_acl_match(isc_netaddr_t *reqaddr,
*/
isc_boolean_t
-dns_aclelement_match(isc_netaddr_t *reqaddr,
- dns_name_t *reqsigner,
- dns_aclelement_t *e,
- dns_aclenv_t *env,
- dns_aclelement_t **matchelt);
+dns_aclelement_match(const isc_netaddr_t *reqaddr,
+ const dns_name_t *reqsigner,
+ const dns_aclelement_t *e,
+ const dns_aclenv_t *env,
+ const dns_aclelement_t **matchelt);
/*%<
* Like dns_acl_match, but matches against the single ACL element 'e'
* rather than a complete list and returns ISC_TRUE iff it matched.
@@ -201,9 +201,9 @@ dns_aclelement_match(isc_netaddr_t *reqaddr,
*/
isc_result_t
-dns_acl_elementmatch(dns_acl_t *acl,
- dns_aclelement_t *elt,
- dns_aclelement_t **matchelt);
+dns_acl_elementmatch(const dns_acl_t *acl,
+ const dns_aclelement_t *elt,
+ const dns_aclelement_t **matchelt);
/*%<
* Search for an ACL element in 'acl' which is exactly the same as 'elt'.
* If there is one, and 'matchelt' is non NULL, then '*matchelt' will point
diff --git a/lib/dns/include/dns/compress.h b/lib/dns/include/dns/compress.h
index 8f9ecaebe6..e845499683 100644
--- a/lib/dns/include/dns/compress.h
+++ b/lib/dns/include/dns/compress.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: compress.h,v 1.35 2005/04/27 04:56:54 sra Exp $ */
+/* $Id: compress.h,v 1.36 2006/02/28 02:39:51 marka Exp $ */
#ifndef DNS_COMPRESS_H
#define DNS_COMPRESS_H 1
@@ -157,7 +157,7 @@ dns_compress_getedns(dns_compress_t *cctx);
*/
isc_boolean_t
-dns_compress_findglobal(dns_compress_t *cctx, dns_name_t *name,
+dns_compress_findglobal(dns_compress_t *cctx, const dns_name_t *name,
dns_name_t *prefix, isc_uint16_t *offset);
/*%<
* Finds longest possible match of 'name' in the global compression table.
@@ -176,8 +176,8 @@ dns_compress_findglobal(dns_compress_t *cctx, dns_name_t *name,
*/
void
-dns_compress_add(dns_compress_t *cctx, dns_name_t *name, dns_name_t *prefix,
- isc_uint16_t offset);
+dns_compress_add(dns_compress_t *cctx, const dns_name_t *name,
+ const dns_name_t *prefix, isc_uint16_t offset);
/*%<
* Add compression pointers for 'name' to the compression table,
* not replacing existing pointers.
diff --git a/lib/dns/include/dns/message.h b/lib/dns/include/dns/message.h
index 13c1b6b40f..953b14e613 100644
--- a/lib/dns/include/dns/message.h
+++ b/lib/dns/include/dns/message.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: message.h,v 1.118 2006/01/06 00:01:44 marka Exp $ */
+/* $Id: message.h,v 1.119 2006/02/28 02:39:51 marka Exp $ */
#ifndef DNS_MESSAGE_H
#define DNS_MESSAGE_H 1
@@ -240,7 +240,7 @@ struct dns_message {
isc_region_t saved;
dns_rdatasetorderfunc_t order;
- void * order_arg;
+ const void * order_arg;
};
/***
@@ -1283,7 +1283,7 @@ dns_message_getrawmessage(dns_message_t *msg);
void
dns_message_setsortorder(dns_message_t *msg, dns_rdatasetorderfunc_t order,
- void *order_arg);
+ const void *order_arg);
/*%<
* Define the order in which RR sets get rendered by
* dns_message_rendersection() to be the ascending order
diff --git a/lib/dns/include/dns/name.h b/lib/dns/include/dns/name.h
index 0484890e29..bcf508c48d 100644
--- a/lib/dns/include/dns/name.h
+++ b/lib/dns/include/dns/name.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: name.h,v 1.120 2005/10/26 04:35:54 marka Exp $ */
+/* $Id: name.h,v 1.121 2006/02/28 02:39:51 marka Exp $ */
#ifndef DNS_NAME_H
#define DNS_NAME_H 1
@@ -604,7 +604,7 @@ dns_name_getlabelsequence(const dns_name_t *source, unsigned int first,
void
-dns_name_clone(dns_name_t *source, dns_name_t *target);
+dns_name_clone(const dns_name_t *source, dns_name_t *target);
/*%<
* Make 'target' refer to the same name as 'source'.
*
@@ -720,7 +720,8 @@ dns_name_fromwire(dns_name_t *name, isc_buffer_t *source,
*/
isc_result_t
-dns_name_towire(dns_name_t *name, dns_compress_t *cctx, isc_buffer_t *target);
+dns_name_towire(const dns_name_t *name, dns_compress_t *cctx,
+ isc_buffer_t *target);
/*%<
* Convert 'name' into wire format, compressing it as specified by the
* compression context 'cctx', and storing the result in 'target'.
@@ -994,7 +995,8 @@ dns_name_split(dns_name_t *name, unsigned int suffixlabels,
*/
isc_result_t
-dns_name_dup(dns_name_t *source, isc_mem_t *mctx, dns_name_t *target);
+dns_name_dup(const dns_name_t *source, isc_mem_t *mctx,
+ dns_name_t *target);
/*%<
* Make 'target' a dynamically allocated copy of 'source'.
*
diff --git a/lib/dns/include/dns/peer.h b/lib/dns/include/dns/peer.h
index 46057bb7bd..59b92835c3 100644
--- a/lib/dns/include/dns/peer.h
+++ b/lib/dns/include/dns/peer.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: peer.h,v 1.27 2006/02/17 00:24:21 marka Exp $ */
+/* $Id: peer.h,v 1.28 2006/02/28 02:39:51 marka Exp $ */
#ifndef DNS_PEER_H
#define DNS_PEER_H 1
@@ -177,7 +177,8 @@ isc_result_t
dns_peer_setkey(dns_peer_t *peer, dns_name_t **keyval);
isc_result_t
-dns_peer_settransfersource(dns_peer_t *peer, isc_sockaddr_t *transfer_source);
+dns_peer_settransfersource(dns_peer_t *peer,
+ const isc_sockaddr_t *transfer_source);
isc_result_t
dns_peer_gettransfersource(dns_peer_t *peer, isc_sockaddr_t *transfer_source);
@@ -195,13 +196,13 @@ isc_result_t
dns_peer_getmaxudp(dns_peer_t *peer, isc_uint16_t *maxudp);
isc_result_t
-dns_peer_setnotifysource(dns_peer_t *peer, isc_sockaddr_t *notify_source);
+dns_peer_setnotifysource(dns_peer_t *peer, const isc_sockaddr_t *notify_source);
isc_result_t
dns_peer_getnotifysource(dns_peer_t *peer, isc_sockaddr_t *notify_source);
isc_result_t
-dns_peer_setquerysource(dns_peer_t *peer, isc_sockaddr_t *query_source);
+dns_peer_setquerysource(dns_peer_t *peer, const isc_sockaddr_t *query_source);
isc_result_t
dns_peer_getquerysource(dns_peer_t *peer, isc_sockaddr_t *query_source);
diff --git a/lib/dns/include/dns/rdataset.h b/lib/dns/include/dns/rdataset.h
index 755facbdec..f8ffb666f2 100644
--- a/lib/dns/include/dns/rdataset.h
+++ b/lib/dns/include/dns/rdataset.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: rdataset.h,v 1.56 2005/07/18 05:58:59 marka Exp $ */
+/* $Id: rdataset.h,v 1.57 2006/02/28 02:39:51 marka Exp $ */
#ifndef DNS_RDATASET_H
#define DNS_RDATASET_H 1
@@ -398,11 +398,11 @@ dns_rdataset_towire(dns_rdataset_t *rdataset,
isc_result_t
dns_rdataset_towiresorted(dns_rdataset_t *rdataset,
- dns_name_t *owner_name,
+ const dns_name_t *owner_name,
dns_compress_t *cctx,
isc_buffer_t *target,
dns_rdatasetorderfunc_t order,
- void *order_arg,
+ const void *order_arg,
unsigned int options,
unsigned int *countp);
/*%<
@@ -417,11 +417,11 @@ dns_rdataset_towiresorted(dns_rdataset_t *rdataset,
isc_result_t
dns_rdataset_towirepartial(dns_rdataset_t *rdataset,
- dns_name_t *owner_name,
+ const dns_name_t *owner_name,
dns_compress_t *cctx,
isc_buffer_t *target,
dns_rdatasetorderfunc_t order,
- void *order_arg,
+ const void *order_arg,
unsigned int options,
unsigned int *countp,
void **state);
diff --git a/lib/dns/include/dns/types.h b/lib/dns/include/dns/types.h
index 611a721168..c7ce50bc04 100644
--- a/lib/dns/include/dns/types.h
+++ b/lib/dns/include/dns/types.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: types.h,v 1.119 2006/01/27 23:57:46 marka Exp $ */
+/* $Id: types.h,v 1.120 2006/02/28 02:39:51 marka Exp $ */
#ifndef DNS_TYPES_H
#define DNS_TYPES_H 1
@@ -308,7 +308,7 @@ typedef void
(*dns_updatecallback_t)(void *, isc_result_t, dns_message_t *);
typedef int
-(*dns_rdatasetorderfunc_t)(dns_rdata_t *, void *);
+(*dns_rdatasetorderfunc_t)(const dns_rdata_t *, const void *);
typedef isc_boolean_t
(*dns_checkmxfunc_t)(dns_zone_t *, dns_name_t *, dns_name_t *);
diff --git a/lib/dns/include/dns/zone.h b/lib/dns/include/dns/zone.h
index 1637958799..7d8502e4e5 100644
--- a/lib/dns/include/dns/zone.h
+++ b/lib/dns/include/dns/zone.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: zone.h,v 1.142 2006/02/21 23:12:27 marka Exp $ */
+/* $Id: zone.h,v 1.143 2006/02/28 02:39:51 marka Exp $ */
#ifndef DNS_ZONE_H
#define DNS_ZONE_H 1
@@ -176,7 +176,7 @@ dns_zone_getview(dns_zone_t *zone);
*/
isc_result_t
-dns_zone_setorigin(dns_zone_t *zone, dns_name_t *origin);
+dns_zone_setorigin(dns_zone_t *zone, const dns_name_t *origin);
/*%<
* Sets the zones origin to 'origin'.
*
@@ -465,11 +465,13 @@ dns_zone_maintenance(dns_zone_t *zone);
*/
isc_result_t
-dns_zone_setmasters(dns_zone_t *zone, isc_sockaddr_t *masters,
+dns_zone_setmasters(dns_zone_t *zone, const isc_sockaddr_t *masters,
isc_uint32_t count);
isc_result_t
-dns_zone_setmasterswithkeys(dns_zone_t *zone, isc_sockaddr_t *masters,
- dns_name_t **keynames, isc_uint32_t count);
+dns_zone_setmasterswithkeys(dns_zone_t *zone,
+ const isc_sockaddr_t *masters,
+ dns_name_t **keynames,
+ isc_uint32_t count);
/*%<
* Set the list of master servers for the zone.
*
@@ -491,7 +493,7 @@ dns_zone_setmasterswithkeys(dns_zone_t *zone, isc_sockaddr_t *masters,
*/
isc_result_t
-dns_zone_setalsonotify(dns_zone_t *zone, isc_sockaddr_t *notify,
+dns_zone_setalsonotify(dns_zone_t *zone, const isc_sockaddr_t *notify,
isc_uint32_t count);
/*%<
* Set the list of additional servers to be notified when
@@ -576,9 +578,10 @@ dns_zone_setmaxretrytime(dns_zone_t *zone, isc_uint32_t val);
*/
isc_result_t
-dns_zone_setxfrsource4(dns_zone_t *zone, isc_sockaddr_t *xfrsource);
+dns_zone_setxfrsource4(dns_zone_t *zone, const isc_sockaddr_t *xfrsource);
isc_result_t
-dns_zone_setaltxfrsource4(dns_zone_t *zone, isc_sockaddr_t *xfrsource);
+dns_zone_setaltxfrsource4(dns_zone_t *zone,
+ const isc_sockaddr_t *xfrsource);
/*%<
* Set the source address to be used in IPv4 zone transfers.
*
@@ -603,9 +606,10 @@ dns_zone_getaltxfrsource4(dns_zone_t *zone);
*/
isc_result_t
-dns_zone_setxfrsource6(dns_zone_t *zone, isc_sockaddr_t *xfrsource);
+dns_zone_setxfrsource6(dns_zone_t *zone, const isc_sockaddr_t *xfrsource);
isc_result_t
-dns_zone_setaltxfrsource6(dns_zone_t *zone, isc_sockaddr_t *xfrsource);
+dns_zone_setaltxfrsource6(dns_zone_t *zone,
+ const isc_sockaddr_t *xfrsource);
/*%<
* Set the source address to be used in IPv6 zone transfers.
*
@@ -630,7 +634,7 @@ dns_zone_getaltxfrsource6(dns_zone_t *zone);
*/
isc_result_t
-dns_zone_setnotifysrc4(dns_zone_t *zone, isc_sockaddr_t *notifysrc);
+dns_zone_setnotifysrc4(dns_zone_t *zone, const isc_sockaddr_t *notifysrc);
/*%<
* Set the source address to be used with IPv4 NOTIFY messages.
*
@@ -653,7 +657,7 @@ dns_zone_getnotifysrc4(dns_zone_t *zone);
*/
isc_result_t
-dns_zone_setnotifysrc6(dns_zone_t *zone, isc_sockaddr_t *notifysrc);
+dns_zone_setnotifysrc6(dns_zone_t *zone, const isc_sockaddr_t *notifysrc);
/*%<
* Set the source address to be used with IPv6 NOTIFY messages.
*
diff --git a/lib/dns/message.c b/lib/dns/message.c
index 65ae0b438c..e518b35e70 100644
--- a/lib/dns/message.c
+++ b/lib/dns/message.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: message.c,v 1.230 2006/01/06 00:01:44 marka Exp $ */
+/* $Id: message.c,v 1.231 2006/02/28 02:39:51 marka Exp $ */
/*! \file */
@@ -1825,7 +1825,7 @@ dns_message_rendersection(dns_message_t *msg, dns_section_t sectionid,
if (rdataset != NULL &&
(rdataset->attributes & DNS_RDATASETATTR_REQUIREDGLUE) != 0 &&
(rdataset->attributes & DNS_RDATASETATTR_RENDERED) == 0) {
- void *order_arg = msg->order_arg;
+ const void *order_arg = msg->order_arg;
st = *(msg->buffer);
count = 0;
if (partial)
@@ -3213,7 +3213,7 @@ dns_message_getrawmessage(dns_message_t *msg) {
void
dns_message_setsortorder(dns_message_t *msg, dns_rdatasetorderfunc_t order,
- void *order_arg)
+ const void *order_arg)
{
REQUIRE(DNS_MESSAGE_VALID(msg));
msg->order = order;
diff --git a/lib/dns/name.c b/lib/dns/name.c
index a069dfd01c..c3bc70eb6a 100644
--- a/lib/dns/name.c
+++ b/lib/dns/name.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: name.c,v 1.158 2006/01/10 23:50:42 marka Exp $ */
+/* $Id: name.c,v 1.159 2006/02/28 02:39:51 marka Exp $ */
/*! \file */
@@ -938,7 +938,7 @@ dns_name_getlabelsequence(const dns_name_t *source,
}
void
-dns_name_clone(dns_name_t *source, dns_name_t *target) {
+dns_name_clone(const dns_name_t *source, dns_name_t *target) {
/*
* Make 'target' refer to the same name as 'source'.
@@ -1897,7 +1897,9 @@ dns_name_fromwire(dns_name_t *name, isc_buffer_t *source,
}
isc_result_t
-dns_name_towire(dns_name_t *name, dns_compress_t *cctx, isc_buffer_t *target) {
+dns_name_towire(const dns_name_t *name, dns_compress_t *cctx,
+ isc_buffer_t *target)
+{
unsigned int methods;
isc_uint16_t offset;
dns_name_t gp; /* Global compression prefix */
@@ -2111,7 +2113,9 @@ dns_name_split(dns_name_t *name, unsigned int suffixlabels,
}
isc_result_t
-dns_name_dup(dns_name_t *source, isc_mem_t *mctx, dns_name_t *target) {
+dns_name_dup(const dns_name_t *source, isc_mem_t *mctx,
+ dns_name_t *target)
+{
/*
* Make 'target' a dynamically allocated copy of 'source'.
*/
diff --git a/lib/dns/peer.c b/lib/dns/peer.c
index dff6cd35ad..86a85b7dbd 100644
--- a/lib/dns/peer.c
+++ b/lib/dns/peer.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: peer.c,v 1.26 2006/02/17 00:24:21 marka Exp $ */
+/* $Id: peer.c,v 1.27 2006/02/28 02:39:51 marka Exp $ */
/*! \file */
@@ -532,7 +532,9 @@ dns_peer_setkeybycharp(dns_peer_t *peer, const char *keyval) {
}
isc_result_t
-dns_peer_settransfersource(dns_peer_t *peer, isc_sockaddr_t *transfer_source) {
+dns_peer_settransfersource(dns_peer_t *peer,
+ const isc_sockaddr_t *transfer_source)
+{
REQUIRE(DNS_PEER_VALID(peer));
if (peer->transfer_source != NULL) {
@@ -563,7 +565,9 @@ dns_peer_gettransfersource(dns_peer_t *peer, isc_sockaddr_t *transfer_source) {
}
isc_result_t
-dns_peer_setnotifysource(dns_peer_t *peer, isc_sockaddr_t *notify_source) {
+dns_peer_setnotifysource(dns_peer_t *peer,
+ const isc_sockaddr_t *notify_source)
+{
REQUIRE(DNS_PEER_VALID(peer));
if (peer->notify_source != NULL) {
@@ -594,7 +598,7 @@ dns_peer_getnotifysource(dns_peer_t *peer, isc_sockaddr_t *notify_source) {
}
isc_result_t
-dns_peer_setquerysource(dns_peer_t *peer, isc_sockaddr_t *query_source) {
+dns_peer_setquerysource(dns_peer_t *peer, const isc_sockaddr_t *query_source) {
REQUIRE(DNS_PEER_VALID(peer));
if (peer->query_source != NULL) {
diff --git a/lib/dns/rdataset.c b/lib/dns/rdataset.c
index 59aab8104c..7ae14ca15c 100644
--- a/lib/dns/rdataset.c
+++ b/lib/dns/rdataset.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: rdataset.c,v 1.75 2005/04/29 00:22:51 marka Exp $ */
+/* $Id: rdataset.c,v 1.76 2006/02/28 02:39:51 marka Exp $ */
/*! \file */
@@ -285,9 +285,9 @@ towire_compare(const void *av, const void *bv) {
}
static isc_result_t
-towiresorted(dns_rdataset_t *rdataset, dns_name_t *owner_name,
+towiresorted(dns_rdataset_t *rdataset, const dns_name_t *owner_name,
dns_compress_t *cctx, isc_buffer_t *target,
- dns_rdatasetorderfunc_t order, void *order_arg,
+ dns_rdatasetorderfunc_t order, const void *order_arg,
isc_boolean_t partial, unsigned int options,
unsigned int *countp, void **state)
{
@@ -533,11 +533,11 @@ towiresorted(dns_rdataset_t *rdataset, dns_name_t *owner_name,
isc_result_t
dns_rdataset_towiresorted(dns_rdataset_t *rdataset,
- dns_name_t *owner_name,
+ const dns_name_t *owner_name,
dns_compress_t *cctx,
isc_buffer_t *target,
dns_rdatasetorderfunc_t order,
- void *order_arg,
+ const void *order_arg,
unsigned int options,
unsigned int *countp)
{
@@ -548,11 +548,11 @@ dns_rdataset_towiresorted(dns_rdataset_t *rdataset,
isc_result_t
dns_rdataset_towirepartial(dns_rdataset_t *rdataset,
- dns_name_t *owner_name,
+ const dns_name_t *owner_name,
dns_compress_t *cctx,
isc_buffer_t *target,
dns_rdatasetorderfunc_t order,
- void *order_arg,
+ const void *order_arg,
unsigned int options,
unsigned int *countp,
void **state)
diff --git a/lib/dns/zone.c b/lib/dns/zone.c
index 1b19ac9888..4a9e53294e 100644
--- a/lib/dns/zone.c
+++ b/lib/dns/zone.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: zone.c,v 1.452 2006/02/21 23:12:27 marka Exp $ */
+/* $Id: zone.c,v 1.453 2006/02/28 02:39:51 marka Exp $ */
/*! \file */
@@ -900,7 +900,7 @@ dns_zone_getview(dns_zone_t *zone) {
isc_result_t
-dns_zone_setorigin(dns_zone_t *zone, dns_name_t *origin) {
+dns_zone_setorigin(dns_zone_t *zone, const dns_name_t *origin) {
isc_result_t result;
REQUIRE(DNS_ZONE_VALID(zone));
@@ -2470,7 +2470,7 @@ dns_zone_getoptions(dns_zone_t *zone) {
}
isc_result_t
-dns_zone_setxfrsource4(dns_zone_t *zone, isc_sockaddr_t *xfrsource) {
+dns_zone_setxfrsource4(dns_zone_t *zone, const isc_sockaddr_t *xfrsource) {
REQUIRE(DNS_ZONE_VALID(zone));
LOCK_ZONE(zone);
@@ -2487,7 +2487,7 @@ dns_zone_getxfrsource4(dns_zone_t *zone) {
}
isc_result_t
-dns_zone_setxfrsource6(dns_zone_t *zone, isc_sockaddr_t *xfrsource) {
+dns_zone_setxfrsource6(dns_zone_t *zone, const isc_sockaddr_t *xfrsource) {
REQUIRE(DNS_ZONE_VALID(zone));
LOCK_ZONE(zone);
@@ -2504,7 +2504,9 @@ dns_zone_getxfrsource6(dns_zone_t *zone) {
}
isc_result_t
-dns_zone_setaltxfrsource4(dns_zone_t *zone, isc_sockaddr_t *altxfrsource) {
+dns_zone_setaltxfrsource4(dns_zone_t *zone,
+ const isc_sockaddr_t *altxfrsource)
+{
REQUIRE(DNS_ZONE_VALID(zone));
LOCK_ZONE(zone);
@@ -2521,7 +2523,9 @@ dns_zone_getaltxfrsource4(dns_zone_t *zone) {
}
isc_result_t
-dns_zone_setaltxfrsource6(dns_zone_t *zone, isc_sockaddr_t *altxfrsource) {
+dns_zone_setaltxfrsource6(dns_zone_t *zone,
+ const isc_sockaddr_t *altxfrsource)
+{
REQUIRE(DNS_ZONE_VALID(zone));
LOCK_ZONE(zone);
@@ -2538,7 +2542,7 @@ dns_zone_getaltxfrsource6(dns_zone_t *zone) {
}
isc_result_t
-dns_zone_setnotifysrc4(dns_zone_t *zone, isc_sockaddr_t *notifysrc) {
+dns_zone_setnotifysrc4(dns_zone_t *zone, const isc_sockaddr_t *notifysrc) {
REQUIRE(DNS_ZONE_VALID(zone));
LOCK_ZONE(zone);
@@ -2555,7 +2559,7 @@ dns_zone_getnotifysrc4(dns_zone_t *zone) {
}
isc_result_t
-dns_zone_setnotifysrc6(dns_zone_t *zone, isc_sockaddr_t *notifysrc) {
+dns_zone_setnotifysrc6(dns_zone_t *zone, const isc_sockaddr_t *notifysrc) {
REQUIRE(DNS_ZONE_VALID(zone));
LOCK_ZONE(zone);
@@ -2572,7 +2576,7 @@ dns_zone_getnotifysrc6(dns_zone_t *zone) {
}
isc_result_t
-dns_zone_setalsonotify(dns_zone_t *zone, isc_sockaddr_t *notify,
+dns_zone_setalsonotify(dns_zone_t *zone, const isc_sockaddr_t *notify,
isc_uint32_t count)
{
isc_sockaddr_t *new;
@@ -2602,7 +2606,7 @@ dns_zone_setalsonotify(dns_zone_t *zone, isc_sockaddr_t *notify,
}
isc_result_t
-dns_zone_setmasters(dns_zone_t *zone, isc_sockaddr_t *masters,
+dns_zone_setmasters(dns_zone_t *zone, const isc_sockaddr_t *masters,
isc_uint32_t count)
{
isc_result_t result;
@@ -2612,8 +2616,10 @@ dns_zone_setmasters(dns_zone_t *zone, isc_sockaddr_t *masters,
}
isc_result_t
-dns_zone_setmasterswithkeys(dns_zone_t *zone, isc_sockaddr_t *masters,
- dns_name_t **keynames, isc_uint32_t count)
+dns_zone_setmasterswithkeys(dns_zone_t *zone,
+ const isc_sockaddr_t *masters,
+ dns_name_t **keynames,
+ isc_uint32_t count)
{
isc_sockaddr_t *new;
isc_result_t result = ISC_R_SUCCESS;
diff --git a/lib/isc/include/isc/sockaddr.h b/lib/isc/include/isc/sockaddr.h
index b65a85163d..472714ca69 100644
--- a/lib/isc/include/isc/sockaddr.h
+++ b/lib/isc/include/isc/sockaddr.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: sockaddr.h,v 1.49 2005/07/28 04:54:17 marka Exp $ */
+/* $Id: sockaddr.h,v 1.50 2006/02/28 02:39:52 marka Exp $ */
#ifndef ISC_SOCKADDR_H
#define ISC_SOCKADDR_H 1
@@ -168,7 +168,7 @@ isc_sockaddr_setport(isc_sockaddr_t *sockaddr, in_port_t port);
*/
in_port_t
-isc_sockaddr_getport(isc_sockaddr_t *sockaddr);
+isc_sockaddr_getport(const isc_sockaddr_t *sockaddr);
/*%<
* Get the port stored in 'sockaddr'.
*/
@@ -195,25 +195,25 @@ isc_sockaddr_format(const isc_sockaddr_t *sa, char *array, unsigned int size);
*/
isc_boolean_t
-isc_sockaddr_ismulticast(isc_sockaddr_t *sa);
+isc_sockaddr_ismulticast(const isc_sockaddr_t *sa);
/*%<
* Returns #ISC_TRUE if the address is a multicast address.
*/
isc_boolean_t
-isc_sockaddr_isexperimental(isc_sockaddr_t *sa);
+isc_sockaddr_isexperimental(const isc_sockaddr_t *sa);
/*
* Returns ISC_TRUE if the address is a experimental (CLASS E) address.
*/
isc_boolean_t
-isc_sockaddr_islinklocal(isc_sockaddr_t *sa);
+isc_sockaddr_islinklocal(const isc_sockaddr_t *sa);
/*%<
* Returns ISC_TRUE if the address is a link local addresss.
*/
isc_boolean_t
-isc_sockaddr_issitelocal(isc_sockaddr_t *sa);
+isc_sockaddr_issitelocal(const isc_sockaddr_t *sa);
/*%<
* Returns ISC_TRUE if the address is a sitelocal address.
*/
diff --git a/lib/isc/include/isc/symtab.h b/lib/isc/include/isc/symtab.h
index eee1ab7318..5d4efa0785 100644
--- a/lib/isc/include/isc/symtab.h
+++ b/lib/isc/include/isc/symtab.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: symtab.h,v 1.19 2005/04/29 00:23:45 marka Exp $ */
+/* $Id: symtab.h,v 1.20 2006/02/28 02:39:52 marka Exp $ */
#ifndef ISC_SYMTAB_H
#define ISC_SYMTAB_H 1
@@ -86,6 +86,7 @@
/*% Symbol table value. */
typedef union isc_symvalue {
void * as_pointer;
+ const void * as_cpointer;
int as_integer;
unsigned int as_uinteger;
} isc_symvalue_t;
diff --git a/lib/isc/sockaddr.c b/lib/isc/sockaddr.c
index c4fb408ca0..8a8f926c0e 100644
--- a/lib/isc/sockaddr.c
+++ b/lib/isc/sockaddr.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: sockaddr.c,v 1.65 2005/04/27 04:57:15 sra Exp $ */
+/* $Id: sockaddr.c,v 1.66 2006/02/28 02:39:52 marka Exp $ */
/*! \file */
@@ -415,7 +415,7 @@ isc_sockaddr_setport(isc_sockaddr_t *sockaddr, in_port_t port) {
}
in_port_t
-isc_sockaddr_getport(isc_sockaddr_t *sockaddr) {
+isc_sockaddr_getport(const isc_sockaddr_t *sockaddr) {
in_port_t port = 0;
switch (sockaddr->type.sa.sa_family) {
@@ -437,7 +437,7 @@ isc_sockaddr_getport(isc_sockaddr_t *sockaddr) {
}
isc_boolean_t
-isc_sockaddr_ismulticast(isc_sockaddr_t *sockaddr) {
+isc_sockaddr_ismulticast(const isc_sockaddr_t *sockaddr) {
isc_netaddr_t netaddr;
if (sockaddr->type.sa.sa_family == AF_INET ||
@@ -449,7 +449,7 @@ isc_sockaddr_ismulticast(isc_sockaddr_t *sockaddr) {
}
isc_boolean_t
-isc_sockaddr_isexperimental(isc_sockaddr_t *sockaddr) {
+isc_sockaddr_isexperimental(const isc_sockaddr_t *sockaddr) {
isc_netaddr_t netaddr;
if (sockaddr->type.sa.sa_family == AF_INET) {
@@ -460,7 +460,7 @@ isc_sockaddr_isexperimental(isc_sockaddr_t *sockaddr) {
}
isc_boolean_t
-isc_sockaddr_issitelocal(isc_sockaddr_t *sockaddr) {
+isc_sockaddr_issitelocal(const isc_sockaddr_t *sockaddr) {
isc_netaddr_t netaddr;
if (sockaddr->type.sa.sa_family == AF_INET6) {
@@ -471,7 +471,7 @@ isc_sockaddr_issitelocal(isc_sockaddr_t *sockaddr) {
}
isc_boolean_t
-isc_sockaddr_islinklocal(isc_sockaddr_t *sockaddr) {
+isc_sockaddr_islinklocal(const isc_sockaddr_t *sockaddr) {
isc_netaddr_t netaddr;
if (sockaddr->type.sa.sa_family == AF_INET6) {
diff --git a/lib/isccfg/aclconf.c b/lib/isccfg/aclconf.c
index a93c1181bd..4154a9fea6 100644
--- a/lib/isccfg/aclconf.c
+++ b/lib/isccfg/aclconf.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: aclconf.c,v 1.5 2005/08/23 02:36:10 marka Exp $ */
+/* $Id: aclconf.c,v 1.6 2006/02/28 02:39:52 marka Exp $ */
#include
@@ -53,10 +53,10 @@ cfg_aclconfctx_destroy(cfg_aclconfctx_t *ctx) {
* Find the definition of the named acl whose name is "name".
*/
static isc_result_t
-get_acl_def(cfg_obj_t *cctx, const char *name, cfg_obj_t **ret) {
+get_acl_def(const cfg_obj_t *cctx, const char *name, const cfg_obj_t **ret) {
isc_result_t result;
- cfg_obj_t *acls = NULL;
- cfg_listelt_t *elt;
+ const cfg_obj_t *acls = NULL;
+ const cfg_listelt_t *elt;
result = cfg_map_get(cctx, "acl", &acls);
if (result != ISC_R_SUCCESS)
@@ -64,7 +64,7 @@ get_acl_def(cfg_obj_t *cctx, const char *name, cfg_obj_t **ret) {
for (elt = cfg_list_first(acls);
elt != NULL;
elt = cfg_list_next(elt)) {
- cfg_obj_t *acl = cfg_listelt_value(elt);
+ const cfg_obj_t *acl = cfg_listelt_value(elt);
const char *aclname = cfg_obj_asstring(cfg_tuple_get(acl, "name"));
if (strcasecmp(aclname, name) == 0) {
*ret = cfg_tuple_get(acl, "value");
@@ -75,12 +75,12 @@ get_acl_def(cfg_obj_t *cctx, const char *name, cfg_obj_t **ret) {
}
static isc_result_t
-convert_named_acl(cfg_obj_t *nameobj, cfg_obj_t *cctx,
+convert_named_acl(const cfg_obj_t *nameobj, const cfg_obj_t *cctx,
isc_log_t *lctx, cfg_aclconfctx_t *ctx,
isc_mem_t *mctx, dns_acl_t **target)
{
isc_result_t result;
- cfg_obj_t *cacl = NULL;
+ const cfg_obj_t *cacl = NULL;
dns_acl_t *dacl;
dns_acl_t loop;
const char *aclname = cfg_obj_asstring(nameobj);
@@ -130,7 +130,7 @@ convert_named_acl(cfg_obj_t *nameobj, cfg_obj_t *cctx,
}
static isc_result_t
-convert_keyname(cfg_obj_t *keyobj, isc_log_t *lctx, isc_mem_t *mctx,
+convert_keyname(const cfg_obj_t *keyobj, isc_log_t *lctx, isc_mem_t *mctx,
dns_name_t *dnsname)
{
isc_result_t result;
@@ -155,8 +155,8 @@ convert_keyname(cfg_obj_t *keyobj, isc_log_t *lctx, isc_mem_t *mctx,
}
isc_result_t
-cfg_acl_fromconfig(cfg_obj_t *caml,
- cfg_obj_t *cctx,
+cfg_acl_fromconfig(const cfg_obj_t *caml,
+ const cfg_obj_t *cctx,
isc_log_t *lctx,
cfg_aclconfctx_t *ctx,
isc_mem_t *mctx,
@@ -166,7 +166,7 @@ cfg_acl_fromconfig(cfg_obj_t *caml,
unsigned int count;
dns_acl_t *dacl = NULL;
dns_aclelement_t *de;
- cfg_listelt_t *elt;
+ const cfg_listelt_t *elt;
REQUIRE(target != NULL && *target == NULL);
@@ -185,7 +185,7 @@ cfg_acl_fromconfig(cfg_obj_t *caml,
elt != NULL;
elt = cfg_list_next(elt))
{
- cfg_obj_t *ce = cfg_listelt_value(elt);
+ const cfg_obj_t *ce = cfg_listelt_value(elt);
if (cfg_obj_istuple(ce)) {
/* This must be a negated element. */
ce = cfg_tuple_get(ce, "value");
diff --git a/lib/isccfg/include/isccfg/aclconf.h b/lib/isccfg/include/isccfg/aclconf.h
index 642972d3bc..df26ef89ce 100644
--- a/lib/isccfg/include/isccfg/aclconf.h
+++ b/lib/isccfg/include/isccfg/aclconf.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: aclconf.h,v 1.4 2005/01/13 05:15:16 marka Exp $ */
+/* $Id: aclconf.h,v 1.5 2006/02/28 02:39:52 marka Exp $ */
#ifndef ISCCFG_ACLCONF_H
#define ISCCFG_ACLCONF_H 1
@@ -49,8 +49,8 @@ cfg_aclconfctx_destroy(cfg_aclconfctx_t *ctx);
*/
isc_result_t
-cfg_acl_fromconfig(cfg_obj_t *caml,
- cfg_obj_t *cctx,
+cfg_acl_fromconfig(const cfg_obj_t *caml,
+ const cfg_obj_t *cctx,
isc_log_t *lctx,
cfg_aclconfctx_t *ctx,
isc_mem_t *mctx,
diff --git a/lib/isccfg/include/isccfg/cfg.h b/lib/isccfg/include/isccfg/cfg.h
index e79691aa97..c0b26bfea6 100644
--- a/lib/isccfg/include/isccfg/cfg.h
+++ b/lib/isccfg/include/isccfg/cfg.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: cfg.h,v 1.37 2005/08/23 02:36:11 marka Exp $ */
+/* $Id: cfg.h,v 1.38 2006/02/28 02:39:52 marka Exp $ */
#ifndef ISCCFG_CFG_H
#define ISCCFG_CFG_H 1
@@ -75,7 +75,7 @@ typedef struct cfg_listelt cfg_listelt_t;
* "directory".
*/
typedef isc_result_t
-(*cfg_parsecallback_t)(const char *clausename, cfg_obj_t *obj, void *arg);
+(*cfg_parsecallback_t)(const char *clausename, const cfg_obj_t *obj, void *arg);
/***
*** Functions
@@ -144,20 +144,20 @@ cfg_parser_destroy(cfg_parser_t **pctxp);
*/
isc_boolean_t
-cfg_obj_isvoid(cfg_obj_t *obj);
+cfg_obj_isvoid(const cfg_obj_t *obj);
/*%<
* Return true iff 'obj' is of void type (e.g., an optional
* value not specified).
*/
isc_boolean_t
-cfg_obj_ismap(cfg_obj_t *obj);
+cfg_obj_ismap(const cfg_obj_t *obj);
/*%<
* Return true iff 'obj' is of a map type.
*/
isc_result_t
-cfg_map_get(cfg_obj_t *mapobj, const char* name, cfg_obj_t **obj);
+cfg_map_get(const cfg_obj_t *mapobj, const char* name, const cfg_obj_t **obj);
/*%<
* Extract an element from a configuration object, which
* must be of a map type.
@@ -172,8 +172,8 @@ cfg_map_get(cfg_obj_t *mapobj, const char* name, cfg_obj_t **obj);
* \li #ISC_R_NOTFOUND - name not found in map
*/
-cfg_obj_t *
-cfg_map_getname(cfg_obj_t *mapobj);
+const cfg_obj_t *
+cfg_map_getname(const cfg_obj_t *mapobj);
/*%<
* Get the name of a named map object, like a server "key" clause.
*
@@ -186,13 +186,13 @@ cfg_map_getname(cfg_obj_t *mapobj);
*/
isc_boolean_t
-cfg_obj_istuple(cfg_obj_t *obj);
+cfg_obj_istuple(const cfg_obj_t *obj);
/*%<
* Return true iff 'obj' is of a map type.
*/
-cfg_obj_t *
-cfg_tuple_get(cfg_obj_t *tupleobj, const char *name);
+const cfg_obj_t *
+cfg_tuple_get(const cfg_obj_t *tupleobj, const char *name);
/*%<
* Extract an element from a configuration object, which
* must be of a tuple type.
@@ -204,13 +204,13 @@ cfg_tuple_get(cfg_obj_t *tupleobj, const char *name);
*/
isc_boolean_t
-cfg_obj_isuint32(cfg_obj_t *obj);
+cfg_obj_isuint32(const cfg_obj_t *obj);
/*%<
* Return true iff 'obj' is of integer type.
*/
isc_uint32_t
-cfg_obj_asuint32(cfg_obj_t *obj);
+cfg_obj_asuint32(const cfg_obj_t *obj);
/*%<
* Returns the value of a configuration object of 32-bit integer type.
*
@@ -222,13 +222,13 @@ cfg_obj_asuint32(cfg_obj_t *obj);
*/
isc_boolean_t
-cfg_obj_isuint64(cfg_obj_t *obj);
+cfg_obj_isuint64(const cfg_obj_t *obj);
/*%<
* Return true iff 'obj' is of integer type.
*/
isc_uint64_t
-cfg_obj_asuint64(cfg_obj_t *obj);
+cfg_obj_asuint64(const cfg_obj_t *obj);
/*%<
* Returns the value of a configuration object of 64-bit integer type.
*
@@ -240,13 +240,13 @@ cfg_obj_asuint64(cfg_obj_t *obj);
*/
isc_boolean_t
-cfg_obj_isstring(cfg_obj_t *obj);
+cfg_obj_isstring(const cfg_obj_t *obj);
/*%<
* Return true iff 'obj' is of string type.
*/
const char *
-cfg_obj_asstring(cfg_obj_t *obj);
+cfg_obj_asstring(const cfg_obj_t *obj);
/*%<
* Returns the value of a configuration object of a string type
* as a null-terminated string.
@@ -259,13 +259,13 @@ cfg_obj_asstring(cfg_obj_t *obj);
*/
isc_boolean_t
-cfg_obj_isboolean(cfg_obj_t *obj);
+cfg_obj_isboolean(const cfg_obj_t *obj);
/*%<
* Return true iff 'obj' is of a boolean type.
*/
isc_boolean_t
-cfg_obj_asboolean(cfg_obj_t *obj);
+cfg_obj_asboolean(const cfg_obj_t *obj);
/*%<
* Returns the value of a configuration object of a boolean type.
*
@@ -277,13 +277,13 @@ cfg_obj_asboolean(cfg_obj_t *obj);
*/
isc_boolean_t
-cfg_obj_issockaddr(cfg_obj_t *obj);
+cfg_obj_issockaddr(const cfg_obj_t *obj);
/*%<
* Return true iff 'obj' is a socket address.
*/
-isc_sockaddr_t *
-cfg_obj_assockaddr(cfg_obj_t *obj);
+const isc_sockaddr_t *
+cfg_obj_assockaddr(const cfg_obj_t *obj);
/*%<
* Returns the value of a configuration object representing a socket address.
*
@@ -296,13 +296,13 @@ cfg_obj_assockaddr(cfg_obj_t *obj);
*/
isc_boolean_t
-cfg_obj_isnetprefix(cfg_obj_t *obj);
+cfg_obj_isnetprefix(const cfg_obj_t *obj);
/*%<
* Return true iff 'obj' is a network prefix.
*/
void
-cfg_obj_asnetprefix(cfg_obj_t *obj, isc_netaddr_t *netaddr,
+cfg_obj_asnetprefix(const cfg_obj_t *obj, isc_netaddr_t *netaddr,
unsigned int *prefixlen);
/*%<
* Gets the value of a configuration object representing a network
@@ -315,13 +315,13 @@ cfg_obj_asnetprefix(cfg_obj_t *obj, isc_netaddr_t *netaddr,
*/
isc_boolean_t
-cfg_obj_islist(cfg_obj_t *obj);
+cfg_obj_islist(const cfg_obj_t *obj);
/*%<
* Return true iff 'obj' is of list type.
*/
-cfg_listelt_t *
-cfg_list_first(cfg_obj_t *obj);
+const cfg_listelt_t *
+cfg_list_first(const cfg_obj_t *obj);
/*%<
* Returns the first list element in a configuration object of a list type.
*
@@ -333,8 +333,8 @@ cfg_list_first(cfg_obj_t *obj);
* or NULL if the list is empty or nonexistent.
*/
-cfg_listelt_t *
-cfg_list_next(cfg_listelt_t *elt);
+const cfg_listelt_t *
+cfg_list_next(const cfg_listelt_t *elt);
/*%<
* Returns the next element of a list of configuration objects.
*
@@ -347,8 +347,8 @@ cfg_list_next(cfg_listelt_t *elt);
* or NULL if there are no more elements.
*/
-cfg_obj_t *
-cfg_listelt_value(cfg_listelt_t *elt);
+const cfg_obj_t *
+cfg_listelt_value(const cfg_listelt_t *elt);
/*%<
* Returns the configuration object associated with cfg_listelt_t.
*
@@ -361,7 +361,7 @@ cfg_listelt_value(cfg_listelt_t *elt);
*/
void
-cfg_print(cfg_obj_t *obj,
+cfg_print(const cfg_obj_t *obj,
void (*f)(void *closure, const char *text, int textlen),
void *closure);
/*%<
@@ -379,7 +379,7 @@ cfg_print_grammar(const cfg_type_t *type,
*/
isc_boolean_t
-cfg_obj_istype(cfg_obj_t *obj, const cfg_type_t *type);
+cfg_obj_istype(const cfg_obj_t *obj, const cfg_type_t *type);
/*%<
* Return true iff 'obj' is of type 'type'.
*/
@@ -390,7 +390,8 @@ void cfg_obj_destroy(cfg_parser_t *pctx, cfg_obj_t **obj);
*/
void
-cfg_obj_log(cfg_obj_t *obj, isc_log_t *lctx, int level, const char *fmt, ...)
+cfg_obj_log(const cfg_obj_t *obj, isc_log_t *lctx, int level,
+ const char *fmt, ...)
ISC_FORMAT_PRINTF(4, 5);
/*%<
* Log a message concerning configuration object 'obj' to the logging
@@ -399,13 +400,13 @@ cfg_obj_log(cfg_obj_t *obj, isc_log_t *lctx, int level, const char *fmt, ...)
*/
const char *
-cfg_obj_file(cfg_obj_t *obj);
+cfg_obj_file(const cfg_obj_t *obj);
/*%<
* Return the file that defined this object.
*/
unsigned int
-cfg_obj_line(cfg_obj_t *obj);
+cfg_obj_line(const cfg_obj_t *obj);
/*%<
* Return the line in file where this object was defined.
*/
diff --git a/lib/isccfg/include/isccfg/grammar.h b/lib/isccfg/include/isccfg/grammar.h
index 5ffca2c8c1..0a137cabf1 100644
--- a/lib/isccfg/include/isccfg/grammar.h
+++ b/lib/isccfg/include/isccfg/grammar.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: grammar.h,v 1.11 2006/02/19 06:50:48 marka Exp $ */
+/* $Id: grammar.h,v 1.12 2006/02/28 02:39:52 marka Exp $ */
#ifndef ISCCFG_GRAMMAR_H
#define ISCCFG_GRAMMAR_H 1
@@ -65,7 +65,7 @@ typedef struct cfg_rep cfg_rep_t;
typedef isc_result_t (*cfg_parsefunc_t)(cfg_parser_t *, const cfg_type_t *type,
cfg_obj_t **);
-typedef void (*cfg_printfunc_t)(cfg_printer_t *, cfg_obj_t *);
+typedef void (*cfg_printfunc_t)(cfg_printer_t *, const cfg_obj_t *);
typedef void (*cfg_docfunc_t)(cfg_printer_t *, const cfg_type_t *);
typedef void (*cfg_freefunc_t)(cfg_parser_t *, cfg_obj_t *);
@@ -155,7 +155,7 @@ struct cfg_obj {
isc_sockaddr_t sockaddr;
cfg_netprefix_t netprefix;
} value;
- char * file;
+ const char * file;
unsigned int line;
};
@@ -283,16 +283,16 @@ isc_result_t
cfg_parse_uint32(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret);
void
-cfg_print_uint32(cfg_printer_t *pctx, cfg_obj_t *obj);
+cfg_print_uint32(cfg_printer_t *pctx, const cfg_obj_t *obj);
void
-cfg_print_uint64(cfg_printer_t *pctx, cfg_obj_t *obj);
+cfg_print_uint64(cfg_printer_t *pctx, const cfg_obj_t *obj);
isc_result_t
cfg_parse_qstring(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret);
void
-cfg_print_ustring(cfg_printer_t *pctx, cfg_obj_t *obj);
+cfg_print_ustring(cfg_printer_t *pctx, const cfg_obj_t *obj);
isc_result_t
cfg_parse_astring(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret);
@@ -301,7 +301,7 @@ isc_result_t
cfg_parse_rawaddr(cfg_parser_t *pctx, unsigned int flags, isc_netaddr_t *na);
void
-cfg_print_rawaddr(cfg_printer_t *pctx, isc_netaddr_t *na);
+cfg_print_rawaddr(cfg_printer_t *pctx, const isc_netaddr_t *na);
isc_boolean_t
cfg_lookingat_netaddr(cfg_parser_t *pctx, unsigned int flags);
@@ -313,7 +313,7 @@ isc_result_t
cfg_parse_sockaddr(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret);
void
-cfg_print_sockaddr(cfg_printer_t *pctx, cfg_obj_t *obj);
+cfg_print_sockaddr(cfg_printer_t *pctx, const cfg_obj_t *obj);
void
cfg_doc_sockaddr(cfg_printer_t *pctx, const cfg_type_t *type);
@@ -332,7 +332,7 @@ isc_result_t
cfg_parse_tuple(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret);
void
-cfg_print_tuple(cfg_printer_t *pctx, cfg_obj_t *obj);
+cfg_print_tuple(cfg_printer_t *pctx, const cfg_obj_t *obj);
void
cfg_doc_tuple(cfg_printer_t *pctx, const cfg_type_t *type);
@@ -348,7 +348,7 @@ isc_result_t
cfg_parse_bracketed_list(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret);
void
-cfg_print_bracketed_list(cfg_printer_t *pctx, cfg_obj_t *obj);
+cfg_print_bracketed_list(cfg_printer_t *pctx, const cfg_obj_t *obj);
void
cfg_doc_bracketed_list(cfg_printer_t *pctx, const cfg_type_t *type);
@@ -357,7 +357,7 @@ isc_result_t
cfg_parse_spacelist(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret);
void
-cfg_print_spacelist(cfg_printer_t *pctx, cfg_obj_t *obj);
+cfg_print_spacelist(cfg_printer_t *pctx, const cfg_obj_t *obj);
isc_result_t
cfg_parse_enum(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret);
@@ -387,7 +387,7 @@ cfg_parse_netprefix_map(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **
ret);
void
-cfg_print_map(cfg_printer_t *pctx, cfg_obj_t *obj);
+cfg_print_map(cfg_printer_t *pctx, const cfg_obj_t *obj);
void
cfg_doc_map(cfg_printer_t *pctx, const cfg_type_t *type);
@@ -396,7 +396,7 @@ isc_result_t
cfg_parse_mapbody(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret);
void
-cfg_print_mapbody(cfg_printer_t *pctx, cfg_obj_t *obj);
+cfg_print_mapbody(cfg_printer_t *pctx, const cfg_obj_t *obj);
void
cfg_doc_mapbody(cfg_printer_t *pctx, const cfg_type_t *type);
@@ -405,7 +405,7 @@ isc_result_t
cfg_parse_void(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret);
void
-cfg_print_void(cfg_printer_t *pctx, cfg_obj_t *obj);
+cfg_print_void(cfg_printer_t *pctx, const cfg_obj_t *obj);
void
cfg_doc_void(cfg_printer_t *pctx, const cfg_type_t *type);
@@ -414,7 +414,7 @@ isc_result_t
cfg_parse_obj(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret);
void
-cfg_print_obj(cfg_printer_t *pctx, cfg_obj_t *obj);
+cfg_print_obj(cfg_printer_t *pctx, const cfg_obj_t *obj);
void
cfg_doc_obj(cfg_printer_t *pctx, const cfg_type_t *type);
diff --git a/lib/isccfg/namedconf.c b/lib/isccfg/namedconf.c
index c3ceb7bad6..b4cd481cf2 100644
--- a/lib/isccfg/namedconf.c
+++ b/lib/isccfg/namedconf.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: namedconf.c,v 1.65 2006/02/17 00:24:21 marka Exp $ */
+/* $Id: namedconf.c,v 1.66 2006/02/28 02:39:52 marka Exp $ */
/*! \file */
@@ -60,7 +60,7 @@ static isc_result_t
parse_optional_keyvalue(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret);
static void
-print_keyvalue(cfg_printer_t *pctx, cfg_obj_t *obj);
+print_keyvalue(cfg_printer_t *pctx, const cfg_obj_t *obj);
static void
doc_keyvalue(cfg_printer_t *pctx, const cfg_type_t *type);
@@ -459,7 +459,7 @@ static cfg_type_t cfg_type_transferformat = {
*/
static void
-print_none(cfg_printer_t *pctx, cfg_obj_t *obj) {
+print_none(cfg_printer_t *pctx, const cfg_obj_t *obj) {
UNUSED(obj);
cfg_print_chars(pctx, "none", 4);
}
@@ -500,7 +500,7 @@ static cfg_type_t cfg_type_qstringornone = {
*/
static void
-print_hostname(cfg_printer_t *pctx, cfg_obj_t *obj) {
+print_hostname(cfg_printer_t *pctx, const cfg_obj_t *obj) {
UNUSED(obj);
cfg_print_chars(pctx, "hostname", 4);
}
@@ -1213,7 +1213,7 @@ parse_optional_keyvalue(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **
}
static void
-print_keyvalue(cfg_printer_t *pctx, cfg_obj_t *obj) {
+print_keyvalue(cfg_printer_t *pctx, const cfg_obj_t *obj) {
const keyword_type_t *kw = obj->type->of;
cfg_print_cstr(pctx, kw->name);
cfg_print_chars(pctx, " ", 1);
@@ -1460,7 +1460,7 @@ parse_querysource(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
}
static void
-print_querysource(cfg_printer_t *pctx, cfg_obj_t *obj) {
+print_querysource(cfg_printer_t *pctx, const cfg_obj_t *obj) {
isc_netaddr_t na;
isc_netaddr_fromsockaddr(&na, &obj->value.sockaddr);
cfg_print_chars(pctx, "address ", 8);
@@ -1541,7 +1541,7 @@ static cfg_tuplefielddef_t negated_fields[] = {
};
static void
-print_negated(cfg_printer_t *pctx, cfg_obj_t *obj) {
+print_negated(cfg_printer_t *pctx, const cfg_obj_t *obj) {
cfg_print_chars(pctx, "!", 1);
cfg_print_tuple(pctx, obj);
}
@@ -1758,7 +1758,7 @@ parse_logfile(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
}
static void
-print_logfile(cfg_printer_t *pctx, cfg_obj_t *obj) {
+print_logfile(cfg_printer_t *pctx, const cfg_obj_t *obj) {
cfg_print_obj(pctx, obj->value.tuple[0]); /* file */
if (obj->value.tuple[1]->type->print != cfg_print_void) {
cfg_print_chars(pctx, " versions ", 10);
diff --git a/lib/isccfg/parser.c b/lib/isccfg/parser.c
index 4af8f3806d..4c03286d8a 100644
--- a/lib/isccfg/parser.c
+++ b/lib/isccfg/parser.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: parser.c,v 1.122 2006/02/19 06:50:48 marka Exp $ */
+/* $Id: parser.c,v 1.123 2006/02/28 02:39:52 marka Exp $ */
/*! \file */
@@ -70,7 +70,7 @@ static isc_result_t
parse_list(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret);
static void
-print_list(cfg_printer_t *pctx, cfg_obj_t *obj);
+print_list(cfg_printer_t *pctx, const cfg_obj_t *obj);
static void
free_list(cfg_parser_t *pctx, cfg_obj_t *obj);
@@ -136,7 +136,7 @@ static cfg_type_t cfg_type_implicitlist = {
/* Functions. */
void
-cfg_print_obj(cfg_printer_t *pctx, cfg_obj_t *obj) {
+cfg_print_obj(cfg_printer_t *pctx, const cfg_obj_t *obj) {
obj->type->print(pctx, obj);
}
@@ -179,7 +179,7 @@ cfg_parse_obj(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
}
void
-cfg_print(cfg_obj_t *obj,
+cfg_print(const cfg_obj_t *obj,
void (*f)(void *closure, const char *text, int textlen),
void *closure)
{
@@ -245,14 +245,14 @@ cfg_parse_tuple(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret)
}
void
-cfg_print_tuple(cfg_printer_t *pctx, cfg_obj_t *obj) {
+cfg_print_tuple(cfg_printer_t *pctx, const cfg_obj_t *obj) {
unsigned int i;
const cfg_tuplefielddef_t *fields = obj->type->of;
const cfg_tuplefielddef_t *f;
isc_boolean_t need_space = ISC_FALSE;
for (f = fields, i = 0; f->name != NULL; f++, i++) {
- cfg_obj_t *fieldobj = obj->value.tuple[i];
+ const cfg_obj_t *fieldobj = obj->value.tuple[i];
if (need_space)
cfg_print_chars(pctx, " ", 1);
cfg_print_obj(pctx, fieldobj);
@@ -293,13 +293,13 @@ free_tuple(cfg_parser_t *pctx, cfg_obj_t *obj) {
}
isc_boolean_t
-cfg_obj_istuple(cfg_obj_t *obj) {
+cfg_obj_istuple(const cfg_obj_t *obj) {
REQUIRE(obj != NULL);
return (ISC_TF(obj->type->rep == &cfg_rep_tuple));
}
-cfg_obj_t *
-cfg_tuple_get(cfg_obj_t *tupleobj, const char* name) {
+const cfg_obj_t *
+cfg_tuple_get(const cfg_obj_t *tupleobj, const char* name) {
unsigned int i;
const cfg_tuplefielddef_t *fields;
const cfg_tuplefielddef_t *f;
@@ -550,7 +550,7 @@ cfg_parse_void(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
}
void
-cfg_print_void(cfg_printer_t *pctx, cfg_obj_t *obj) {
+cfg_print_void(cfg_printer_t *pctx, const cfg_obj_t *obj) {
UNUSED(pctx);
UNUSED(obj);
}
@@ -562,7 +562,7 @@ cfg_doc_void(cfg_printer_t *pctx, const cfg_type_t *type) {
}
isc_boolean_t
-cfg_obj_isvoid(cfg_obj_t *obj) {
+cfg_obj_isvoid(const cfg_obj_t *obj) {
REQUIRE(obj != NULL);
return (ISC_TF(obj->type->rep == &cfg_rep_void));
}
@@ -608,18 +608,18 @@ cfg_print_rawuint(cfg_printer_t *pctx, unsigned int u) {
}
void
-cfg_print_uint32(cfg_printer_t *pctx, cfg_obj_t *obj) {
+cfg_print_uint32(cfg_printer_t *pctx, const cfg_obj_t *obj) {
cfg_print_rawuint(pctx, obj->value.uint32);
}
isc_boolean_t
-cfg_obj_isuint32(cfg_obj_t *obj) {
+cfg_obj_isuint32(const cfg_obj_t *obj) {
REQUIRE(obj != NULL);
return (ISC_TF(obj->type->rep == &cfg_rep_uint32));
}
isc_uint32_t
-cfg_obj_asuint32(cfg_obj_t *obj) {
+cfg_obj_asuint32(const cfg_obj_t *obj) {
REQUIRE(obj != NULL && obj->type->rep == &cfg_rep_uint32);
return (obj->value.uint32);
}
@@ -634,19 +634,19 @@ cfg_type_t cfg_type_uint32 = {
* uint64
*/
isc_boolean_t
-cfg_obj_isuint64(cfg_obj_t *obj) {
+cfg_obj_isuint64(const cfg_obj_t *obj) {
REQUIRE(obj != NULL);
return (ISC_TF(obj->type->rep == &cfg_rep_uint64));
}
isc_uint64_t
-cfg_obj_asuint64(cfg_obj_t *obj) {
+cfg_obj_asuint64(const cfg_obj_t *obj) {
REQUIRE(obj != NULL && obj->type->rep == &cfg_rep_uint64);
return (obj->value.uint64);
}
void
-cfg_print_uint64(cfg_printer_t *pctx, cfg_obj_t *obj) {
+cfg_print_uint64(cfg_printer_t *pctx, const cfg_obj_t *obj) {
char buf[32];
snprintf(buf, sizeof(buf), "%" ISC_PRINT_QUADFORMAT "u",
obj->value.uint64);
@@ -725,7 +725,9 @@ parse_ustring(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
}
isc_result_t
-cfg_parse_astring(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
+cfg_parse_astring(cfg_parser_t *pctx, const cfg_type_t *type,
+ cfg_obj_t **ret)
+{
isc_result_t result;
UNUSED(type);
@@ -783,12 +785,12 @@ cfg_doc_enum(cfg_printer_t *pctx, const cfg_type_t *type) {
}
void
-cfg_print_ustring(cfg_printer_t *pctx, cfg_obj_t *obj) {
+cfg_print_ustring(cfg_printer_t *pctx, const cfg_obj_t *obj) {
cfg_print_chars(pctx, obj->value.string.base, obj->value.string.length);
}
static void
-print_qstring(cfg_printer_t *pctx, cfg_obj_t *obj) {
+print_qstring(cfg_printer_t *pctx, const cfg_obj_t *obj) {
cfg_print_chars(pctx, "\"", 1);
cfg_print_ustring(pctx, obj);
cfg_print_chars(pctx, "\"", 1);
@@ -801,13 +803,13 @@ free_string(cfg_parser_t *pctx, cfg_obj_t *obj) {
}
isc_boolean_t
-cfg_obj_isstring(cfg_obj_t *obj) {
+cfg_obj_isstring(const cfg_obj_t *obj) {
REQUIRE(obj != NULL);
return (ISC_TF(obj->type->rep == &cfg_rep_string));
}
const char *
-cfg_obj_asstring(cfg_obj_t *obj) {
+cfg_obj_asstring(const cfg_obj_t *obj) {
REQUIRE(obj != NULL && obj->type->rep == &cfg_rep_string);
return (obj->value.string.base);
}
@@ -835,13 +837,13 @@ cfg_type_t cfg_type_astring = {
*/
isc_boolean_t
-cfg_obj_isboolean(cfg_obj_t *obj) {
+cfg_obj_isboolean(const cfg_obj_t *obj) {
REQUIRE(obj != NULL);
return (ISC_TF(obj->type->rep == &cfg_rep_boolean));
}
isc_boolean_t
-cfg_obj_asboolean(cfg_obj_t *obj) {
+cfg_obj_asboolean(const cfg_obj_t *obj) {
REQUIRE(obj != NULL && obj->type->rep == &cfg_rep_boolean);
return (obj->value.boolean);
}
@@ -887,7 +889,7 @@ parse_boolean(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret)
}
static void
-print_boolean(cfg_printer_t *pctx, cfg_obj_t *obj) {
+print_boolean(cfg_printer_t *pctx, const cfg_obj_t *obj) {
if (obj->value.boolean)
cfg_print_chars(pctx, "yes", 3);
else
@@ -1001,9 +1003,9 @@ parse_list(cfg_parser_t *pctx, const cfg_type_t *listtype, cfg_obj_t **ret)
}
static void
-print_list(cfg_printer_t *pctx, cfg_obj_t *obj) {
- cfg_list_t *list = &obj->value.list;
- cfg_listelt_t *elt;
+print_list(cfg_printer_t *pctx, const cfg_obj_t *obj) {
+ const cfg_list_t *list = &obj->value.list;
+ const cfg_listelt_t *elt;
for (elt = ISC_LIST_HEAD(*list);
elt != NULL;
@@ -1027,7 +1029,7 @@ cfg_parse_bracketed_list(cfg_parser_t *pctx, const cfg_type_t *type,
}
void
-cfg_print_bracketed_list(cfg_printer_t *pctx, cfg_obj_t *obj) {
+cfg_print_bracketed_list(cfg_printer_t *pctx, const cfg_obj_t *obj) {
print_open(pctx);
print_list(pctx, obj);
print_close(pctx);
@@ -1074,9 +1076,9 @@ cfg_parse_spacelist(cfg_parser_t *pctx, const cfg_type_t *listtype,
}
void
-cfg_print_spacelist(cfg_printer_t *pctx, cfg_obj_t *obj) {
- cfg_list_t *list = &obj->value.list;
- cfg_listelt_t *elt;
+cfg_print_spacelist(cfg_printer_t *pctx, const cfg_obj_t *obj) {
+ const cfg_list_t *list = &obj->value.list;
+ const cfg_listelt_t *elt;
for (elt = ISC_LIST_HEAD(*list);
elt != NULL;
@@ -1088,27 +1090,27 @@ cfg_print_spacelist(cfg_printer_t *pctx, cfg_obj_t *obj) {
}
isc_boolean_t
-cfg_obj_islist(cfg_obj_t *obj) {
+cfg_obj_islist(const cfg_obj_t *obj) {
REQUIRE(obj != NULL);
return (ISC_TF(obj->type->rep == &cfg_rep_list));
}
-cfg_listelt_t *
-cfg_list_first(cfg_obj_t *obj) {
+const cfg_listelt_t *
+cfg_list_first(const cfg_obj_t *obj) {
REQUIRE(obj == NULL || obj->type->rep == &cfg_rep_list);
if (obj == NULL)
return (NULL);
return (ISC_LIST_HEAD(obj->value.list));
}
-cfg_listelt_t *
-cfg_list_next(cfg_listelt_t *elt) {
+const cfg_listelt_t *
+cfg_list_next(const cfg_listelt_t *elt) {
REQUIRE(elt != NULL);
return (ISC_LIST_NEXT(elt, link));
}
-cfg_obj_t *
-cfg_listelt_value(cfg_listelt_t *elt) {
+const cfg_obj_t *
+cfg_listelt_value(const cfg_listelt_t *elt) {
REQUIRE(elt != NULL);
return (elt->obj);
}
@@ -1376,7 +1378,7 @@ cfg_parse_netprefix_map(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **
}
void
-cfg_print_mapbody(cfg_printer_t *pctx, cfg_obj_t *obj) {
+cfg_print_mapbody(cfg_printer_t *pctx, const cfg_obj_t *obj) {
isc_result_t result = ISC_R_SUCCESS;
const cfg_clausedef_t * const *clauseset;
@@ -1456,7 +1458,7 @@ static struct flagtext {
};
void
-cfg_print_map(cfg_printer_t *pctx, cfg_obj_t *obj) {
+cfg_print_map(cfg_printer_t *pctx, const cfg_obj_t *obj) {
if (obj->value.map.id != NULL) {
cfg_print_obj(pctx, obj->value.map.id);
cfg_print_chars(pctx, " ", 1);
@@ -1518,16 +1520,16 @@ cfg_doc_map(cfg_printer_t *pctx, const cfg_type_t *type) {
}
isc_boolean_t
-cfg_obj_ismap(cfg_obj_t *obj) {
+cfg_obj_ismap(const cfg_obj_t *obj) {
REQUIRE(obj != NULL);
return (ISC_TF(obj->type->rep == &cfg_rep_map));
}
isc_result_t
-cfg_map_get(cfg_obj_t *mapobj, const char* name, cfg_obj_t **obj) {
+cfg_map_get(const cfg_obj_t *mapobj, const char* name, const cfg_obj_t **obj) {
isc_result_t result;
isc_symvalue_t val;
- cfg_map_t *map;
+ const cfg_map_t *map;
REQUIRE(mapobj != NULL && mapobj->type->rep == &cfg_rep_map);
REQUIRE(name != NULL);
@@ -1542,8 +1544,8 @@ cfg_map_get(cfg_obj_t *mapobj, const char* name, cfg_obj_t **obj) {
return (ISC_R_SUCCESS);
}
-cfg_obj_t *
-cfg_map_getname(cfg_obj_t *mapobj) {
+const cfg_obj_t *
+cfg_map_getname(const cfg_obj_t *mapobj) {
REQUIRE(mapobj != NULL && mapobj->type->rep == &cfg_rep_map);
return (mapobj->value.map.id);
}
@@ -1792,7 +1794,7 @@ cfg_parse_rawport(cfg_parser_t *pctx, unsigned int flags, in_port_t *port) {
}
void
-cfg_print_rawaddr(cfg_printer_t *pctx, isc_netaddr_t *na) {
+cfg_print_rawaddr(cfg_printer_t *pctx, const isc_netaddr_t *na) {
isc_result_t result;
char text[128];
isc_buffer_t buf;
@@ -1935,21 +1937,22 @@ cfg_parse_netprefix(cfg_parser_t *pctx, const cfg_type_t *type,
}
static void
-print_netprefix(cfg_printer_t *pctx, cfg_obj_t *obj) {
- cfg_netprefix_t *p = &obj->value.netprefix;
+print_netprefix(cfg_printer_t *pctx, const cfg_obj_t *obj) {
+ const cfg_netprefix_t *p = &obj->value.netprefix;
+
cfg_print_rawaddr(pctx, &p->address);
cfg_print_chars(pctx, "/", 1);
cfg_print_rawuint(pctx, p->prefixlen);
}
isc_boolean_t
-cfg_obj_isnetprefix(cfg_obj_t *obj) {
+cfg_obj_isnetprefix(const cfg_obj_t *obj) {
REQUIRE(obj != NULL);
return (ISC_TF(obj->type->rep == &cfg_rep_netprefix));
}
void
-cfg_obj_asnetprefix(cfg_obj_t *obj, isc_netaddr_t *netaddr,
+cfg_obj_asnetprefix(const cfg_obj_t *obj, isc_netaddr_t *netaddr,
unsigned int *prefixlen) {
REQUIRE(obj != NULL && obj->type->rep == &cfg_rep_netprefix);
*netaddr = obj->value.netprefix.address;
@@ -2000,7 +2003,7 @@ cfg_parse_sockaddr(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret)
}
void
-cfg_print_sockaddr(cfg_printer_t *pctx, cfg_obj_t *obj) {
+cfg_print_sockaddr(cfg_printer_t *pctx, const cfg_obj_t *obj) {
isc_netaddr_t netaddr;
in_port_t port;
char buf[ISC_NETADDR_FORMATSIZE];
@@ -2045,13 +2048,13 @@ cfg_doc_sockaddr(cfg_printer_t *pctx, const cfg_type_t *type) {
}
isc_boolean_t
-cfg_obj_issockaddr(cfg_obj_t *obj) {
+cfg_obj_issockaddr(const cfg_obj_t *obj) {
REQUIRE(obj != NULL);
return (ISC_TF(obj->type->rep == &cfg_rep_sockaddr));
}
-isc_sockaddr_t *
-cfg_obj_assockaddr(cfg_obj_t *obj) {
+const isc_sockaddr_t *
+cfg_obj_assockaddr(const cfg_obj_t *obj) {
REQUIRE(obj != NULL && obj->type->rep == &cfg_rep_sockaddr);
return (&obj->value.sockaddr);
}
@@ -2248,7 +2251,8 @@ parser_complain(cfg_parser_t *pctx, isc_boolean_t is_warning,
}
void
-cfg_obj_log(cfg_obj_t *obj, isc_log_t *lctx, int level, const char *fmt, ...) {
+cfg_obj_log(const cfg_obj_t *obj, isc_log_t *lctx, int level,
+ const char *fmt, ...) {
va_list ap;
char msgbuf[2048];
@@ -2266,12 +2270,12 @@ cfg_obj_log(cfg_obj_t *obj, isc_log_t *lctx, int level, const char *fmt, ...) {
}
const char *
-cfg_obj_file(cfg_obj_t *obj) {
+cfg_obj_file(const cfg_obj_t *obj) {
return (obj->file);
}
unsigned int
-cfg_obj_line(cfg_obj_t *obj) {
+cfg_obj_line(const cfg_obj_t *obj) {
return (obj->line);
}
@@ -2332,7 +2336,7 @@ free_map(cfg_parser_t *pctx, cfg_obj_t *obj) {
}
isc_boolean_t
-cfg_obj_istype(cfg_obj_t *obj, const cfg_type_t *type) {
+cfg_obj_istype(const cfg_obj_t *obj, const cfg_type_t *type) {
return (ISC_TF(obj->type == type));
}
From b1d1934865f601fbcb8cdbb108ebb71f1c3eafae Mon Sep 17 00:00:00 2001
From: Mark Andrews
Date: Tue, 28 Feb 2006 23:30:03 +0000
Subject: [PATCH 062/465] newcopyrights
---
util/copyrights | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/util/copyrights b/util/copyrights
index b9010aab97..3dda56c0f8 100644
--- a/util/copyrights
+++ b/util/copyrights
@@ -1545,7 +1545,7 @@
./lib/bind/port/unknown/Makefile.in MAKE 2001,2004
./lib/bind/port/unknown/include/.cvsignore X 2001
./lib/bind/port/unknown/include/Makefile.in MAKE 2001,2004,2005
-./lib/bind/port_after.h.in X 2001,2005
+./lib/bind/port_after.h.in X 2001,2005,2006
./lib/bind/port_before.h.in X 2001,2005
./lib/bind/resolv/.cvsignore X 2001
./lib/bind/resolv/Makefile.in MAKE 2001,2004,2005
From 6b5c57e52ac8c3e0af1547be3140ebbfb41a85b3 Mon Sep 17 00:00:00 2001
From: Mark Andrews
Date: Tue, 28 Feb 2006 23:30:22 +0000
Subject: [PATCH 063/465] newcopyrights
---
util/copyrights | 60 ++++++++++++++++++++++++-------------------------
1 file changed, 30 insertions(+), 30 deletions(-)
diff --git a/util/copyrights b/util/copyrights
index e091a388a0..4d1bd0c626 100644
--- a/util/copyrights
+++ b/util/copyrights
@@ -83,41 +83,41 @@
./bin/named/include/named/builtin.h C 2001,2004,2005
./bin/named/include/named/client.h C 1999,2000,2001,2002,2003,2004,2005
./bin/named/include/named/config.h C 2001,2002,2004,2005,2006
-./bin/named/include/named/control.h C 2001,2002,2003,2004,2005
-./bin/named/include/named/globals.h C 1999,2000,2001,2002,2003,2004,2005
+./bin/named/include/named/control.h C 2001,2002,2003,2004,2005,2006
+./bin/named/include/named/globals.h C 1999,2000,2001,2002,2003,2004,2005,2006
./bin/named/include/named/interfacemgr.h C 1999,2000,2001,2002,2004,2005
./bin/named/include/named/listenlist.h C 2000,2001,2004,2005
./bin/named/include/named/log.h C 1999,2000,2001,2002,2004,2005
-./bin/named/include/named/logconf.h C 1999,2000,2001,2004,2005
+./bin/named/include/named/logconf.h C 1999,2000,2001,2004,2005,2006
./bin/named/include/named/lwaddr.h C 2000,2001,2004,2005
./bin/named/include/named/lwdclient.h C 2000,2001,2004,2005
-./bin/named/include/named/lwresd.h C 2000,2001,2004,2005
+./bin/named/include/named/lwresd.h C 2000,2001,2004,2005,2006
./bin/named/include/named/lwsearch.h C 2000,2001,2004,2005
./bin/named/include/named/main.h C 1999,2000,2001,2002,2004,2005
./bin/named/include/named/notify.h C 1999,2000,2001,2004,2005
./bin/named/include/named/ns_smf_globals.h C 2005
./bin/named/include/named/query.h C 1999,2000,2001,2002,2004,2005
-./bin/named/include/named/server.h C 1999,2000,2001,2002,2003,2004,2005
-./bin/named/include/named/sortlist.h C 2000,2001,2004,2005
-./bin/named/include/named/tkeyconf.h C 1999,2000,2001,2004,2005
-./bin/named/include/named/tsigconf.h C 1999,2000,2001,2004,2005
+./bin/named/include/named/server.h C 1999,2000,2001,2002,2003,2004,2005,2006
+./bin/named/include/named/sortlist.h C 2000,2001,2004,2005,2006
+./bin/named/include/named/tkeyconf.h C 1999,2000,2001,2004,2005,2006
+./bin/named/include/named/tsigconf.h C 1999,2000,2001,2004,2005,2006
./bin/named/include/named/types.h C 1999,2000,2001,2004,2005
./bin/named/include/named/update.h C 1999,2000,2001,2004,2005
./bin/named/include/named/xfrout.h C 1999,2000,2001,2004,2005
-./bin/named/include/named/zoneconf.h C 1999,2000,2001,2002,2004,2005
+./bin/named/include/named/zoneconf.h C 1999,2000,2001,2002,2004,2005,2006
./bin/named/interfacemgr.c C 1999,2000,2001,2002,2004,2005
./bin/named/listenlist.c C 2000,2001,2004,2005
./bin/named/log.c C 1999,2000,2001,2002,2004,2005
-./bin/named/logconf.c C 1999,2000,2001,2004,2005
+./bin/named/logconf.c C 1999,2000,2001,2004,2005,2006
./bin/named/lwaddr.c C 2000,2001,2004,2005
./bin/named/lwdclient.c C 2000,2001,2004,2005
./bin/named/lwderror.c C 2000,2001,2004,2005
-./bin/named/lwdgabn.c C 2000,2001,2004,2005
+./bin/named/lwdgabn.c C 2000,2001,2004,2005,2006
./bin/named/lwdgnba.c C 2000,2001,2002,2004,2005
./bin/named/lwdgrbn.c C 2000,2001,2003,2004,2005
./bin/named/lwdnoop.c C 2000,2001,2004,2005
./bin/named/lwresd.8 MAN DOCBOOK
-./bin/named/lwresd.c C 2000,2001,2002,2003,2004,2005
+./bin/named/lwresd.c C 2000,2001,2002,2003,2004,2005,2006
./bin/named/lwresd.docbook SGML 2000,2001,2004,2005
./bin/named/lwresd.html HTML DOCBOOK
./bin/named/lwsearch.c C 2000,2001,2004,2005
@@ -131,8 +131,8 @@
./bin/named/notify.c C 1999,2000,2001,2002,2003,2004,2005
./bin/named/query.c C 1999,2000,2001,2002,2003,2004,2005,2006
./bin/named/server.c C 1999,2000,2001,2002,2003,2004,2005,2006
-./bin/named/sortlist.c C 2000,2001,2004,2005
-./bin/named/tkeyconf.c C 1999,2000,2001,2004,2005
+./bin/named/sortlist.c C 2000,2001,2004,2005,2006
+./bin/named/tkeyconf.c C 1999,2000,2001,2004,2005,2006
./bin/named/tsigconf.c C 1999,2000,2001,2004,2005,2006
./bin/named/unix/.cvsignore X 1999,2000,2001
./bin/named/unix/Makefile.in MAKE 1999,2000,2001,2004
@@ -165,7 +165,7 @@
./bin/rndc/rndc-confgen.docbook SGML 2001,2003,2004,2005
./bin/rndc/rndc-confgen.html HTML DOCBOOK
./bin/rndc/rndc.8 MAN DOCBOOK
-./bin/rndc/rndc.c C 2000,2001,2002,2003,2004,2005
+./bin/rndc/rndc.c C 2000,2001,2002,2003,2004,2005,2006
./bin/rndc/rndc.conf CONF-C 2000,2001,2004
./bin/rndc/rndc.conf.5 MAN DOCBOOK
./bin/rndc/rndc.conf.docbook SGML 2000,2001,2004,2005
@@ -1634,7 +1634,7 @@
./lib/bind/port/unknown/Makefile.in MAKE 2001,2004
./lib/bind/port/unknown/include/.cvsignore X 2001
./lib/bind/port/unknown/include/Makefile.in MAKE 2001,2004,2005
-./lib/bind/port_after.h.in X 2001,2005
+./lib/bind/port_after.h.in X 2001,2005,2006
./lib/bind/port_before.h.in X 2001,2005
./lib/bind/resolv/.cvsignore X 2001
./lib/bind/resolv/Makefile.in MAKE 2001,2004,2005
@@ -1663,7 +1663,7 @@
./lib/bind9/include/Makefile.in MAKE 2001,2004
./lib/bind9/include/bind9/.cvsignore X 2001
./lib/bind9/include/bind9/Makefile.in MAKE 2001,2004
-./lib/bind9/include/bind9/check.h C 2001,2004,2005
+./lib/bind9/include/bind9/check.h C 2001,2004,2005,2006
./lib/bind9/include/bind9/getaddresses.h C 2001,2004,2005
./lib/bind9/include/bind9/version.h C 2001,2004,2005
./lib/bind9/version.c C 2001,2004,2005
@@ -1676,13 +1676,13 @@
./lib/dns/.cvsignore X 1999,2000,2001
./lib/dns/Makefile.in MAKE 1998,1999,2000,2001,2002,2003,2004,2005,2006
./lib/dns/acache.c C 2004,2005
-./lib/dns/acl.c C 1999,2000,2001,2002,2004,2005
+./lib/dns/acl.c C 1999,2000,2001,2002,2004,2005,2006
./lib/dns/adb.c C 1999,2000,2001,2002,2003,2004,2005
./lib/dns/api X 1999,2000,2001
./lib/dns/byaddr.c C 2000,2001,2002,2003,2004,2005
./lib/dns/cache.c C 1999,2000,2001,2002,2003,2004,2005,2006
./lib/dns/callbacks.c C 1999,2000,2001,2004,2005
-./lib/dns/compress.c C 1999,2000,2001,2004,2005
+./lib/dns/compress.c C 1999,2000,2001,2004,2005,2006
./lib/dns/db.c C 1999,2000,2001,2003,2004,2005
./lib/dns/dbiterator.c C 1999,2000,2001,2004,2005
./lib/dns/dbtable.c C 1999,2000,2001,2004,2005
@@ -1710,14 +1710,14 @@
./lib/dns/include/dns/.cvsignore X 1999,2000,2001
./lib/dns/include/dns/Makefile.in MAKE 1998,1999,2000,2001,2002,2003,2004
./lib/dns/include/dns/acache.h C 2004
-./lib/dns/include/dns/acl.h C 1999,2000,2001,2002,2004,2005
+./lib/dns/include/dns/acl.h C 1999,2000,2001,2002,2004,2005,2006
./lib/dns/include/dns/adb.h C 1999,2000,2001,2002,2003,2004,2005
./lib/dns/include/dns/bit.h C 2000,2001,2004,2005
./lib/dns/include/dns/byaddr.h C 2000,2001,2002,2003,2004,2005
./lib/dns/include/dns/cache.h C 1999,2000,2001,2004,2005
./lib/dns/include/dns/callbacks.h C 1999,2000,2001,2002,2004,2005
./lib/dns/include/dns/cert.h C 1999,2000,2001,2004,2005
-./lib/dns/include/dns/compress.h C 1999,2000,2001,2002,2004,2005
+./lib/dns/include/dns/compress.h C 1999,2000,2001,2002,2004,2005,2006
./lib/dns/include/dns/db.h C 1999,2000,2001,2002,2003,2004,2005
./lib/dns/include/dns/dbiterator.h C 1999,2000,2001,2004,2005
./lib/dns/include/dns/dbtable.h C 1999,2000,2001,2004,2005
@@ -1739,7 +1739,7 @@
./lib/dns/include/dns/master.h C 1999,2000,2001,2002,2004,2005
./lib/dns/include/dns/masterdump.h C 1999,2000,2001,2002,2004,2005
./lib/dns/include/dns/message.h C 1999,2000,2001,2002,2003,2004,2005,2006
-./lib/dns/include/dns/name.h C 1998,1999,2000,2001,2002,2003,2004,2005
+./lib/dns/include/dns/name.h C 1998,1999,2000,2001,2002,2003,2004,2005,2006
./lib/dns/include/dns/ncache.h C 1999,2000,2001,2002,2004,2005
./lib/dns/include/dns/nsec.h C 1999,2000,2001,2003,2004,2005
./lib/dns/include/dns/opcode.h C 2002,2004,2005
@@ -1751,7 +1751,7 @@
./lib/dns/include/dns/rdata.h C 1998,1999,2000,2001,2002,2003,2004,2005
./lib/dns/include/dns/rdataclass.h C 1998,1999,2000,2001,2004,2005
./lib/dns/include/dns/rdatalist.h C 1999,2000,2001,2004,2005
-./lib/dns/include/dns/rdataset.h C 1999,2000,2001,2002,2003,2004,2005
+./lib/dns/include/dns/rdataset.h C 1999,2000,2001,2002,2003,2004,2005,2006
./lib/dns/include/dns/rdatasetiter.h C 1999,2000,2001,2004,2005
./lib/dns/include/dns/rdataslab.h C 1999,2000,2001,2002,2004,2005
./lib/dns/include/dns/rdatatype.h C 1998,1999,2000,2001,2004,2005
@@ -1920,7 +1920,7 @@
./lib/dns/rdata/rdatastructsuf.h C 1999,2000,2001,2004
./lib/dns/rdatalist.c C 1999,2000,2001,2003,2004,2005
./lib/dns/rdatalist_p.h C 2000,2001,2004,2005
-./lib/dns/rdataset.c C 1999,2000,2001,2002,2003,2004,2005
+./lib/dns/rdataset.c C 1999,2000,2001,2002,2003,2004,2005,2006
./lib/dns/rdatasetiter.c C 1999,2000,2001,2004,2005
./lib/dns/rdataslab.c C 1999,2000,2001,2002,2003,2004,2005
./lib/dns/request.c C 2000,2001,2002,2004,2005,2006
@@ -2030,12 +2030,12 @@
./lib/isc/include/isc/serial.h C 1999,2000,2001,2004,2005
./lib/isc/include/isc/sha1.h C 2000,2001,2004,2005,2006
./lib/isc/include/isc/sha2.h C 2005,2006
-./lib/isc/include/isc/sockaddr.h C 1998,1999,2000,2001,2002,2003,2004,2005
+./lib/isc/include/isc/sockaddr.h C 1998,1999,2000,2001,2002,2003,2004,2005,2006
./lib/isc/include/isc/socket.h C 1998,1999,2000,2001,2002,2004,2005
./lib/isc/include/isc/stdio.h C 2000,2001,2004,2005
./lib/isc/include/isc/stdlib.h C 2003,2004,2005
./lib/isc/include/isc/string.h C 2000,2001,2003,2004,2005
-./lib/isc/include/isc/symtab.h C 1996,1997,1998,1999,2000,2001,2004,2005
+./lib/isc/include/isc/symtab.h C 1996,1997,1998,1999,2000,2001,2004,2005,2006
./lib/isc/include/isc/task.h C 1998,1999,2000,2001,2003,2004,2005
./lib/isc/include/isc/taskpool.h C 1999,2000,2001,2004,2005
./lib/isc/include/isc/timer.h C 1998,1999,2000,2001,2002,2004,2005
@@ -2099,7 +2099,7 @@
./lib/isc/serial.c C 1999,2000,2001,2004,2005
./lib/isc/sha1.c C 2000,2001,2003,2004,2005
./lib/isc/sha2.c C 2005,2006
-./lib/isc/sockaddr.c C 1999,2000,2001,2002,2003,2004,2005
+./lib/isc/sockaddr.c C 1999,2000,2001,2002,2003,2004,2005,2006
./lib/isc/sparc64/include/isc/atomic.h C 2005
./lib/isc/string.c C 1999,2000,2001,2003,2004,2005
./lib/isc/strtoul.c C 2003,2004,2005
@@ -2251,14 +2251,14 @@
./lib/isccc/win32/version.c C 2001,2004
./lib/isccfg/.cvsignore X 2001
./lib/isccfg/Makefile.in MAKE 2001,2002,2003,2004,2005
-./lib/isccfg/aclconf.c C 1999,2000,2001,2002,2004,2005
+./lib/isccfg/aclconf.c C 1999,2000,2001,2002,2004,2005,2006
./lib/isccfg/api X 2001
./lib/isccfg/include/.cvsignore X 2001
./lib/isccfg/include/Makefile.in MAKE 2001,2004
./lib/isccfg/include/isccfg/.cvsignore X 2001
./lib/isccfg/include/isccfg/Makefile.in MAKE 2001,2002,2004,2005
-./lib/isccfg/include/isccfg/aclconf.h C 1999,2000,2001,2004,2005
-./lib/isccfg/include/isccfg/cfg.h C 2000,2001,2002,2004,2005
+./lib/isccfg/include/isccfg/aclconf.h C 1999,2000,2001,2004,2005,2006
+./lib/isccfg/include/isccfg/cfg.h C 2000,2001,2002,2004,2005,2006
./lib/isccfg/include/isccfg/grammar.h C 2002,2003,2004,2005,2006
./lib/isccfg/include/isccfg/log.h C 2001,2004,2005
./lib/isccfg/include/isccfg/namedconf.h C 2002,2004,2005
From 441b3a264bfc7f193b0fb5807660aaa904471f09 Mon Sep 17 00:00:00 2001
From: Mark Andrews
Date: Wed, 1 Mar 2006 01:34:08 +0000
Subject: [PATCH 064/465] 1991. [cleanup] The configuration data, once
read, should be treated as readonly. Expand the use
of const to enforce this at compile time. [RT #15813]
---
CHANGES | 4 +
bin/check/named-checkconf.c | 6 +-
bin/named/aclconf.c | 30 ++---
bin/named/config.c | 52 ++++----
bin/named/controlconf.c | 100 +++++++-------
bin/named/include/named/aclconf.h | 6 +-
bin/named/include/named/config.h | 20 +--
bin/named/include/named/control.h | 4 +-
bin/named/include/named/globals.h | 4 +-
bin/named/include/named/logconf.h | 4 +-
bin/named/include/named/lwresd.h | 7 +-
bin/named/include/named/server.h | 4 +-
bin/named/include/named/sortlist.h | 13 +-
bin/named/include/named/tkeyconf.h | 6 +-
bin/named/include/named/tsigconf.h | 4 +-
bin/named/include/named/zoneconf.h | 9 +-
bin/named/logconf.c | 58 +++++----
bin/named/lwdgabn.c | 4 +-
bin/named/lwresd.c | 22 ++--
bin/named/query.c | 10 +-
bin/named/server.c | 202 +++++++++++++++--------------
bin/named/sortlist.c | 18 +--
bin/named/tkeyconf.c | 10 +-
bin/named/tsigconf.c | 26 ++--
bin/named/zoneconf.c | 67 +++++-----
bin/rndc/rndc.c | 24 ++--
lib/dns/acl.c | 34 ++---
lib/dns/cache.c | 4 +-
lib/dns/compress.c | 10 +-
lib/dns/include/dns/acl.h | 30 ++---
lib/dns/include/dns/cache.h | 4 +-
lib/dns/include/dns/compress.h | 8 +-
lib/dns/include/dns/masterdump.h | 4 +-
lib/dns/include/dns/message.h | 6 +-
lib/dns/include/dns/name.h | 9 +-
lib/dns/include/dns/rdataset.h | 12 +-
lib/dns/include/dns/types.h | 4 +-
lib/dns/include/dns/zone.h | 22 ++--
lib/dns/message.c | 6 +-
lib/dns/name.c | 12 +-
lib/dns/rdataset.c | 16 +--
lib/dns/zone.c | 22 ++--
lib/isc/include/isc/sockaddr.h | 10 +-
lib/isc/include/isc/symtab.h | 3 +-
lib/isc/sockaddr.c | 10 +-
lib/isccfg/check.c | 105 +++++++--------
lib/isccfg/include/isccfg/cfg.h | 69 +++++-----
lib/isccfg/include/isccfg/check.h | 7 +-
lib/isccfg/parser.c | 143 ++++++++++----------
49 files changed, 653 insertions(+), 611 deletions(-)
diff --git a/CHANGES b/CHANGES
index 9e9a15f630..86bec10f5f 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,7 @@
+1991. [cleanup] The configuration data, once read, should be treated
+ as readonly. Expand the use of const to enforce this
+ at compile time. [RT #15813]
+
1990. [bug] libbind: isc's override of broken gettimeofday()
implementions was not always effective.
[RT #15709]
diff --git a/bin/check/named-checkconf.c b/bin/check/named-checkconf.c
index 83d3cd9441..98f24c3a58 100644
--- a/bin/check/named-checkconf.c
+++ b/bin/check/named-checkconf.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: named-checkconf.c,v 1.12.2.1 2004/03/09 06:09:09 marka Exp $ */
+/* $Id: named-checkconf.c,v 1.12.2.2 2006/03/01 01:34:04 marka Exp $ */
#include
@@ -45,9 +45,9 @@ usage(void) {
}
static isc_result_t
-directory_callback(const char *clausename, cfg_obj_t *obj, void *arg) {
+directory_callback(const char *clausename, const cfg_obj_t *obj, void *arg) {
isc_result_t result;
- char *directory;
+ const char *directory;
REQUIRE(strcasecmp("directory", clausename) == 0);
diff --git a/bin/named/aclconf.c b/bin/named/aclconf.c
index ef684fcc2d..c2459f2a72 100644
--- a/bin/named/aclconf.c
+++ b/bin/named/aclconf.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: aclconf.c,v 1.27.2.3 2005/03/17 03:59:29 marka Exp $ */
+/* $Id: aclconf.c,v 1.27.2.4 2006/03/01 01:34:04 marka Exp $ */
#include
@@ -52,10 +52,10 @@ ns_aclconfctx_destroy(ns_aclconfctx_t *ctx) {
* Find the definition of the named acl whose name is "name".
*/
static isc_result_t
-get_acl_def(cfg_obj_t *cctx, char *name, cfg_obj_t **ret) {
+get_acl_def(const cfg_obj_t *cctx, const char *name, const cfg_obj_t **ret) {
isc_result_t result;
- cfg_obj_t *acls = NULL;
- cfg_listelt_t *elt;
+ const cfg_obj_t *acls = NULL;
+ const cfg_listelt_t *elt;
result = cfg_map_get(cctx, "acl", &acls);
if (result != ISC_R_SUCCESS)
@@ -63,7 +63,7 @@ get_acl_def(cfg_obj_t *cctx, char *name, cfg_obj_t **ret) {
for (elt = cfg_list_first(acls);
elt != NULL;
elt = cfg_list_next(elt)) {
- cfg_obj_t *acl = cfg_listelt_value(elt);
+ const cfg_obj_t *acl = cfg_listelt_value(elt);
const char *aclname = cfg_obj_asstring(cfg_tuple_get(acl, "name"));
if (strcasecmp(aclname, name) == 0) {
*ret = cfg_tuple_get(acl, "value");
@@ -74,15 +74,15 @@ get_acl_def(cfg_obj_t *cctx, char *name, cfg_obj_t **ret) {
}
static isc_result_t
-convert_named_acl(cfg_obj_t *nameobj, cfg_obj_t *cctx,
+convert_named_acl(const cfg_obj_t *nameobj, const cfg_obj_t *cctx,
ns_aclconfctx_t *ctx, isc_mem_t *mctx,
dns_acl_t **target)
{
isc_result_t result;
- cfg_obj_t *cacl = NULL;
+ const cfg_obj_t *cacl = NULL;
dns_acl_t *dacl;
dns_acl_t loop;
- char *aclname = cfg_obj_asstring(nameobj);
+ const char *aclname = cfg_obj_asstring(nameobj);
/* Look for an already-converted version. */
for (dacl = ISC_LIST_HEAD(ctx->named_acl_cache);
@@ -111,7 +111,7 @@ convert_named_acl(cfg_obj_t *nameobj, cfg_obj_t *cctx,
*/
memset(&loop, 0, sizeof(loop));
ISC_LINK_INIT(&loop, nextincache);
- loop.name = aclname;
+ DE_CONST(aclname, loop.name);
loop.magic = LOOP_MAGIC;
ISC_LIST_APPEND(ctx->named_acl_cache, &loop, nextincache);
result = ns_acl_fromconfig(cacl, cctx, ctx, mctx, &dacl);
@@ -129,7 +129,7 @@ convert_named_acl(cfg_obj_t *nameobj, cfg_obj_t *cctx,
}
static isc_result_t
-convert_keyname(cfg_obj_t *keyobj, isc_mem_t *mctx, dns_name_t *dnsname) {
+convert_keyname(const cfg_obj_t *keyobj, isc_mem_t *mctx, dns_name_t *dnsname) {
isc_result_t result;
isc_buffer_t buf;
dns_fixedname_t fixname;
@@ -152,8 +152,8 @@ convert_keyname(cfg_obj_t *keyobj, isc_mem_t *mctx, dns_name_t *dnsname) {
}
isc_result_t
-ns_acl_fromconfig(cfg_obj_t *caml,
- cfg_obj_t *cctx,
+ns_acl_fromconfig(const cfg_obj_t *caml,
+ const cfg_obj_t *cctx,
ns_aclconfctx_t *ctx,
isc_mem_t *mctx,
dns_acl_t **target)
@@ -162,7 +162,7 @@ ns_acl_fromconfig(cfg_obj_t *caml,
unsigned int count;
dns_acl_t *dacl = NULL;
dns_aclelement_t *de;
- cfg_listelt_t *elt;
+ const cfg_listelt_t *elt;
REQUIRE(target != NULL && *target == NULL);
@@ -181,7 +181,7 @@ ns_acl_fromconfig(cfg_obj_t *caml,
elt != NULL;
elt = cfg_list_next(elt))
{
- cfg_obj_t *ce = cfg_listelt_value(elt);
+ const cfg_obj_t *ce = cfg_listelt_value(elt);
if (cfg_obj_istuple(ce)) {
/* This must be a negated element. */
ce = cfg_tuple_get(ce, "value");
@@ -213,7 +213,7 @@ ns_acl_fromconfig(cfg_obj_t *caml,
goto cleanup;
} else if (cfg_obj_isstring(ce)) {
/* ACL name */
- char *name = cfg_obj_asstring(ce);
+ const char *name = cfg_obj_asstring(ce);
if (strcasecmp(name, "localhost") == 0) {
de->type = dns_aclelementtype_localhost;
} else if (strcasecmp(name, "localnets") == 0) {
diff --git a/bin/named/config.c b/bin/named/config.c
index 57cbd8c378..b8e639fe39 100644
--- a/bin/named/config.c
+++ b/bin/named/config.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: config.c,v 1.11.2.8 2006/01/04 23:50:16 marka Exp $ */
+/* $Id: config.c,v 1.11.2.9 2006/03/01 01:34:04 marka Exp $ */
#include
@@ -156,7 +156,7 @@ ns_config_parsedefaults(cfg_parser_t *parser, cfg_obj_t **conf) {
}
isc_result_t
-ns_config_get(cfg_obj_t **maps, const char* name, cfg_obj_t **obj) {
+ns_config_get(const cfg_obj_t **maps, const char* name, const cfg_obj_t **obj) {
int i;
for (i = 0; ; i++) {
@@ -168,8 +168,8 @@ ns_config_get(cfg_obj_t **maps, const char* name, cfg_obj_t **obj) {
}
int
-ns_config_listcount(cfg_obj_t *list) {
- cfg_listelt_t *e;
+ns_config_listcount(const cfg_obj_t *list) {
+ const cfg_listelt_t *e;
int i = 0;
for (e = cfg_list_first(list); e != NULL; e = cfg_list_next(e))
@@ -179,9 +179,9 @@ ns_config_listcount(cfg_obj_t *list) {
}
isc_result_t
-ns_config_getclass(cfg_obj_t *classobj, dns_rdataclass_t defclass,
+ns_config_getclass(const cfg_obj_t *classobj, dns_rdataclass_t defclass,
dns_rdataclass_t *classp) {
- char *str;
+ const char *str;
isc_textregion_t r;
isc_result_t result;
@@ -190,7 +190,7 @@ ns_config_getclass(cfg_obj_t *classobj, dns_rdataclass_t defclass,
return (ISC_R_SUCCESS);
}
str = cfg_obj_asstring(classobj);
- r.base = str;
+ DE_CONST(str, r.base);
r.length = strlen(str);
result = dns_rdataclass_fromtext(classp, &r);
if (result != ISC_R_SUCCESS)
@@ -200,9 +200,9 @@ ns_config_getclass(cfg_obj_t *classobj, dns_rdataclass_t defclass,
}
dns_zonetype_t
-ns_config_getzonetype(cfg_obj_t *zonetypeobj) {
+ns_config_getzonetype(const cfg_obj_t *zonetypeobj) {
dns_zonetype_t ztype = dns_zone_none;
- char *str;
+ const char *str;
str = cfg_obj_asstring(zonetypeobj);
if (strcasecmp(str, "master") == 0)
@@ -217,14 +217,14 @@ ns_config_getzonetype(cfg_obj_t *zonetypeobj) {
}
isc_result_t
-ns_config_getiplist(cfg_obj_t *config, cfg_obj_t *list,
+ns_config_getiplist(const cfg_obj_t *config, const cfg_obj_t *list,
in_port_t defport, isc_mem_t *mctx,
isc_sockaddr_t **addrsp, isc_uint32_t *countp)
{
int count, i = 0;
- cfg_obj_t *addrlist;
- cfg_obj_t *portobj;
- cfg_listelt_t *element;
+ const cfg_obj_t *addrlist;
+ const cfg_obj_t *portobj;
+ const cfg_listelt_t *element;
isc_sockaddr_t *addrs;
in_port_t port;
isc_result_t result;
@@ -283,15 +283,15 @@ ns_config_putiplist(isc_mem_t *mctx, isc_sockaddr_t **addrsp,
}
isc_result_t
-ns_config_getipandkeylist(cfg_obj_t *config, cfg_obj_t *list, isc_mem_t *mctx,
- isc_sockaddr_t **addrsp, dns_name_t ***keysp,
- isc_uint32_t *countp)
+ns_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
+ isc_mem_t *mctx, isc_sockaddr_t **addrsp,
+ dns_name_t ***keysp, isc_uint32_t *countp)
{
isc_uint32_t count, i = 0;
isc_result_t result;
- cfg_listelt_t *element;
- cfg_obj_t *addrlist;
- cfg_obj_t *portobj;
+ const cfg_listelt_t *element;
+ const cfg_obj_t *addrlist;
+ const cfg_obj_t *portobj;
in_port_t port;
dns_fixedname_t fname;
isc_sockaddr_t *addrs = NULL;
@@ -332,9 +332,9 @@ ns_config_getipandkeylist(cfg_obj_t *config, cfg_obj_t *list, isc_mem_t *mctx,
element != NULL;
element = cfg_list_next(element), i++)
{
- cfg_obj_t *addr;
- cfg_obj_t *key;
- char *keystr;
+ const cfg_obj_t *addr;
+ const cfg_obj_t *key;
+ const char *keystr;
isc_buffer_t b;
INSIST(i < count);
@@ -415,10 +415,10 @@ ns_config_putipandkeylist(isc_mem_t *mctx, isc_sockaddr_t **addrsp,
}
isc_result_t
-ns_config_getport(cfg_obj_t *config, in_port_t *portp) {
- cfg_obj_t *maps[3];
- cfg_obj_t *options = NULL;
- cfg_obj_t *portobj = NULL;
+ns_config_getport(const cfg_obj_t *config, in_port_t *portp) {
+ const cfg_obj_t *maps[3];
+ const cfg_obj_t *options = NULL;
+ const cfg_obj_t *portobj = NULL;
isc_result_t result;
int i;
diff --git a/bin/named/controlconf.c b/bin/named/controlconf.c
index ceb3e2e8a7..ba3b381ea2 100644
--- a/bin/named/controlconf.c
+++ b/bin/named/controlconf.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: controlconf.c,v 1.28.2.13 2006/01/04 23:50:16 marka Exp $ */
+/* $Id: controlconf.c,v 1.28.2.14 2006/03/01 01:34:05 marka Exp $ */
#include
@@ -656,10 +656,12 @@ ns_controls_shutdown(ns_controls_t *controls) {
}
static isc_result_t
-cfgkeylist_find(cfg_obj_t *keylist, const char *keyname, cfg_obj_t **objp) {
- cfg_listelt_t *element;
+cfgkeylist_find(const cfg_obj_t *keylist, const char *keyname,
+ const cfg_obj_t **objp)
+{
+ const cfg_listelt_t *element;
const char *str;
- cfg_obj_t *obj;
+ const cfg_obj_t *obj;
for (element = cfg_list_first(keylist);
element != NULL;
@@ -678,13 +680,13 @@ cfgkeylist_find(cfg_obj_t *keylist, const char *keyname, cfg_obj_t **objp) {
}
static isc_result_t
-controlkeylist_fromcfg(cfg_obj_t *keylist, isc_mem_t *mctx,
+controlkeylist_fromcfg(const cfg_obj_t *keylist, isc_mem_t *mctx,
controlkeylist_t *keyids)
{
- cfg_listelt_t *element;
+ const cfg_listelt_t *element;
char *newstr = NULL;
const char *str;
- cfg_obj_t *obj;
+ const cfg_obj_t *obj;
controlkey_t *key = NULL;
for (element = cfg_list_first(keylist);
@@ -719,11 +721,11 @@ controlkeylist_fromcfg(cfg_obj_t *keylist, isc_mem_t *mctx,
}
static void
-register_keys(cfg_obj_t *control, cfg_obj_t *keylist,
+register_keys(const cfg_obj_t *control, const cfg_obj_t *keylist,
controlkeylist_t *keyids, isc_mem_t *mctx, const char *socktext)
{
controlkey_t *keyid, *next;
- cfg_obj_t *keydef;
+ const cfg_obj_t *keydef;
char secret[1024];
isc_buffer_t b;
isc_result_t result;
@@ -743,10 +745,10 @@ register_keys(cfg_obj_t *control, cfg_obj_t *keylist,
ISC_LIST_UNLINK(*keyids, keyid, link);
free_controlkey(keyid, mctx);
} else {
- cfg_obj_t *algobj = NULL;
- cfg_obj_t *secretobj = NULL;
- char *algstr = NULL;
- char *secretstr = NULL;
+ const cfg_obj_t *algobj = NULL;
+ const cfg_obj_t *secretobj = NULL;
+ const char *algstr = NULL;
+ const char *secretstr = NULL;
(void)cfg_map_get(keydef, "algorithm", &algobj);
(void)cfg_map_get(keydef, "secret", &secretobj);
@@ -812,11 +814,11 @@ get_rndckey(isc_mem_t *mctx, controlkeylist_t *keyids) {
isc_result_t result;
cfg_parser_t *pctx = NULL;
cfg_obj_t *config = NULL;
- cfg_obj_t *key = NULL;
- cfg_obj_t *algobj = NULL;
- cfg_obj_t *secretobj = NULL;
- char *algstr = NULL;
- char *secretstr = NULL;
+ const cfg_obj_t *key = NULL;
+ const cfg_obj_t *algobj = NULL;
+ const cfg_obj_t *secretobj = NULL;
+ const char *algstr = NULL;
+ const char *secretstr = NULL;
controlkey_t *keyid = NULL;
char secret[1024];
isc_buffer_t b;
@@ -895,12 +897,13 @@ get_rndckey(isc_mem_t *mctx, controlkeylist_t *keyids) {
* valid or both are NULL.
*/
static void
-get_key_info(cfg_obj_t *config, cfg_obj_t *control,
- cfg_obj_t **global_keylistp, cfg_obj_t **control_keylistp)
+get_key_info(const cfg_obj_t *config, const cfg_obj_t *control,
+ const cfg_obj_t **global_keylistp,
+ const cfg_obj_t **control_keylistp)
{
isc_result_t result;
- cfg_obj_t *control_keylist = NULL;
- cfg_obj_t *global_keylist = NULL;
+ const cfg_obj_t *control_keylist = NULL;
+ const cfg_obj_t *global_keylist = NULL;
REQUIRE(global_keylistp != NULL && *global_keylistp == NULL);
REQUIRE(control_keylistp != NULL && *control_keylistp == NULL);
@@ -919,15 +922,15 @@ get_key_info(cfg_obj_t *config, cfg_obj_t *control,
}
static void
-update_listener(ns_controls_t *cp,
- controllistener_t **listenerp, cfg_obj_t *control,
- cfg_obj_t *config, isc_sockaddr_t *addr,
- ns_aclconfctx_t *aclconfctx, const char *socktext)
+update_listener(ns_controls_t *cp, controllistener_t **listenerp,
+ const cfg_obj_t *control, const cfg_obj_t *config,
+ isc_sockaddr_t *addr, ns_aclconfctx_t *aclconfctx,
+ const char *socktext)
{
controllistener_t *listener;
- cfg_obj_t *allow;
- cfg_obj_t *global_keylist = NULL;
- cfg_obj_t *control_keylist = NULL;
+ const cfg_obj_t *allow;
+ const cfg_obj_t *global_keylist = NULL;
+ const cfg_obj_t *control_keylist = NULL;
dns_acl_t *new_acl = NULL;
controlkeylist_t keys;
isc_result_t result = ISC_R_SUCCESS;
@@ -1037,14 +1040,15 @@ update_listener(ns_controls_t *cp,
static void
add_listener(ns_controls_t *cp, controllistener_t **listenerp,
- cfg_obj_t *control, cfg_obj_t *config, isc_sockaddr_t *addr,
- ns_aclconfctx_t *aclconfctx, const char *socktext)
+ const cfg_obj_t *control, const cfg_obj_t *config,
+ isc_sockaddr_t *addr, ns_aclconfctx_t *aclconfctx,
+ const char *socktext)
{
isc_mem_t *mctx = cp->server->mctx;
controllistener_t *listener;
- cfg_obj_t *allow;
- cfg_obj_t *global_keylist = NULL;
- cfg_obj_t *control_keylist = NULL;
+ const cfg_obj_t *allow;
+ const cfg_obj_t *global_keylist = NULL;
+ const cfg_obj_t *control_keylist = NULL;
dns_acl_t *new_acl = NULL;
isc_result_t result = ISC_R_SUCCESS;
@@ -1155,13 +1159,13 @@ add_listener(ns_controls_t *cp, controllistener_t **listenerp,
}
isc_result_t
-ns_controls_configure(ns_controls_t *cp, cfg_obj_t *config,
+ns_controls_configure(ns_controls_t *cp, const cfg_obj_t *config,
ns_aclconfctx_t *aclconfctx)
{
controllistener_t *listener;
controllistenerlist_t new_listeners;
- cfg_obj_t *controlslist = NULL;
- cfg_listelt_t *element, *element2;
+ const cfg_obj_t *controlslist = NULL;
+ const cfg_listelt_t *element, *element2;
char socktext[ISC_SOCKADDR_FORMATSIZE];
ISC_LIST_INIT(new_listeners);
@@ -1183,8 +1187,8 @@ ns_controls_configure(ns_controls_t *cp, cfg_obj_t *config,
for (element = cfg_list_first(controlslist);
element != NULL;
element = cfg_list_next(element)) {
- cfg_obj_t *controls;
- cfg_obj_t *inetcontrols = NULL;
+ const cfg_obj_t *controls;
+ const cfg_obj_t *inetcontrols = NULL;
controls = cfg_listelt_value(element);
(void)cfg_map_get(controls, "inet", &inetcontrols);
@@ -1194,9 +1198,9 @@ ns_controls_configure(ns_controls_t *cp, cfg_obj_t *config,
for (element2 = cfg_list_first(inetcontrols);
element2 != NULL;
element2 = cfg_list_next(element2)) {
- cfg_obj_t *control;
- cfg_obj_t *obj;
- isc_sockaddr_t *addr;
+ const cfg_obj_t *control;
+ const cfg_obj_t *obj;
+ isc_sockaddr_t addr;
/*
* The parser handles BIND 8 configuration file
@@ -1209,12 +1213,12 @@ ns_controls_configure(ns_controls_t *cp, cfg_obj_t *config,
control = cfg_listelt_value(element2);
obj = cfg_tuple_get(control, "address");
- addr = cfg_obj_assockaddr(obj);
- if (isc_sockaddr_getport(addr) == 0)
- isc_sockaddr_setport(addr,
+ addr = *cfg_obj_assockaddr(obj);
+ if (isc_sockaddr_getport(&addr) == 0)
+ isc_sockaddr_setport(&addr,
NS_CONTROL_PORT);
- isc_sockaddr_format(addr, socktext,
+ isc_sockaddr_format(&addr, socktext,
sizeof(socktext));
isc_log_write(ns_g_lctx,
@@ -1225,7 +1229,7 @@ ns_controls_configure(ns_controls_t *cp, cfg_obj_t *config,
socktext);
update_listener(cp, &listener, control, config,
- addr, aclconfctx, socktext);
+ &addr, aclconfctx, socktext);
if (listener != NULL)
/*
@@ -1239,7 +1243,7 @@ ns_controls_configure(ns_controls_t *cp, cfg_obj_t *config,
* This is a new listener.
*/
add_listener(cp, &listener, control,
- config, addr, aclconfctx,
+ config, &addr, aclconfctx,
socktext);
if (listener != NULL)
diff --git a/bin/named/include/named/aclconf.h b/bin/named/include/named/aclconf.h
index 639ce5686c..661b22db9a 100644
--- a/bin/named/include/named/aclconf.h
+++ b/bin/named/include/named/aclconf.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: aclconf.h,v 1.12.2.1 2004/03/09 06:09:21 marka Exp $ */
+/* $Id: aclconf.h,v 1.12.2.2 2006/03/01 01:34:05 marka Exp $ */
#ifndef NS_ACLCONF_H
#define NS_ACLCONF_H 1
@@ -49,8 +49,8 @@ ns_aclconfctx_destroy(ns_aclconfctx_t *ctx);
*/
isc_result_t
-ns_acl_fromconfig(cfg_obj_t *caml,
- cfg_obj_t *cctx,
+ns_acl_fromconfig(const cfg_obj_t *caml,
+ const cfg_obj_t *cctx,
ns_aclconfctx_t *ctx,
isc_mem_t *mctx,
dns_acl_t **target);
diff --git a/bin/named/include/named/config.h b/bin/named/include/named/config.h
index 3d97be62c7..0d8b4560c8 100644
--- a/bin/named/include/named/config.h
+++ b/bin/named/include/named/config.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: config.h,v 1.4.2.1 2004/03/09 06:09:21 marka Exp $ */
+/* $Id: config.h,v 1.4.2.2 2006/03/01 01:34:05 marka Exp $ */
#ifndef NAMED_CONFIG_H
#define NAMED_CONFIG_H 1
@@ -29,20 +29,20 @@ isc_result_t
ns_config_parsedefaults(cfg_parser_t *parser, cfg_obj_t **conf);
isc_result_t
-ns_config_get(cfg_obj_t **maps, const char* name, cfg_obj_t **obj);
+ns_config_get(const cfg_obj_t **maps, const char* name, const cfg_obj_t **obj);
int
-ns_config_listcount(cfg_obj_t *list);
+ns_config_listcount(const cfg_obj_t *list);
isc_result_t
-ns_config_getclass(cfg_obj_t *classobj, dns_rdataclass_t defclass,
+ns_config_getclass(const cfg_obj_t *classobj, dns_rdataclass_t defclass,
dns_rdataclass_t *classp);
dns_zonetype_t
-ns_config_getzonetype(cfg_obj_t *zonetypeobj);
+ns_config_getzonetype(const cfg_obj_t *zonetypeobj);
isc_result_t
-ns_config_getiplist(cfg_obj_t *config, cfg_obj_t *list,
+ns_config_getiplist(const cfg_obj_t *config, const cfg_obj_t *list,
in_port_t defport, isc_mem_t *mctx,
isc_sockaddr_t **addrsp, isc_uint32_t *countp);
@@ -51,16 +51,16 @@ ns_config_putiplist(isc_mem_t *mctx, isc_sockaddr_t **addrsp,
isc_uint32_t count);
isc_result_t
-ns_config_getipandkeylist(cfg_obj_t *config, cfg_obj_t *list, isc_mem_t *mctx,
- isc_sockaddr_t **addrsp, dns_name_t ***keys,
- isc_uint32_t *countp);
+ns_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
+ isc_mem_t *mctx, isc_sockaddr_t **addrsp,
+ dns_name_t ***keys, isc_uint32_t *countp);
void
ns_config_putipandkeylist(isc_mem_t *mctx, isc_sockaddr_t **addrsp,
dns_name_t ***keys, isc_uint32_t count);
isc_result_t
-ns_config_getport(cfg_obj_t *config, in_port_t *portp);
+ns_config_getport(const cfg_obj_t *config, in_port_t *portp);
isc_result_t
ns_config_getkeyalgorithm(const char *str, dns_name_t **name);
diff --git a/bin/named/include/named/control.h b/bin/named/include/named/control.h
index a805c00867..880865dea1 100644
--- a/bin/named/include/named/control.h
+++ b/bin/named/include/named/control.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: control.h,v 1.6.2.3 2004/03/09 06:09:21 marka Exp $ */
+/* $Id: control.h,v 1.6.2.4 2006/03/01 01:34:05 marka Exp $ */
#ifndef NAMED_CONTROL_H
#define NAMED_CONTROL_H 1
@@ -61,7 +61,7 @@ ns_controls_destroy(ns_controls_t **ctrlsp);
*/
isc_result_t
-ns_controls_configure(ns_controls_t *controls, cfg_obj_t *config,
+ns_controls_configure(ns_controls_t *controls, const cfg_obj_t *config,
ns_aclconfctx_t *aclconfctx);
/*
* Configure zero or more command channels into 'controls'
diff --git a/bin/named/include/named/globals.h b/bin/named/include/named/globals.h
index d2a2250e92..7c90132127 100644
--- a/bin/named/include/named/globals.h
+++ b/bin/named/include/named/globals.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: globals.h,v 1.59.2.1 2004/03/09 06:09:21 marka Exp $ */
+/* $Id: globals.h,v 1.59.2.2 2006/03/01 01:34:05 marka Exp $ */
#ifndef NAMED_GLOBALS_H
#define NAMED_GLOBALS_H 1
@@ -73,7 +73,7 @@ EXTERN unsigned int ns_g_debuglevel INIT(0);
* Current configuration information.
*/
EXTERN cfg_obj_t * ns_g_config INIT(NULL);
-EXTERN cfg_obj_t * ns_g_defaults INIT(NULL);
+EXTERN const cfg_obj_t * ns_g_defaults INIT(NULL);
EXTERN const char * ns_g_conffile INIT(NS_SYSCONFDIR
"/named.conf");
EXTERN const char * ns_g_keyfile INIT(NS_SYSCONFDIR
diff --git a/bin/named/include/named/logconf.h b/bin/named/include/named/logconf.h
index 9e0dbf1a78..3ae7747475 100644
--- a/bin/named/include/named/logconf.h
+++ b/bin/named/include/named/logconf.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: logconf.h,v 1.10.2.1 2004/03/09 06:09:22 marka Exp $ */
+/* $Id: logconf.h,v 1.10.2.2 2006/03/01 01:34:05 marka Exp $ */
#ifndef NAMED_LOGCONF_H
#define NAMED_LOGCONF_H 1
@@ -23,7 +23,7 @@
#include
isc_result_t
-ns_log_configure(isc_logconfig_t *logconf, cfg_obj_t *logstmt);
+ns_log_configure(isc_logconfig_t *logconf, const cfg_obj_t *logstmt);
/*
* Set up the logging configuration in '*logconf' according to
* the named.conf data in 'logstmt'.
diff --git a/bin/named/include/named/lwresd.h b/bin/named/include/named/lwresd.h
index 37af4d64ee..6a8bda51a5 100644
--- a/bin/named/include/named/lwresd.h
+++ b/bin/named/include/named/lwresd.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: lwresd.h,v 1.12.2.1 2004/03/09 06:09:22 marka Exp $ */
+/* $Id: lwresd.h,v 1.12.2.2 2006/03/01 01:34:05 marka Exp $ */
#ifndef NAMED_LWRESD_H
#define NAMED_LWRESD_H 1
@@ -56,7 +56,7 @@ struct ns_lwreslistener {
* Configure lwresd.
*/
isc_result_t
-ns_lwresd_configure(isc_mem_t *mctx, cfg_obj_t *config);
+ns_lwresd_configure(isc_mem_t *mctx, const cfg_obj_t *config);
isc_result_t
ns_lwresd_parseeresolvconf(isc_mem_t *mctx, cfg_parser_t *pctx,
@@ -72,7 +72,8 @@ ns_lwresd_shutdown(void);
* Manager functions
*/
isc_result_t
-ns_lwdmanager_create(isc_mem_t *mctx, cfg_obj_t *lwres, ns_lwresd_t **lwresdp);
+ns_lwdmanager_create(isc_mem_t *mctx, const cfg_obj_t *lwres,
+ ns_lwresd_t **lwresdp);
void
ns_lwdmanager_attach(ns_lwresd_t *source, ns_lwresd_t **targetp);
diff --git a/bin/named/include/named/server.h b/bin/named/include/named/server.h
index fc112d5ea8..06606b05c2 100644
--- a/bin/named/include/named/server.h
+++ b/bin/named/include/named/server.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: server.h,v 1.58.2.3 2004/03/09 06:09:23 marka Exp $ */
+/* $Id: server.h,v 1.58.2.4 2006/03/01 01:34:05 marka Exp $ */
#ifndef NAMED_SERVER_H
#define NAMED_SERVER_H 1
@@ -177,6 +177,6 @@ ns_server_status(ns_server_t *server, isc_buffer_t *text);
* Maintain a list of dispatches that require reserved ports.
*/
void
-ns_add_reserved_dispatch(ns_server_t *server, isc_sockaddr_t *addr);
+ns_add_reserved_dispatch(ns_server_t *server, const isc_sockaddr_t *addr);
#endif /* NAMED_SERVER_H */
diff --git a/bin/named/include/named/sortlist.h b/bin/named/include/named/sortlist.h
index 7b520b75b8..7d4e77e39e 100644
--- a/bin/named/include/named/sortlist.h
+++ b/bin/named/include/named/sortlist.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: sortlist.h,v 1.4.2.1 2004/03/09 06:09:23 marka Exp $ */
+/* $Id: sortlist.h,v 1.4.2.2 2006/03/01 01:34:05 marka Exp $ */
#ifndef NAMED_SORTLIST_H
#define NAMED_SORTLIST_H 1
@@ -28,7 +28,7 @@
* Type for callback functions that rank addresses.
*/
typedef int
-(*dns_addressorderfunc_t)(isc_netaddr_t *address, void *arg);
+(*dns_addressorderfunc_t)(const isc_netaddr_t *address, const void *arg);
/*
* Return value type for setup_sortlist.
@@ -40,7 +40,8 @@ typedef enum {
} ns_sortlisttype_t;
ns_sortlisttype_t
-ns_sortlist_setup(dns_acl_t *acl, isc_netaddr_t *clientaddr, void **argp);
+ns_sortlist_setup(dns_acl_t *acl, isc_netaddr_t *clientaddr,
+ const void **argp);
/*
* Find the sortlist statement in 'acl' that applies to 'clientaddr', if any.
*
@@ -55,14 +56,14 @@ ns_sortlist_setup(dns_acl_t *acl, isc_netaddr_t *clientaddr, void **argp);
*/
int
-ns_sortlist_addrorder1(isc_netaddr_t *addr, void *arg);
+ns_sortlist_addrorder1(const isc_netaddr_t *addr, const void *arg);
/*
* Find the sort order of 'addr' in 'arg', the matching element
* of a 1-element top-level sortlist statement.
*/
int
-ns_sortlist_addrorder2(isc_netaddr_t *addr, void *arg);
+ns_sortlist_addrorder2(const isc_netaddr_t *addr, const void *arg);
/*
* Find the sort order of 'addr' in 'arg', a topology-like
* ACL forming the second element in a 2-element top-level
@@ -72,7 +73,7 @@ ns_sortlist_addrorder2(isc_netaddr_t *addr, void *arg);
void
ns_sortlist_byaddrsetup(dns_acl_t *sortlist_acl, isc_netaddr_t *client_addr,
dns_addressorderfunc_t *orderp,
- void **argp);
+ const void **argp);
/*
* Find the sortlist statement in 'acl' that applies to 'clientaddr', if any.
* If a sortlist statement applies, return in '*orderp' a pointer to a function
diff --git a/bin/named/include/named/tkeyconf.h b/bin/named/include/named/tkeyconf.h
index 87ba18f9ee..3946ca9ac0 100644
--- a/bin/named/include/named/tkeyconf.h
+++ b/bin/named/include/named/tkeyconf.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: tkeyconf.h,v 1.9.2.1 2004/03/09 06:09:23 marka Exp $ */
+/* $Id: tkeyconf.h,v 1.9.2.2 2006/03/01 01:34:05 marka Exp $ */
#ifndef NS_TKEYCONF_H
#define NS_TKEYCONF_H 1
@@ -28,8 +28,8 @@
ISC_LANG_BEGINDECLS
isc_result_t
-ns_tkeyctx_fromconfig(cfg_obj_t *options, isc_mem_t *mctx, isc_entropy_t *ectx,
- dns_tkeyctx_t **tctxp);
+ns_tkeyctx_fromconfig(const cfg_obj_t *options, isc_mem_t *mctx,
+ isc_entropy_t *ectx, dns_tkeyctx_t **tctxp);
/*
* Create a TKEY context and configure it, including the default DH key
* and default domain, according to 'options'.
diff --git a/bin/named/include/named/tsigconf.h b/bin/named/include/named/tsigconf.h
index 05f1a9ef3c..8116cbf872 100644
--- a/bin/named/include/named/tsigconf.h
+++ b/bin/named/include/named/tsigconf.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: tsigconf.h,v 1.9.2.1 2004/03/09 06:09:23 marka Exp $ */
+/* $Id: tsigconf.h,v 1.9.2.2 2006/03/01 01:34:05 marka Exp $ */
#ifndef NS_TSIGCONF_H
#define NS_TSIGCONF_H 1
@@ -26,7 +26,7 @@
ISC_LANG_BEGINDECLS
isc_result_t
-ns_tsigkeyring_fromconfig(cfg_obj_t *config, cfg_obj_t *vconfig,
+ns_tsigkeyring_fromconfig(const cfg_obj_t *config, const cfg_obj_t *vconfig,
isc_mem_t *mctx, dns_tsig_keyring_t **ringp);
/*
* Create a TSIG key ring and configure it according to the 'key'
diff --git a/bin/named/include/named/zoneconf.h b/bin/named/include/named/zoneconf.h
index a3437858a5..67bce66b28 100644
--- a/bin/named/include/named/zoneconf.h
+++ b/bin/named/include/named/zoneconf.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: zoneconf.h,v 1.16.2.3 2004/03/09 06:09:23 marka Exp $ */
+/* $Id: zoneconf.h,v 1.16.2.4 2006/03/01 01:34:05 marka Exp $ */
#ifndef NS_ZONECONF_H
#define NS_ZONECONF_H 1
@@ -30,8 +30,9 @@
ISC_LANG_BEGINDECLS
isc_result_t
-ns_zone_configure(cfg_obj_t *config, cfg_obj_t *vconfig, cfg_obj_t *zconfig,
- ns_aclconfctx_t *ac, dns_zone_t *zone);
+ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
+ const cfg_obj_t *zconfig, ns_aclconfctx_t *ac,
+ dns_zone_t *zone);
/*
* Configure or reconfigure a zone according to the named.conf
* data in 'cctx' and 'czone'.
@@ -48,7 +49,7 @@ ns_zone_configure(cfg_obj_t *config, cfg_obj_t *vconfig, cfg_obj_t *zconfig,
*/
isc_boolean_t
-ns_zone_reusable(dns_zone_t *zone, cfg_obj_t *zconfig);
+ns_zone_reusable(dns_zone_t *zone, const cfg_obj_t *zconfig);
/*
* If 'zone' can be safely reconfigured according to the configuration
* data in 'zconfig', return ISC_TRUE. If the configuration data is so
diff --git a/bin/named/logconf.c b/bin/named/logconf.c
index 6e87d5cd46..d5baa0a097 100644
--- a/bin/named/logconf.c
+++ b/bin/named/logconf.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: logconf.c,v 1.30.2.5 2004/03/09 06:09:18 marka Exp $ */
+/* $Id: logconf.c,v 1.30.2.6 2006/03/01 01:34:05 marka Exp $ */
#include
@@ -41,13 +41,13 @@
* in 'ccat' and add it to 'lctx'.
*/
static isc_result_t
-category_fromconf(cfg_obj_t *ccat, isc_logconfig_t *lctx) {
+category_fromconf(const cfg_obj_t *ccat, isc_logconfig_t *lctx) {
isc_result_t result;
const char *catname;
isc_logcategory_t *category;
isc_logmodule_t *module;
- cfg_obj_t *destinations = NULL;
- cfg_listelt_t *element = NULL;
+ const cfg_obj_t *destinations = NULL;
+ const cfg_listelt_t *element = NULL;
catname = cfg_obj_asstring(cfg_tuple_get(ccat, "name"));
category = isc_log_categorybyname(ns_g_lctx, catname);
@@ -68,8 +68,8 @@ category_fromconf(cfg_obj_t *ccat, isc_logconfig_t *lctx) {
element != NULL;
element = cfg_list_next(element))
{
- cfg_obj_t *channel = cfg_listelt_value(element);
- char *channelname = cfg_obj_asstring(channel);
+ const cfg_obj_t *channel = cfg_listelt_value(element);
+ const char *channelname = cfg_obj_asstring(channel);
result = isc_log_usechannel(lctx, channelname, category,
module);
@@ -89,18 +89,18 @@ category_fromconf(cfg_obj_t *ccat, isc_logconfig_t *lctx) {
* in 'cchan' and add it to 'lctx'.
*/
static isc_result_t
-channel_fromconf(cfg_obj_t *channel, isc_logconfig_t *lctx) {
+channel_fromconf(const cfg_obj_t *channel, isc_logconfig_t *lctx) {
isc_result_t result;
isc_logdestination_t dest;
unsigned int type;
unsigned int flags = 0;
int level;
const char *channelname;
- cfg_obj_t *fileobj = NULL;
- cfg_obj_t *syslogobj = NULL;
- cfg_obj_t *nullobj = NULL;
- cfg_obj_t *stderrobj = NULL;
- cfg_obj_t *severity = NULL;
+ const cfg_obj_t *fileobj = NULL;
+ const cfg_obj_t *syslogobj = NULL;
+ const cfg_obj_t *nullobj = NULL;
+ const cfg_obj_t *stderrobj = NULL;
+ const cfg_obj_t *severity = NULL;
int i;
channelname = cfg_obj_asstring(cfg_map_getname(channel));
@@ -130,9 +130,10 @@ channel_fromconf(cfg_obj_t *channel, isc_logconfig_t *lctx) {
type = ISC_LOG_TONULL;
if (fileobj != NULL) {
- cfg_obj_t *pathobj = cfg_tuple_get(fileobj, "file");
- cfg_obj_t *sizeobj = cfg_tuple_get(fileobj, "size");
- cfg_obj_t *versionsobj = cfg_tuple_get(fileobj, "versions");
+ const cfg_obj_t *pathobj = cfg_tuple_get(fileobj, "file");
+ const cfg_obj_t *sizeobj = cfg_tuple_get(fileobj, "size");
+ const cfg_obj_t *versionsobj =
+ cfg_tuple_get(fileobj, "versions");
isc_int32_t versions = ISC_LOG_ROLLNEVER;
isc_offset_t size = 0;
@@ -157,7 +158,7 @@ channel_fromconf(cfg_obj_t *channel, isc_logconfig_t *lctx) {
type = ISC_LOG_TOSYSLOG;
if (cfg_obj_isstring(syslogobj)) {
- char *facilitystr = cfg_obj_asstring(syslogobj);
+ const char *facilitystr = cfg_obj_asstring(syslogobj);
(void)isc_syslog_facilityfromstring(facilitystr,
&facility);
}
@@ -174,9 +175,9 @@ channel_fromconf(cfg_obj_t *channel, isc_logconfig_t *lctx) {
* Munge flags.
*/
{
- cfg_obj_t *printcat = NULL;
- cfg_obj_t *printsev = NULL;
- cfg_obj_t *printtime = NULL;
+ const cfg_obj_t *printcat = NULL;
+ const cfg_obj_t *printsev = NULL;
+ const cfg_obj_t *printtime = NULL;
(void)cfg_map_get(channel, "print-category", &printcat);
(void)cfg_map_get(channel, "print-severity", &printsev);
@@ -193,7 +194,7 @@ channel_fromconf(cfg_obj_t *channel, isc_logconfig_t *lctx) {
level = ISC_LOG_INFO;
if (cfg_map_get(channel, "severity", &severity) == ISC_R_SUCCESS) {
if (cfg_obj_isstring(severity)) {
- char *str = cfg_obj_asstring(severity);
+ const char *str = cfg_obj_asstring(severity);
if (strcasecmp(str, "critical") == 0)
level = ISC_LOG_CRITICAL;
else if (strcasecmp(str, "error") == 0)
@@ -242,13 +243,14 @@ channel_fromconf(cfg_obj_t *channel, isc_logconfig_t *lctx) {
}
isc_result_t
-ns_log_configure(isc_logconfig_t *logconf, cfg_obj_t *logstmt) {
+ns_log_configure(isc_logconfig_t *logconf, const cfg_obj_t *logstmt) {
isc_result_t result;
- cfg_obj_t *channels = NULL;
- cfg_obj_t *categories = NULL;
- cfg_listelt_t *element;
+ const cfg_obj_t *channels = NULL;
+ const cfg_obj_t *categories = NULL;
+ const cfg_listelt_t *element;
isc_boolean_t default_set = ISC_FALSE;
isc_boolean_t unmatched_set = ISC_FALSE;
+ const cfg_obj_t *catname;
CHECK(ns_log_setdefaultchannels(logconf));
@@ -257,7 +259,7 @@ ns_log_configure(isc_logconfig_t *logconf, cfg_obj_t *logstmt) {
element != NULL;
element = cfg_list_next(element))
{
- cfg_obj_t *channel = cfg_listelt_value(element);
+ const cfg_obj_t *channel = cfg_listelt_value(element);
CHECK(channel_fromconf(channel, logconf));
}
@@ -266,15 +268,15 @@ ns_log_configure(isc_logconfig_t *logconf, cfg_obj_t *logstmt) {
element != NULL;
element = cfg_list_next(element))
{
- cfg_obj_t *category = cfg_listelt_value(element);
+ const cfg_obj_t *category = cfg_listelt_value(element);
CHECK(category_fromconf(category, logconf));
if (!default_set) {
- cfg_obj_t *catname = cfg_tuple_get(category, "name");
+ catname = cfg_tuple_get(category, "name");
if (strcmp(cfg_obj_asstring(catname), "default") == 0)
default_set = ISC_TRUE;
}
if (!unmatched_set) {
- cfg_obj_t *catname = cfg_tuple_get(category, "name");
+ catname = cfg_tuple_get(category, "name");
if (strcmp(cfg_obj_asstring(catname), "unmatched") == 0)
unmatched_set = ISC_TRUE;
}
diff --git a/bin/named/lwdgabn.c b/bin/named/lwdgabn.c
index d53a5df728..4cc2962031 100644
--- a/bin/named/lwdgabn.c
+++ b/bin/named/lwdgabn.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: lwdgabn.c,v 1.13.2.1 2004/03/09 06:09:18 marka Exp $ */
+/* $Id: lwdgabn.c,v 1.13.2.2 2006/03/01 01:34:05 marka Exp $ */
#include
@@ -120,7 +120,7 @@ sort_addresses(ns_lwdclient_t *client) {
rankedaddress *addrs;
isc_netaddr_t remote;
dns_addressorderfunc_t order;
- void *arg;
+ const void *arg;
ns_lwresd_t *lwresd = client->clientmgr->listener->manager;
unsigned int i;
isc_result_t result;
diff --git a/bin/named/lwresd.c b/bin/named/lwresd.c
index d37f43ed74..5b90457251 100644
--- a/bin/named/lwresd.c
+++ b/bin/named/lwresd.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: lwresd.c,v 1.37.2.5 2006/01/04 23:50:16 marka Exp $ */
+/* $Id: lwresd.c,v 1.37.2.6 2006/03/01 01:34:05 marka Exp $ */
/*
* Main program for the Lightweight Resolver Daemon.
@@ -285,14 +285,14 @@ ns_lwresd_parseeresolvconf(isc_mem_t *mctx, cfg_parser_t *pctx,
* Handle lwresd manager objects
*/
isc_result_t
-ns_lwdmanager_create(isc_mem_t *mctx, cfg_obj_t *lwres,
+ns_lwdmanager_create(isc_mem_t *mctx, const cfg_obj_t *lwres,
ns_lwresd_t **lwresdp)
{
ns_lwresd_t *lwresd;
const char *vname;
dns_rdataclass_t vclass;
- cfg_obj_t *obj, *viewobj, *searchobj;
- cfg_listelt_t *element;
+ const cfg_obj_t *obj, *viewobj, *searchobj;
+ const cfg_listelt_t *element;
isc_result_t result;
INSIST(lwresdp != NULL && *lwresdp == NULL);
@@ -356,8 +356,8 @@ ns_lwdmanager_create(isc_mem_t *mctx, cfg_obj_t *lwres,
element != NULL;
element = cfg_list_next(element))
{
- cfg_obj_t *search;
- char *searchstr;
+ const cfg_obj_t *search;
+ const char *searchstr;
isc_buffer_t namebuf;
dns_fixedname_t fname;
dns_name_t *name;
@@ -739,11 +739,11 @@ configure_listener(isc_sockaddr_t *address, ns_lwresd_t *lwresd,
}
isc_result_t
-ns_lwresd_configure(isc_mem_t *mctx, cfg_obj_t *config) {
- cfg_obj_t *lwreslist = NULL;
- cfg_obj_t *lwres = NULL;
- cfg_obj_t *listenerslist = NULL;
- cfg_listelt_t *element = NULL;
+ns_lwresd_configure(isc_mem_t *mctx, const cfg_obj_t *config) {
+ const cfg_obj_t *lwreslist = NULL;
+ const cfg_obj_t *lwres = NULL;
+ const cfg_obj_t *listenerslist = NULL;
+ const cfg_listelt_t *element = NULL;
ns_lwreslistener_t *listener;
ns_lwreslistenerlist_t newlisteners;
isc_result_t result;
diff --git a/bin/named/query.c b/bin/named/query.c
index 6a054635d2..8fc512c926 100644
--- a/bin/named/query.c
+++ b/bin/named/query.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: query.c,v 1.198.2.24 2006/02/03 23:51:35 marka Exp $ */
+/* $Id: query.c,v 1.198.2.25 2006/03/01 01:34:05 marka Exp $ */
#include
@@ -2278,7 +2278,7 @@ do { \
* ISC_R_NOTIMPLEMENTED The rdata is not a known address type.
*/
static isc_result_t
-rdata_tonetaddr(dns_rdata_t *rdata, isc_netaddr_t *netaddr) {
+rdata_tonetaddr(const dns_rdata_t *rdata, isc_netaddr_t *netaddr) {
struct in_addr ina;
struct in6_addr in6a;
@@ -2304,7 +2304,7 @@ rdata_tonetaddr(dns_rdata_t *rdata, isc_netaddr_t *netaddr) {
* sortlist statement.
*/
static int
-query_sortlist_order_2element(dns_rdata_t *rdata, void *arg) {
+query_sortlist_order_2element(const dns_rdata_t *rdata, const void *arg) {
isc_netaddr_t netaddr;
if (rdata_tonetaddr(rdata, &netaddr) != ISC_R_SUCCESS)
@@ -2317,7 +2317,7 @@ query_sortlist_order_2element(dns_rdata_t *rdata, void *arg) {
* of a 1-element top-level sortlist statement.
*/
static int
-query_sortlist_order_1element(dns_rdata_t *rdata, void *arg) {
+query_sortlist_order_1element(const dns_rdata_t *rdata, const void *arg) {
isc_netaddr_t netaddr;
if (rdata_tonetaddr(rdata, &netaddr) != ISC_R_SUCCESS)
@@ -2333,7 +2333,7 @@ static void
setup_query_sortlist(ns_client_t *client) {
isc_netaddr_t netaddr;
dns_rdatasetorderfunc_t order = NULL;
- void *order_arg = NULL;
+ const void *order_arg = NULL;
isc_netaddr_fromsockaddr(&netaddr, &client->peeraddr);
switch (ns_sortlist_setup(client->view->sortlist,
diff --git a/bin/named/server.c b/bin/named/server.c
index d7bc186977..737afbcf40 100644
--- a/bin/named/server.c
+++ b/bin/named/server.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: server.c,v 1.339.2.36 2006/01/04 23:50:16 marka Exp $ */
+/* $Id: server.c,v 1.339.2.37 2006/03/01 01:34:05 marka Exp $ */
#include
@@ -119,21 +119,21 @@ static void
ns_server_reload(isc_task_t *task, isc_event_t *event);
static isc_result_t
-ns_listenelt_fromconfig(cfg_obj_t *listener, cfg_obj_t *config,
+ns_listenelt_fromconfig(const cfg_obj_t *listener, const cfg_obj_t *config,
ns_aclconfctx_t *actx,
isc_mem_t *mctx, ns_listenelt_t **target);
static isc_result_t
-ns_listenlist_fromconfig(cfg_obj_t *listenlist, cfg_obj_t *config,
+ns_listenlist_fromconfig(const cfg_obj_t *listenlist, const cfg_obj_t *config,
ns_aclconfctx_t *actx,
isc_mem_t *mctx, ns_listenlist_t **target);
static isc_result_t
-configure_forward(cfg_obj_t *config, dns_view_t *view, dns_name_t *origin,
- cfg_obj_t *forwarders, cfg_obj_t *forwardtype);
+configure_forward(const cfg_obj_t *config, dns_view_t *view, dns_name_t *origin,
+ const cfg_obj_t *forwarders, const cfg_obj_t *forwardtype);
static isc_result_t
-configure_zone(cfg_obj_t *config, cfg_obj_t *zconfig, cfg_obj_t *vconfig,
- isc_mem_t *mctx, dns_view_t *view,
+configure_zone(const cfg_obj_t *config, const cfg_obj_t *zconfig,
+ const cfg_obj_t *vconfig, isc_mem_t *mctx, dns_view_t *view,
ns_aclconfctx_t *aclconf);
static void
@@ -145,13 +145,13 @@ end_reserved_dispatches(ns_server_t *server, isc_boolean_t all);
* (for a global default).
*/
static isc_result_t
-configure_view_acl(cfg_obj_t *vconfig, cfg_obj_t *config,
+configure_view_acl(const cfg_obj_t *vconfig, const cfg_obj_t *config,
const char *aclname, ns_aclconfctx_t *actx,
isc_mem_t *mctx, dns_acl_t **aclp)
{
isc_result_t result;
- cfg_obj_t *maps[3];
- cfg_obj_t *aclobj = NULL;
+ const cfg_obj_t *maps[3];
+ const cfg_obj_t *aclobj = NULL;
int i = 0;
if (*aclp != NULL)
@@ -159,7 +159,7 @@ configure_view_acl(cfg_obj_t *vconfig, cfg_obj_t *config,
if (vconfig != NULL)
maps[i++] = cfg_tuple_get(vconfig, "options");
if (config != NULL) {
- cfg_obj_t *options = NULL;
+ const cfg_obj_t *options = NULL;
cfg_map_get(config, "options", &options);
if (options != NULL)
maps[i++] = options;
@@ -180,13 +180,13 @@ configure_view_acl(cfg_obj_t *vconfig, cfg_obj_t *config,
#ifdef ISC_RFC2535
static isc_result_t
-configure_view_dnsseckey(cfg_obj_t *vconfig, cfg_obj_t *key,
+configure_view_dnsseckey(const cfg_obj_t *vconfig, const cfg_obj_t *key,
dns_keytable_t *keytable, isc_mem_t *mctx)
{
dns_rdataclass_t viewclass;
dns_rdata_key_t keystruct;
isc_uint32_t flags, proto, alg;
- char *keystr, *keynamestr;
+ const char *keystr, *keynamestr;
unsigned char keydata[4096];
isc_buffer_t keydatabuf;
unsigned char rrdata[4096];
@@ -207,7 +207,7 @@ configure_view_dnsseckey(cfg_obj_t *vconfig, cfg_obj_t *key,
if (vconfig == NULL)
viewclass = dns_rdataclass_in;
else {
- cfg_obj_t *classobj = cfg_tuple_get(vconfig, "class");
+ const cfg_obj_t *classobj = cfg_tuple_get(vconfig, "class");
CHECK(ns_config_getclass(classobj, dns_rdataclass_in,
&viewclass));
}
@@ -284,16 +284,16 @@ configure_view_dnsseckey(cfg_obj_t *vconfig, cfg_obj_t *key,
* from 'vconfig' and 'config'. The variable to be configured is '*target'.
*/
static isc_result_t
-configure_view_dnsseckeys(cfg_obj_t *vconfig, cfg_obj_t *config,
+configure_view_dnsseckeys(const cfg_obj_t *vconfig, const cfg_obj_t *config,
isc_mem_t *mctx, dns_keytable_t **target)
{
isc_result_t result;
#ifdef ISC_RFC2535
- cfg_obj_t *keys = NULL;
- cfg_obj_t *voptions = NULL;
- cfg_listelt_t *element, *element2;
- cfg_obj_t *keylist;
- cfg_obj_t *key;
+ const cfg_obj_t *keys = NULL;
+ const cfg_obj_t *voptions = NULL;
+ const cfg_listelt_t *element, *element2;
+ const cfg_obj_t *keylist;
+ const cfg_obj_t *key;
#endif
dns_keytable_t *keytable = NULL;
@@ -341,14 +341,14 @@ configure_view_dnsseckeys(cfg_obj_t *vconfig, cfg_obj_t *config,
* Get a dispatch appropriate for the resolver of a given view.
*/
static isc_result_t
-get_view_querysource_dispatch(cfg_obj_t **maps,
+get_view_querysource_dispatch(const cfg_obj_t **maps,
int af, dns_dispatch_t **dispatchp)
{
isc_result_t result;
dns_dispatch_t *disp;
isc_sockaddr_t sa;
unsigned int attrs, attrmask;
- cfg_obj_t *obj = NULL;
+ const cfg_obj_t *obj = NULL;
/*
* Make compiler happy.
@@ -439,12 +439,12 @@ get_view_querysource_dispatch(cfg_obj_t **maps,
}
static isc_result_t
-configure_peer(cfg_obj_t *cpeer, isc_mem_t *mctx, dns_peer_t **peerp) {
- isc_sockaddr_t *sa;
+configure_peer(const cfg_obj_t *cpeer, isc_mem_t *mctx, dns_peer_t **peerp) {
+ const isc_sockaddr_t *sa;
isc_netaddr_t na;
dns_peer_t *peer;
- cfg_obj_t *obj;
- char *str;
+ const cfg_obj_t *obj;
+ const char *str;
isc_result_t result;
sa = cfg_obj_assockaddr(cfg_map_getname(cpeer));
@@ -515,18 +515,19 @@ configure_peer(cfg_obj_t *cpeer, isc_mem_t *mctx, dns_peer_t **peerp) {
* global defaults in 'config' used exclusively.
*/
static isc_result_t
-configure_view(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig,
- isc_mem_t *mctx, ns_aclconfctx_t *actx)
+configure_view(dns_view_t *view, const cfg_obj_t *config,
+ const cfg_obj_t *vconfig, isc_mem_t *mctx,
+ ns_aclconfctx_t *actx)
{
- cfg_obj_t *maps[4];
- cfg_obj_t *cfgmaps[3];
- cfg_obj_t *options = NULL;
- cfg_obj_t *voptions = NULL;
- cfg_obj_t *forwardtype;
- cfg_obj_t *forwarders;
- cfg_obj_t *zonelist;
- cfg_obj_t *obj;
- cfg_listelt_t *element;
+ const cfg_obj_t *maps[4];
+ const cfg_obj_t *cfgmaps[3];
+ const cfg_obj_t *options = NULL;
+ const cfg_obj_t *voptions = NULL;
+ const cfg_obj_t *forwardtype;
+ const cfg_obj_t *forwarders;
+ const cfg_obj_t *zonelist;
+ const cfg_obj_t *obj;
+ const cfg_listelt_t *element;
in_port_t port;
dns_cache_t *cache = NULL;
isc_result_t result;
@@ -539,7 +540,7 @@ configure_view(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig,
dns_dispatch_t *dispatch6 = NULL;
isc_boolean_t reused_cache = ISC_FALSE;
int i;
- char *str;
+ const char *str;
REQUIRE(DNS_VIEW_VALID(view));
@@ -584,7 +585,7 @@ configure_view(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig,
element != NULL;
element = cfg_list_next(element))
{
- cfg_obj_t *zconfig = cfg_listelt_value(element);
+ const cfg_obj_t *zconfig = cfg_listelt_value(element);
CHECK(configure_zone(config, zconfig, vconfig, mctx, view,
actx));
}
@@ -742,8 +743,8 @@ configure_view(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig,
* Configure the view's peer list.
*/
{
- cfg_obj_t *peers = NULL;
- cfg_listelt_t *element;
+ const cfg_obj_t *peers = NULL;
+ const cfg_listelt_t *element;
dns_peerlist_t *newpeers = NULL;
(void)ns_config_get(cfgmaps, "server", &peers);
@@ -752,7 +753,7 @@ configure_view(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig,
element != NULL;
element = cfg_list_next(element))
{
- cfg_obj_t *cpeer = cfg_listelt_value(element);
+ const cfg_obj_t *cpeer = cfg_listelt_value(element);
dns_peer_t *peer;
CHECK(configure_peer(cpeer, mctx, &peer));
@@ -913,8 +914,8 @@ configure_view(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig,
dns_fixedname_t fixed;
dns_name_t *name;
isc_buffer_t b;
- char *str;
- cfg_obj_t *exclude;
+ const char *str;
+ const cfg_obj_t *exclude;
dns_fixedname_init(&fixed);
name = dns_fixedname_name(&fixed);
@@ -981,14 +982,16 @@ create_bind_view(dns_view_t **viewp) {
* option or the global defaults.
*/
static isc_result_t
-create_version_zone(cfg_obj_t **maps, dns_zonemgr_t *zmgr, dns_view_t *view) {
+create_version_zone(const cfg_obj_t **maps, dns_zonemgr_t *zmgr,
+ dns_view_t *view)
+{
isc_result_t result;
dns_db_t *db = NULL;
dns_zone_t *zone = NULL;
dns_dbversion_t *dbver = NULL;
dns_difftuple_t *tuple = NULL;
dns_diff_t diff;
- char *versiontext;
+ const char *versiontext;
unsigned char buf[256];
isc_region_t r;
size_t len;
@@ -1002,7 +1005,7 @@ create_version_zone(cfg_obj_t **maps, dns_zonemgr_t *zmgr, dns_view_t *view) {
"\0\0\0\0" /* expire */
"\0\0\0\0"; /* minimum */
dns_name_t origin;
- cfg_obj_t *obj = NULL;
+ const cfg_obj_t *obj = NULL;
dns_acl_t *acl = NULL;
dns_diff_init(ns_g_mctx, &diff);
@@ -1094,7 +1097,8 @@ create_version_zone(cfg_obj_t **maps, dns_zonemgr_t *zmgr, dns_view_t *view) {
* The strings returned list the BIND 9 authors.
*/
static isc_result_t
-create_authors_zone(cfg_obj_t *options, dns_zonemgr_t *zmgr, dns_view_t *view)
+create_authors_zone(const cfg_obj_t *options, dns_zonemgr_t *zmgr,
+ dns_view_t *view)
{
isc_result_t result;
dns_db_t *db = NULL;
@@ -1130,7 +1134,7 @@ create_authors_zone(cfg_obj_t *options, dns_zonemgr_t *zmgr, dns_view_t *view)
"\020Brian Wellington",
NULL,
};
- cfg_obj_t *obj = NULL;
+ const cfg_obj_t *obj = NULL;
dns_acl_t *acl = NULL;
/*
@@ -1236,12 +1240,12 @@ configure_hints(dns_view_t *view, const char *filename) {
}
static isc_result_t
-configure_forward(cfg_obj_t *config, dns_view_t *view, dns_name_t *origin,
- cfg_obj_t *forwarders, cfg_obj_t *forwardtype)
+configure_forward(const cfg_obj_t *config, dns_view_t *view, dns_name_t *origin,
+ const cfg_obj_t *forwarders, const cfg_obj_t *forwardtype)
{
- cfg_obj_t *portobj;
- cfg_obj_t *faddresses;
- cfg_listelt_t *element;
+ const cfg_obj_t *portobj;
+ const cfg_obj_t *faddresses;
+ const cfg_listelt_t *element;
dns_fwdpolicy_t fwdpolicy = dns_fwdpolicy_none;
isc_sockaddrlist_t addresses;
isc_sockaddr_t *sa;
@@ -1279,7 +1283,7 @@ configure_forward(cfg_obj_t *config, dns_view_t *view, dns_name_t *origin,
element != NULL;
element = cfg_list_next(element))
{
- cfg_obj_t *forwarder = cfg_listelt_value(element);
+ const cfg_obj_t *forwarder = cfg_listelt_value(element);
sa = isc_mem_get(view->mctx, sizeof(isc_sockaddr_t));
if (sa == NULL) {
result = ISC_R_NOMEMORY;
@@ -1302,7 +1306,7 @@ configure_forward(cfg_obj_t *config, dns_view_t *view, dns_name_t *origin,
if (forwardtype == NULL)
fwdpolicy = dns_fwdpolicy_first;
else {
- char *forwardstr = cfg_obj_asstring(forwardtype);
+ const char *forwardstr = cfg_obj_asstring(forwardtype);
if (strcasecmp(forwardstr, "first") == 0)
fwdpolicy = dns_fwdpolicy_first;
else if (strcasecmp(forwardstr, "only") == 0)
@@ -1344,14 +1348,16 @@ configure_forward(cfg_obj_t *config, dns_view_t *view, dns_name_t *origin,
* The view created is attached to '*viewp'.
*/
static isc_result_t
-create_view(cfg_obj_t *vconfig, dns_viewlist_t *viewlist, dns_view_t **viewp) {
+create_view(const cfg_obj_t *vconfig, dns_viewlist_t *viewlist,
+ dns_view_t **viewp)
+{
isc_result_t result;
const char *viewname;
dns_rdataclass_t viewclass;
dns_view_t *view = NULL;
if (vconfig != NULL) {
- cfg_obj_t *classobj = NULL;
+ const cfg_obj_t *classobj = NULL;
viewname = cfg_obj_asstring(cfg_tuple_get(vconfig, "name"));
classobj = cfg_tuple_get(vconfig, "class");
@@ -1381,19 +1387,19 @@ create_view(cfg_obj_t *vconfig, dns_viewlist_t *viewlist, dns_view_t **viewp) {
* Configure or reconfigure a zone.
*/
static isc_result_t
-configure_zone(cfg_obj_t *config, cfg_obj_t *zconfig, cfg_obj_t *vconfig,
- isc_mem_t *mctx, dns_view_t *view,
+configure_zone(const cfg_obj_t *config, const cfg_obj_t *zconfig,
+ const cfg_obj_t *vconfig, isc_mem_t *mctx, dns_view_t *view,
ns_aclconfctx_t *aclconf)
{
dns_view_t *pview = NULL; /* Production view */
dns_zone_t *zone = NULL; /* New or reused zone */
dns_zone_t *dupzone = NULL;
- cfg_obj_t *options = NULL;
- cfg_obj_t *zoptions = NULL;
- cfg_obj_t *typeobj = NULL;
- cfg_obj_t *forwarders = NULL;
- cfg_obj_t *forwardtype = NULL;
- cfg_obj_t *only = NULL;
+ const cfg_obj_t *options = NULL;
+ const cfg_obj_t *zoptions = NULL;
+ const cfg_obj_t *typeobj = NULL;
+ const cfg_obj_t *forwarders = NULL;
+ const cfg_obj_t *forwardtype = NULL;
+ const cfg_obj_t *only = NULL;
isc_result_t result;
isc_result_t tresult;
isc_buffer_t buffer;
@@ -1450,7 +1456,7 @@ configure_zone(cfg_obj_t *config, cfg_obj_t *zconfig, cfg_obj_t *vconfig,
* configure it and return.
*/
if (strcasecmp(ztypestr, "hint") == 0) {
- cfg_obj_t *fileobj = NULL;
+ const cfg_obj_t *fileobj = NULL;
if (cfg_map_get(zoptions, "file", &fileobj) != ISC_R_SUCCESS) {
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
NS_LOGMODULE_SERVER, ISC_LOG_ERROR,
@@ -1460,7 +1466,7 @@ configure_zone(cfg_obj_t *config, cfg_obj_t *zconfig, cfg_obj_t *vconfig,
goto cleanup;
}
if (dns_name_equal(origin, dns_rootname)) {
- char *hintsfile = cfg_obj_asstring(fileobj);
+ const char *hintsfile = cfg_obj_asstring(fileobj);
result = configure_hints(view, hintsfile);
if (result != ISC_R_SUCCESS) {
@@ -1614,9 +1620,10 @@ configure_zone(cfg_obj_t *config, cfg_obj_t *zconfig, cfg_obj_t *vconfig,
* Configure a single server quota.
*/
static void
-configure_server_quota(cfg_obj_t **maps, const char *name, isc_quota_t *quota)
+configure_server_quota(const cfg_obj_t **maps, const char *name,
+ isc_quota_t *quota)
{
- cfg_obj_t *obj = NULL;
+ const cfg_obj_t *obj = NULL;
isc_result_t result;
result = ns_config_get(maps, name, &obj);
@@ -1629,9 +1636,9 @@ configure_server_quota(cfg_obj_t **maps, const char *name, isc_quota_t *quota)
* parsed. This can be extended to support other options if necessary.
*/
static isc_result_t
-directory_callback(const char *clausename, cfg_obj_t *obj, void *arg) {
+directory_callback(const char *clausename, const cfg_obj_t *obj, void *arg) {
isc_result_t result;
- char *directory;
+ const char *directory;
REQUIRE(strcasecmp("directory", clausename) == 0);
@@ -1740,11 +1747,12 @@ setdumpfile(ns_server_t *server, const char *name) {
}
static void
-set_limit(cfg_obj_t **maps, const char *configname, const char *description,
- isc_resource_t resourceid, isc_resourcevalue_t defaultvalue)
+set_limit(const cfg_obj_t **maps, const char *configname,
+ const char *description, isc_resource_t resourceid,
+ isc_resourcevalue_t defaultvalue)
{
- cfg_obj_t *obj = NULL;
- char *resource;
+ const cfg_obj_t *obj = NULL;
+ const char *resource;
isc_resourcevalue_t value;
isc_result_t result;
@@ -1775,7 +1783,7 @@ set_limit(cfg_obj_t **maps, const char *configname, const char *description,
ns_g_init ## resource)
static void
-set_limits(cfg_obj_t **maps) {
+set_limits(const cfg_obj_t **maps) {
SETLIMIT("stacksize", stacksize, "stack size");
SETLIMIT("datasize", datasize, "data size");
SETLIMIT("coresize", coresize, "core size");
@@ -1789,11 +1797,11 @@ load_configuration(const char *filename, ns_server_t *server,
isc_result_t result;
cfg_parser_t *parser = NULL;
cfg_obj_t *config;
- cfg_obj_t *options;
- cfg_obj_t *views;
- cfg_obj_t *obj;
- cfg_obj_t *maps[3];
- cfg_listelt_t *element;
+ const cfg_obj_t *options;
+ const cfg_obj_t *views;
+ const cfg_obj_t *obj;
+ const cfg_obj_t *maps[3];
+ const cfg_listelt_t *element;
dns_view_t *view = NULL;
dns_view_t *view_next;
dns_viewlist_t viewlist;
@@ -1932,7 +1940,7 @@ load_configuration(const char *filename, ns_server_t *server,
* statement.
*/
{
- cfg_obj_t *clistenon = NULL;
+ const cfg_obj_t *clistenon = NULL;
ns_listenlist_t *listenon = NULL;
clistenon = NULL;
@@ -1966,7 +1974,7 @@ load_configuration(const char *filename, ns_server_t *server,
* Ditto for IPv6.
*/
{
- cfg_obj_t *clistenon = NULL;
+ const cfg_obj_t *clistenon = NULL;
ns_listenlist_t *listenon = NULL;
if (options != NULL)
@@ -2049,7 +2057,7 @@ load_configuration(const char *filename, ns_server_t *server,
element != NULL;
element = cfg_list_next(element))
{
- cfg_obj_t *vconfig;
+ const cfg_obj_t *vconfig;
view = NULL;
vconfig = cfg_listelt_value(element);
@@ -2169,7 +2177,7 @@ load_configuration(const char *filename, ns_server_t *server,
"ignoring config file logging "
"statement due to -g option");
} else {
- cfg_obj_t *logobj = NULL;
+ const cfg_obj_t *logobj = NULL;
isc_logconfig_t *logc = NULL;
CHECKM(isc_logconfig_create(ns_g_lctx, &logc),
@@ -2208,19 +2216,19 @@ load_configuration(const char *filename, ns_server_t *server,
* compatibility.
*/
if (first_time) {
- cfg_obj_t *logobj = NULL;
- cfg_obj_t *categories = NULL;
+ const cfg_obj_t *logobj = NULL;
+ const cfg_obj_t *categories = NULL;
(void)cfg_map_get(config, "logging", &logobj);
if (logobj != NULL)
(void)cfg_map_get(logobj, "category", &categories);
if (categories != NULL) {
- cfg_listelt_t *element;
+ const cfg_listelt_t *element;
for (element = cfg_list_first(categories);
element != NULL;
element = cfg_list_next(element))
{
- cfg_obj_t *catobj;
- char *str;
+ const cfg_obj_t *catobj;
+ const char *str;
obj = cfg_listelt_value(element);
catobj = cfg_tuple_get(obj, "name");
@@ -2627,7 +2635,7 @@ end_reserved_dispatches(ns_server_t *server, isc_boolean_t all) {
}
void
-ns_add_reserved_dispatch(ns_server_t *server, isc_sockaddr_t *addr) {
+ns_add_reserved_dispatch(ns_server_t *server, const isc_sockaddr_t *addr) {
ns_dispatch_t *dispatch;
in_port_t port;
char addrbuf[ISC_SOCKADDR_FORMATSIZE];
@@ -2929,12 +2937,12 @@ ns_server_togglequerylog(ns_server_t *server) {
}
static isc_result_t
-ns_listenlist_fromconfig(cfg_obj_t *listenlist, cfg_obj_t *config,
+ns_listenlist_fromconfig(const cfg_obj_t *listenlist, const cfg_obj_t *config,
ns_aclconfctx_t *actx,
isc_mem_t *mctx, ns_listenlist_t **target)
{
isc_result_t result;
- cfg_listelt_t *element;
+ const cfg_listelt_t *element;
ns_listenlist_t *dlist = NULL;
REQUIRE(target != NULL && *target == NULL);
@@ -2948,7 +2956,7 @@ ns_listenlist_fromconfig(cfg_obj_t *listenlist, cfg_obj_t *config,
element = cfg_list_next(element))
{
ns_listenelt_t *delt = NULL;
- cfg_obj_t *listener = cfg_listelt_value(element);
+ const cfg_obj_t *listener = cfg_listelt_value(element);
result = ns_listenelt_fromconfig(listener, config, actx,
mctx, &delt);
if (result != ISC_R_SUCCESS)
@@ -2968,12 +2976,12 @@ ns_listenlist_fromconfig(cfg_obj_t *listenlist, cfg_obj_t *config,
* data structure.
*/
static isc_result_t
-ns_listenelt_fromconfig(cfg_obj_t *listener, cfg_obj_t *config,
+ns_listenelt_fromconfig(const cfg_obj_t *listener, const cfg_obj_t *config,
ns_aclconfctx_t *actx,
isc_mem_t *mctx, ns_listenelt_t **target)
{
isc_result_t result;
- cfg_obj_t *portobj;
+ const cfg_obj_t *portobj;
in_port_t port;
ns_listenelt_t *delt = NULL;
REQUIRE(target != NULL && *target == NULL);
diff --git a/bin/named/sortlist.c b/bin/named/sortlist.c
index 4e8cffbcc7..6f92af4e79 100644
--- a/bin/named/sortlist.c
+++ b/bin/named/sortlist.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: sortlist.c,v 1.5.2.1 2004/03/09 06:09:20 marka Exp $ */
+/* $Id: sortlist.c,v 1.5.2.2 2006/03/01 01:34:05 marka Exp $ */
#include
@@ -30,7 +30,9 @@
#include
ns_sortlisttype_t
-ns_sortlist_setup(dns_acl_t *acl, isc_netaddr_t *clientaddr, void **argp) {
+ns_sortlist_setup(dns_acl_t *acl, isc_netaddr_t *clientaddr,
+ const void **argp)
+{
unsigned int i;
if (acl == NULL)
@@ -42,7 +44,7 @@ ns_sortlist_setup(dns_acl_t *acl, isc_netaddr_t *clientaddr, void **argp) {
* in the sortlist (see ARM).
*/
dns_aclelement_t *e = &acl->elements[i];
- dns_aclelement_t *matchelt = NULL;
+ const dns_aclelement_t *matchelt = NULL;
dns_acl_t *inner;
if (e->type != dns_aclelementtype_nestedacl)
@@ -88,8 +90,8 @@ ns_sortlist_setup(dns_acl_t *acl, isc_netaddr_t *clientaddr, void **argp) {
}
int
-ns_sortlist_addrorder2(isc_netaddr_t *addr, void *arg) {
- dns_acl_t *sortacl = (dns_acl_t *) arg;
+ns_sortlist_addrorder2(const isc_netaddr_t *addr, const void *arg) {
+ const dns_acl_t *sortacl = (const dns_acl_t *) arg;
int match;
(void)dns_acl_match(addr, NULL, sortacl,
@@ -104,8 +106,8 @@ ns_sortlist_addrorder2(isc_netaddr_t *addr, void *arg) {
}
int
-ns_sortlist_addrorder1(isc_netaddr_t *addr, void *arg) {
- dns_aclelement_t *matchelt = (dns_aclelement_t *) arg;
+ns_sortlist_addrorder1(const isc_netaddr_t *addr, const void *arg) {
+ const dns_aclelement_t *matchelt = (const dns_aclelement_t *) arg;
if (dns_aclelement_match(addr, NULL, matchelt,
&ns_g_server->aclenv,
NULL)) {
@@ -118,7 +120,7 @@ ns_sortlist_addrorder1(isc_netaddr_t *addr, void *arg) {
void
ns_sortlist_byaddrsetup(dns_acl_t *sortlist_acl, isc_netaddr_t *client_addr,
dns_addressorderfunc_t *orderp,
- void **argp)
+ const void **argp)
{
ns_sortlisttype_t sortlisttype;
diff --git a/bin/named/tkeyconf.c b/bin/named/tkeyconf.c
index 0f7dad6d38..bab4585ea3 100644
--- a/bin/named/tkeyconf.c
+++ b/bin/named/tkeyconf.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: tkeyconf.c,v 1.19.2.1 2004/03/09 06:09:20 marka Exp $ */
+/* $Id: tkeyconf.c,v 1.19.2.2 2006/03/01 01:34:05 marka Exp $ */
#include
@@ -42,17 +42,17 @@
isc_result_t
-ns_tkeyctx_fromconfig(cfg_obj_t *options, isc_mem_t *mctx, isc_entropy_t *ectx,
- dns_tkeyctx_t **tctxp)
+ns_tkeyctx_fromconfig(const cfg_obj_t *options, isc_mem_t *mctx,
+ isc_entropy_t *ectx, dns_tkeyctx_t **tctxp)
{
isc_result_t result;
dns_tkeyctx_t *tctx = NULL;
- char *s;
+ const char *s;
isc_uint32_t n;
dns_fixedname_t fname;
dns_name_t *name;
isc_buffer_t b;
- cfg_obj_t *obj;
+ const cfg_obj_t *obj;
result = dns_tkeyctx_create(mctx, ectx, &tctx);
if (result != ISC_R_SUCCESS)
diff --git a/bin/named/tsigconf.c b/bin/named/tsigconf.c
index 03f887abed..4a15eada9a 100644
--- a/bin/named/tsigconf.c
+++ b/bin/named/tsigconf.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: tsigconf.c,v 1.21.2.1 2004/03/09 06:09:20 marka Exp $ */
+/* $Id: tsigconf.c,v 1.21.2.2 2006/03/01 01:34:05 marka Exp $ */
#include
@@ -35,10 +35,12 @@
#include
static isc_result_t
-add_initial_keys(cfg_obj_t *list, dns_tsig_keyring_t *ring, isc_mem_t *mctx) {
- cfg_listelt_t *element;
- cfg_obj_t *key = NULL;
- char *keyid = NULL;
+add_initial_keys(const cfg_obj_t *list, dns_tsig_keyring_t *ring,
+ isc_mem_t *mctx)
+{
+ const cfg_listelt_t *element;
+ const cfg_obj_t *key = NULL;
+ const char *keyid = NULL;
unsigned char *secret = NULL;
int secretalloc = 0;
int secretlen = 0;
@@ -49,14 +51,14 @@ add_initial_keys(cfg_obj_t *list, dns_tsig_keyring_t *ring, isc_mem_t *mctx) {
element != NULL;
element = cfg_list_next(element))
{
- cfg_obj_t *algobj = NULL;
- cfg_obj_t *secretobj = NULL;
+ const cfg_obj_t *algobj = NULL;
+ const cfg_obj_t *secretobj = NULL;
dns_name_t keyname;
dns_name_t *alg;
- char *algstr;
+ const char *algstr;
char keynamedata[1024];
isc_buffer_t keynamesrc, keynamebuf;
- char *secretstr;
+ const char *secretstr;
isc_buffer_t secretbuf;
key = cfg_listelt_value(element);
@@ -129,11 +131,11 @@ add_initial_keys(cfg_obj_t *list, dns_tsig_keyring_t *ring, isc_mem_t *mctx) {
}
isc_result_t
-ns_tsigkeyring_fromconfig(cfg_obj_t *config, cfg_obj_t *vconfig,
+ns_tsigkeyring_fromconfig(const cfg_obj_t *config, const cfg_obj_t *vconfig,
isc_mem_t *mctx, dns_tsig_keyring_t **ringp)
{
- cfg_obj_t *maps[3];
- cfg_obj_t *keylist;
+ const cfg_obj_t *maps[3];
+ const cfg_obj_t *keylist;
dns_tsig_keyring_t *ring = NULL;
isc_result_t result;
int i;
diff --git a/bin/named/zoneconf.c b/bin/named/zoneconf.c
index 2d87858207..31b41cc909 100644
--- a/bin/named/zoneconf.c
+++ b/bin/named/zoneconf.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: zoneconf.c,v 1.87.2.11 2006/01/05 03:38:35 marka Exp $ */
+/* $Id: zoneconf.c,v 1.87.2.12 2006/03/01 01:34:05 marka Exp $ */
#include
@@ -52,15 +52,15 @@
* Convenience function for configuring a single zone ACL.
*/
static isc_result_t
-configure_zone_acl(cfg_obj_t *zconfig, cfg_obj_t *vconfig, cfg_obj_t *config,
- const char *aclname, ns_aclconfctx_t *actx,
- dns_zone_t *zone,
+configure_zone_acl(const cfg_obj_t *zconfig, const cfg_obj_t *vconfig,
+ const cfg_obj_t *config, const char *aclname,
+ ns_aclconfctx_t *actx, dns_zone_t *zone,
void (*setzacl)(dns_zone_t *, dns_acl_t *),
void (*clearzacl)(dns_zone_t *))
{
isc_result_t result;
- cfg_obj_t *maps[4];
- cfg_obj_t *aclobj = NULL;
+ const cfg_obj_t *maps[4];
+ const cfg_obj_t *aclobj = NULL;
int i = 0;
dns_acl_t *dacl = NULL;
@@ -69,7 +69,7 @@ configure_zone_acl(cfg_obj_t *zconfig, cfg_obj_t *vconfig, cfg_obj_t *config,
if (vconfig != NULL)
maps[i++] = cfg_tuple_get(vconfig, "options");
if (config != NULL) {
- cfg_obj_t *options = NULL;
+ const cfg_obj_t *options = NULL;
(void)cfg_map_get(config, "options", &options);
if (options != NULL)
maps[i++] = options;
@@ -95,9 +95,9 @@ configure_zone_acl(cfg_obj_t *zconfig, cfg_obj_t *vconfig, cfg_obj_t *config,
* Parse the zone update-policy statement.
*/
static isc_result_t
-configure_zone_ssutable(cfg_obj_t *zconfig, dns_zone_t *zone) {
- cfg_obj_t *updatepolicy = NULL;
- cfg_listelt_t *element, *element2;
+configure_zone_ssutable(const cfg_obj_t *zconfig, dns_zone_t *zone) {
+ const cfg_obj_t *updatepolicy = NULL;
+ const cfg_listelt_t *element, *element2;
dns_ssutable_t *table = NULL;
isc_mem_t *mctx = dns_zone_getmctx(zone);
isc_result_t result;
@@ -116,13 +116,13 @@ configure_zone_ssutable(cfg_obj_t *zconfig, dns_zone_t *zone) {
element != NULL;
element = cfg_list_next(element))
{
- cfg_obj_t *stmt = cfg_listelt_value(element);
- cfg_obj_t *mode = cfg_tuple_get(stmt, "mode");
- cfg_obj_t *identity = cfg_tuple_get(stmt, "identity");
- cfg_obj_t *matchtype = cfg_tuple_get(stmt, "matchtype");
- cfg_obj_t *dname = cfg_tuple_get(stmt, "name");
- cfg_obj_t *typelist = cfg_tuple_get(stmt, "types");
- char *str;
+ const cfg_obj_t *stmt = cfg_listelt_value(element);
+ const cfg_obj_t *mode = cfg_tuple_get(stmt, "mode");
+ const cfg_obj_t *identity = cfg_tuple_get(stmt, "identity");
+ const cfg_obj_t *matchtype = cfg_tuple_get(stmt, "matchtype");
+ const cfg_obj_t *dname = cfg_tuple_get(stmt, "name");
+ const cfg_obj_t *typelist = cfg_tuple_get(stmt, "types");
+ const char *str;
isc_boolean_t grant = ISC_FALSE;
unsigned int mtype = DNS_SSUMATCHTYPE_NAME;
dns_fixedname_t fname, fident;
@@ -190,14 +190,14 @@ configure_zone_ssutable(cfg_obj_t *zconfig, dns_zone_t *zone) {
element2 != NULL;
element2 = cfg_list_next(element2))
{
- cfg_obj_t *typeobj;
+ const cfg_obj_t *typeobj;
isc_textregion_t r;
INSIST(i < n);
typeobj = cfg_listelt_value(element2);
str = cfg_obj_asstring(typeobj);
- r.base = str;
+ DE_CONST(str, r.base);
r.length = strlen(str);
result = dns_rdatatype_fromtext(&types[i++], &r);
@@ -236,8 +236,8 @@ configure_zone_ssutable(cfg_obj_t *zconfig, dns_zone_t *zone) {
* Convert a config file zone type into a server zone type.
*/
static inline dns_zonetype_t
-zonetype_fromconfig(cfg_obj_t *map) {
- cfg_obj_t *obj = NULL;
+zonetype_fromconfig(const cfg_obj_t *map) {
+ const cfg_obj_t *obj = NULL;
isc_result_t result;
result = cfg_map_get(map, "type", &obj);
@@ -292,17 +292,18 @@ strtoargv(isc_mem_t *mctx, char *s, unsigned int *argcp, char ***argvp) {
}
isc_result_t
-ns_zone_configure(cfg_obj_t *config, cfg_obj_t *vconfig, cfg_obj_t *zconfig,
- ns_aclconfctx_t *ac, dns_zone_t *zone)
+ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
+ const cfg_obj_t *zconfig, ns_aclconfctx_t *ac,
+ dns_zone_t *zone)
{
isc_result_t result;
- char *zname;
+ const char *zname;
dns_rdataclass_t zclass;
dns_rdataclass_t vclass;
- cfg_obj_t *maps[5];
- cfg_obj_t *zoptions = NULL;
- cfg_obj_t *options = NULL;
- cfg_obj_t *obj;
+ const cfg_obj_t *maps[5];
+ const cfg_obj_t *zoptions = NULL;
+ const cfg_obj_t *options = NULL;
+ const cfg_obj_t *obj;
const char *filename = NULL;
dns_notifytype_t notifytype = dns_notifytype_yes;
isc_sockaddr_t *addrs;
@@ -407,7 +408,7 @@ ns_zone_configure(cfg_obj_t *config, cfg_obj_t *vconfig, cfg_obj_t *zconfig,
else
dialup = dns_dialuptype_no;
} else {
- char *dialupstr = cfg_obj_asstring(obj);
+ const char *dialupstr = cfg_obj_asstring(obj);
if (strcasecmp(dialupstr, "notify") == 0)
dialup = dns_dialuptype_notify;
else if (strcasecmp(dialupstr, "notify-passive") == 0)
@@ -441,7 +442,7 @@ ns_zone_configure(cfg_obj_t *config, cfg_obj_t *vconfig, cfg_obj_t *zconfig,
else
notifytype = dns_notifytype_no;
} else {
- char *notifystr = cfg_obj_asstring(obj);
+ const char *notifystr = cfg_obj_asstring(obj);
if (strcasecmp(notifystr, "explicit") == 0)
notifytype = dns_notifytype_explicit;
else
@@ -602,9 +603,9 @@ ns_zone_configure(cfg_obj_t *config, cfg_obj_t *vconfig, cfg_obj_t *zconfig,
}
isc_boolean_t
-ns_zone_reusable(dns_zone_t *zone, cfg_obj_t *zconfig) {
- cfg_obj_t *zoptions = NULL;
- cfg_obj_t *obj = NULL;
+ns_zone_reusable(dns_zone_t *zone, const cfg_obj_t *zconfig) {
+ const cfg_obj_t *zoptions = NULL;
+ const cfg_obj_t *obj = NULL;
const char *cfilename;
const char *zfilename;
diff --git a/bin/rndc/rndc.c b/bin/rndc/rndc.c
index 071b8ac4c7..ba83be1edb 100644
--- a/bin/rndc/rndc.c
+++ b/bin/rndc/rndc.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: rndc.c,v 1.77.2.6 2004/03/09 06:09:27 marka Exp $ */
+/* $Id: rndc.c,v 1.77.2.7 2006/03/01 01:34:05 marka Exp $ */
/*
* Principal Author: DCL
@@ -409,17 +409,17 @@ parse_config(isc_mem_t *mctx, isc_log_t *log, const char *keyname,
{
isc_result_t result;
const char *conffile = admin_conffile;
- cfg_obj_t *defkey = NULL;
- cfg_obj_t *options = NULL;
- cfg_obj_t *servers = NULL;
- cfg_obj_t *server = NULL;
- cfg_obj_t *keys = NULL;
- cfg_obj_t *key = NULL;
- cfg_obj_t *defport = NULL;
- cfg_obj_t *secretobj = NULL;
- cfg_obj_t *algorithmobj = NULL;
+ const cfg_obj_t *defkey = NULL;
+ const cfg_obj_t *options = NULL;
+ const cfg_obj_t *servers = NULL;
+ const cfg_obj_t *server = NULL;
+ const cfg_obj_t *keys = NULL;
+ const cfg_obj_t *key = NULL;
+ const cfg_obj_t *defport = NULL;
+ const cfg_obj_t *secretobj = NULL;
+ const cfg_obj_t *algorithmobj = NULL;
cfg_obj_t *config = NULL;
- cfg_listelt_t *elt;
+ const cfg_listelt_t *elt;
const char *secretstr;
const char *algorithm;
static char secretarray[1024];
@@ -451,7 +451,7 @@ parse_config(isc_mem_t *mctx, isc_log_t *log, const char *keyname,
if (key_only && servername == NULL)
servername = "127.0.0.1";
else if (servername == NULL && options != NULL) {
- cfg_obj_t *defserverobj = NULL;
+ const cfg_obj_t *defserverobj = NULL;
(void)cfg_map_get(options, "default-server", &defserverobj);
if (defserverobj != NULL)
servername = cfg_obj_asstring(defserverobj);
diff --git a/lib/dns/acl.c b/lib/dns/acl.c
index eb2fa1c54a..68962b6867 100644
--- a/lib/dns/acl.c
+++ b/lib/dns/acl.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: acl.c,v 1.23.2.1 2004/03/09 06:10:59 marka Exp $ */
+/* $Id: acl.c,v 1.23.2.2 2006/03/01 01:34:05 marka Exp $ */
#include
@@ -68,7 +68,7 @@ dns_acl_create(isc_mem_t *mctx, int n, dns_acl_t **target) {
}
isc_result_t
-dns_acl_appendelement(dns_acl_t *acl, dns_aclelement_t *elt) {
+dns_acl_appendelement(dns_acl_t *acl, const dns_aclelement_t *elt) {
if (acl->length + 1 > acl->alloc) {
/*
* Resize the ACL.
@@ -123,12 +123,12 @@ dns_acl_none(isc_mem_t *mctx, dns_acl_t **target) {
}
isc_result_t
-dns_acl_match(isc_netaddr_t *reqaddr,
- dns_name_t *reqsigner,
- dns_acl_t *acl,
- dns_aclenv_t *env,
+dns_acl_match(const isc_netaddr_t *reqaddr,
+ const dns_name_t *reqsigner,
+ const dns_acl_t *acl,
+ const dns_aclenv_t *env,
int *match,
- dns_aclelement_t **matchelt)
+ dns_aclelement_t const**matchelt)
{
unsigned int i;
@@ -150,14 +150,14 @@ dns_acl_match(isc_netaddr_t *reqaddr,
}
isc_boolean_t
-dns_aclelement_match(isc_netaddr_t *reqaddr,
- dns_name_t *reqsigner,
- dns_aclelement_t *e,
- dns_aclenv_t *env,
- dns_aclelement_t **matchelt)
+dns_aclelement_match(const isc_netaddr_t *reqaddr,
+ const dns_name_t *reqsigner,
+ const dns_aclelement_t *e,
+ const dns_aclenv_t *env,
+ const dns_aclelement_t **matchelt)
{
dns_acl_t *inner = NULL;
- isc_netaddr_t *addr;
+ const isc_netaddr_t *addr;
isc_netaddr_t v4addr;
int indirectmatch;
isc_result_t result;
@@ -289,7 +289,7 @@ dns_acl_detach(dns_acl_t **aclp) {
}
isc_boolean_t
-dns_aclelement_equal(dns_aclelement_t *ea, dns_aclelement_t *eb) {
+dns_aclelement_equal(const dns_aclelement_t *ea, const dns_aclelement_t *eb) {
if (ea->type != eb->type)
return (ISC_FALSE);
switch (ea->type) {
@@ -314,7 +314,7 @@ dns_aclelement_equal(dns_aclelement_t *ea, dns_aclelement_t *eb) {
}
isc_boolean_t
-dns_acl_equal(dns_acl_t *a, dns_acl_t *b) {
+dns_acl_equal(const dns_acl_t *a, const dns_acl_t *b) {
unsigned int i;
if (a == b)
return (ISC_TRUE);
@@ -329,7 +329,7 @@ dns_acl_equal(dns_acl_t *a, dns_acl_t *b) {
}
static isc_boolean_t
-is_loopback(dns_aclipprefix_t *p) {
+is_loopback(const dns_aclipprefix_t *p) {
switch (p->address.family) {
case AF_INET:
if (p->prefixlen == 32 &&
@@ -348,7 +348,7 @@ is_loopback(dns_aclipprefix_t *p) {
}
isc_boolean_t
-dns_acl_isinsecure(dns_acl_t *a) {
+dns_acl_isinsecure(const dns_acl_t *a) {
unsigned int i;
for (i = 0; i < a->length; i++) {
dns_aclelement_t *e = &a->elements[i];
diff --git a/lib/dns/cache.c b/lib/dns/cache.c
index 04e2de8957..4305e0c0de 100644
--- a/lib/dns/cache.c
+++ b/lib/dns/cache.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: cache.c,v 1.45.2.10 2006/01/26 23:11:39 marka Exp $ */
+/* $Id: cache.c,v 1.45.2.11 2006/03/01 01:34:05 marka Exp $ */
#include
@@ -378,7 +378,7 @@ dns_cache_attachdb(dns_cache_t *cache, dns_db_t **dbp) {
}
isc_result_t
-dns_cache_setfilename(dns_cache_t *cache, char *filename) {
+dns_cache_setfilename(dns_cache_t *cache, const char *filename) {
char *newname;
REQUIRE(VALID_CACHE(cache));
diff --git a/lib/dns/compress.c b/lib/dns/compress.c
index e5c7631538..fd241a7fb3 100644
--- a/lib/dns/compress.c
+++ b/lib/dns/compress.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: compress.c,v 1.50.2.2 2004/03/09 06:11:00 marka Exp $ */
+/* $Id: compress.c,v 1.50.2.3 2006/03/01 01:34:05 marka Exp $ */
#define DNS_NAME_USEINLINE 1
@@ -111,7 +111,7 @@ do { \
* If no match is found return ISC_FALSE.
*/
isc_boolean_t
-dns_compress_findglobal(dns_compress_t *cctx, dns_name_t *name,
+dns_compress_findglobal(dns_compress_t *cctx, const dns_name_t *name,
dns_name_t *prefix, isc_uint16_t *offset)
{
dns_name_t tname, nname;
@@ -161,15 +161,15 @@ dns_compress_findglobal(dns_compress_t *cctx, dns_name_t *name,
}
static inline unsigned int
-name_length(dns_name_t *name) {
+name_length(const dns_name_t *name) {
isc_region_t r;
dns_name_toregion(name, &r);
return (r.length);
}
void
-dns_compress_add(dns_compress_t *cctx, dns_name_t *name, dns_name_t *prefix,
- isc_uint16_t offset)
+dns_compress_add(dns_compress_t *cctx, const dns_name_t *name,
+ const dns_name_t *prefix, isc_uint16_t offset)
{
dns_name_t tname;
unsigned int start;
diff --git a/lib/dns/include/dns/acl.h b/lib/dns/include/dns/acl.h
index 674a9c44ae..7a38b8d1c2 100644
--- a/lib/dns/include/dns/acl.h
+++ b/lib/dns/include/dns/acl.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: acl.h,v 1.20.2.1 2004/03/09 06:11:12 marka Exp $ */
+/* $Id: acl.h,v 1.20.2.2 2006/03/01 01:34:05 marka Exp $ */
#ifndef DNS_ACL_H
#define DNS_ACL_H 1
@@ -104,7 +104,7 @@ dns_acl_create(isc_mem_t *mctx, int n, dns_acl_t **target);
*/
isc_result_t
-dns_acl_appendelement(dns_acl_t *acl, dns_aclelement_t *elt);
+dns_acl_appendelement(dns_acl_t *acl, const dns_aclelement_t *elt);
/*
* Append an element to an existing ACL.
*/
@@ -128,13 +128,13 @@ void
dns_acl_detach(dns_acl_t **aclp);
isc_boolean_t
-dns_aclelement_equal(dns_aclelement_t *ea, dns_aclelement_t *eb);
+dns_aclelement_equal(const dns_aclelement_t *ea, const dns_aclelement_t *eb);
isc_boolean_t
-dns_acl_equal(dns_acl_t *a, dns_acl_t *b);
+dns_acl_equal(const dns_acl_t *a, const dns_acl_t *b);
isc_boolean_t
-dns_acl_isinsecure(dns_acl_t *a);
+dns_acl_isinsecure(const dns_acl_t *a);
/*
* Return ISC_TRUE iff the acl 'a' is considered insecure, that is,
* if it contains IP addresses other than those of the local host.
@@ -154,12 +154,12 @@ void
dns_aclenv_destroy(dns_aclenv_t *env);
isc_result_t
-dns_acl_match(isc_netaddr_t *reqaddr,
- dns_name_t *reqsigner,
- dns_acl_t *acl,
- dns_aclenv_t *env,
+dns_acl_match(const isc_netaddr_t *reqaddr,
+ const dns_name_t *reqsigner,
+ const dns_acl_t *acl,
+ const dns_aclenv_t *env,
int *match,
- dns_aclelement_t **matchelt);
+ const dns_aclelement_t **matchelt);
/*
* General, low-level ACL matching. This is expected to
* be useful even for weird stuff like the topology and sortlist statements.
@@ -185,11 +185,11 @@ dns_acl_match(isc_netaddr_t *reqaddr,
*/
isc_boolean_t
-dns_aclelement_match(isc_netaddr_t *reqaddr,
- dns_name_t *reqsigner,
- dns_aclelement_t *e,
- dns_aclenv_t *env,
- dns_aclelement_t **matchelt);
+dns_aclelement_match(const isc_netaddr_t *reqaddr,
+ const dns_name_t *reqsigner,
+ const dns_aclelement_t *e,
+ const dns_aclenv_t *env,
+ const dns_aclelement_t **matchelt);
/*
* Like dns_acl_match, but matches against the single ACL element 'e'
* rather than a complete list and returns ISC_TRUE iff it matched.
diff --git a/lib/dns/include/dns/cache.h b/lib/dns/include/dns/cache.h
index 4b4d9c8880..18c50cdaca 100644
--- a/lib/dns/include/dns/cache.h
+++ b/lib/dns/include/dns/cache.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: cache.h,v 1.17.2.1 2004/03/09 06:11:13 marka Exp $ */
+/* $Id: cache.h,v 1.17.2.2 2006/03/01 01:34:05 marka Exp $ */
#ifndef DNS_CACHE_H
#define DNS_CACHE_H 1
@@ -151,7 +151,7 @@ dns_cache_attachdb(dns_cache_t *cache, dns_db_t **dbp);
isc_result_t
-dns_cache_setfilename(dns_cache_t *cahce, char *filename);
+dns_cache_setfilename(dns_cache_t *cahce, const char *filename);
/*
* If 'filename' is non-NULL, make the cache persistent.
* The cache's data will be stored in the given file.
diff --git a/lib/dns/include/dns/compress.h b/lib/dns/include/dns/compress.h
index 8d7191fc3f..c514c3163b 100644
--- a/lib/dns/include/dns/compress.h
+++ b/lib/dns/include/dns/compress.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: compress.h,v 1.29.2.3 2004/03/09 06:11:14 marka Exp $ */
+/* $Id: compress.h,v 1.29.2.4 2006/03/01 01:34:05 marka Exp $ */
#ifndef DNS_COMPRESS_H
#define DNS_COMPRESS_H 1
@@ -136,7 +136,7 @@ dns_compress_getedns(dns_compress_t *cctx);
*/
isc_boolean_t
-dns_compress_findglobal(dns_compress_t *cctx, dns_name_t *name,
+dns_compress_findglobal(dns_compress_t *cctx, const dns_name_t *name,
dns_name_t *prefix, isc_uint16_t *offset);
/*
* Finds longest possible match of 'name' in the global compression table.
@@ -155,8 +155,8 @@ dns_compress_findglobal(dns_compress_t *cctx, dns_name_t *name,
*/
void
-dns_compress_add(dns_compress_t *cctx, dns_name_t *name, dns_name_t *prefix,
- isc_uint16_t offset);
+dns_compress_add(dns_compress_t *cctx, const dns_name_t *name,
+ const dns_name_t *prefix, isc_uint16_t offset);
/*
* Add compression pointers for 'name' to the compression table,
* not replacing existing pointers.
diff --git a/lib/dns/include/dns/masterdump.h b/lib/dns/include/dns/masterdump.h
index 6980cf808e..c9efb40139 100644
--- a/lib/dns/include/dns/masterdump.h
+++ b/lib/dns/include/dns/masterdump.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: masterdump.h,v 1.22.2.3 2005/09/06 02:11:55 marka Exp $ */
+/* $Id: masterdump.h,v 1.22.2.4 2006/03/01 01:34:05 marka Exp $ */
#ifndef DNS_MASTERDUMP_H
#define DNS_MASTERDUMP_H 1
@@ -159,7 +159,7 @@ dns_master_questiontotext(dns_name_t *owner_name,
isc_result_t
dns_rdataset_towire(dns_rdataset_t *rdataset,
- dns_name_t *owner_name,
+ const dns_name_t *owner_name,
dns_compress_t *cctx,
isc_buffer_t *target,
unsigned int *countp);
diff --git a/lib/dns/include/dns/message.h b/lib/dns/include/dns/message.h
index e084d43834..b49db0c582 100644
--- a/lib/dns/include/dns/message.h
+++ b/lib/dns/include/dns/message.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: message.h,v 1.100.2.6 2006/01/06 00:01:41 marka Exp $ */
+/* $Id: message.h,v 1.100.2.7 2006/03/01 01:34:05 marka Exp $ */
#ifndef DNS_MESSAGE_H
#define DNS_MESSAGE_H 1
@@ -231,7 +231,7 @@ struct dns_message {
isc_region_t saved;
dns_rdatasetorderfunc_t order;
- void * order_arg;
+ const void * order_arg;
};
/***
@@ -1247,7 +1247,7 @@ dns_message_getrawmessage(dns_message_t *msg);
void
dns_message_setsortorder(dns_message_t *msg, dns_rdatasetorderfunc_t order,
- void *order_arg);
+ const void *order_arg);
/*
* Define the order in which RR sets get rendered by
* dns_message_rendersection() to be the ascending order
diff --git a/lib/dns/include/dns/name.h b/lib/dns/include/dns/name.h
index d1f96d82ee..fe338830f1 100644
--- a/lib/dns/include/dns/name.h
+++ b/lib/dns/include/dns/name.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: name.h,v 1.95.2.9 2004/09/08 00:34:23 marka Exp $ */
+/* $Id: name.h,v 1.95.2.10 2006/03/01 01:34:07 marka Exp $ */
#ifndef DNS_NAME_H
#define DNS_NAME_H 1
@@ -679,7 +679,7 @@ dns_name_getlabelsequence(const dns_name_t *source, unsigned int first,
void
-dns_name_clone(dns_name_t *source, dns_name_t *target);
+dns_name_clone(const dns_name_t *source, dns_name_t *target);
/*
* Make 'target' refer to the same name as 'source'.
*
@@ -796,7 +796,8 @@ dns_name_fromwire(dns_name_t *name, isc_buffer_t *source,
*/
isc_result_t
-dns_name_towire(dns_name_t *name, dns_compress_t *cctx, isc_buffer_t *target);
+dns_name_towire(const dns_name_t *name, dns_compress_t *cctx,
+ isc_buffer_t *target);
/*
* Convert 'name' into wire format, compressing it as specified by the
* compression context 'cctx', and storing the result in 'target'.
@@ -1132,7 +1133,7 @@ dns_name_splitatdepth(dns_name_t *name, unsigned int depth,
*/
isc_result_t
-dns_name_dup(dns_name_t *source, isc_mem_t *mctx, dns_name_t *target);
+dns_name_dup(const dns_name_t *source, isc_mem_t *mctx, dns_name_t *target);
/*
* Make 'target' a dynamically allocated copy of 'source'.
*
diff --git a/lib/dns/include/dns/rdataset.h b/lib/dns/include/dns/rdataset.h
index b6f6d00748..4854f2a8fc 100644
--- a/lib/dns/include/dns/rdataset.h
+++ b/lib/dns/include/dns/rdataset.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: rdataset.h,v 1.41.2.8 2005/03/16 00:57:43 marka Exp $ */
+/* $Id: rdataset.h,v 1.41.2.9 2006/03/01 01:34:07 marka Exp $ */
#ifndef DNS_RDATASET_H
#define DNS_RDATASET_H 1
@@ -306,7 +306,7 @@ dns_rdataset_totext(dns_rdataset_t *rdataset,
isc_result_t
dns_rdataset_towire(dns_rdataset_t *rdataset,
- dns_name_t *owner_name,
+ const dns_name_t *owner_name,
dns_compress_t *cctx,
isc_buffer_t *target,
unsigned int *countp);
@@ -344,11 +344,11 @@ dns_rdataset_towire(dns_rdataset_t *rdataset,
isc_result_t
dns_rdataset_towiresorted(dns_rdataset_t *rdataset,
- dns_name_t *owner_name,
+ const dns_name_t *owner_name,
dns_compress_t *cctx,
isc_buffer_t *target,
dns_rdatasetorderfunc_t order,
- void *order_arg,
+ const void *order_arg,
unsigned int *countp);
/*
* Like dns_rdataset_towire(), but sorting the rdatasets according to
@@ -362,11 +362,11 @@ dns_rdataset_towiresorted(dns_rdataset_t *rdataset,
isc_result_t
dns_rdataset_towirepartial(dns_rdataset_t *rdataset,
- dns_name_t *owner_name,
+ const dns_name_t *owner_name,
dns_compress_t *cctx,
isc_buffer_t *target,
dns_rdatasetorderfunc_t order,
- void *order_arg,
+ const void *order_arg,
unsigned int *countp,
void **state);
/*
diff --git a/lib/dns/include/dns/types.h b/lib/dns/include/dns/types.h
index df6d8a3b94..caa244708e 100644
--- a/lib/dns/include/dns/types.h
+++ b/lib/dns/include/dns/types.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: types.h,v 1.103.2.1 2004/03/09 06:11:24 marka Exp $ */
+/* $Id: types.h,v 1.103.2.2 2006/03/01 01:34:07 marka Exp $ */
#ifndef DNS_TYPES_H
#define DNS_TYPES_H 1
@@ -299,6 +299,6 @@ typedef void
(*dns_updatecallback_t)(void *, isc_result_t, dns_message_t *);
typedef int
-(*dns_rdatasetorderfunc_t)(dns_rdata_t *rdata, void *arg);
+(*dns_rdatasetorderfunc_t)(const dns_rdata_t *rdata, const void *arg);
#endif /* DNS_TYPES_H */
diff --git a/lib/dns/include/dns/zone.h b/lib/dns/include/dns/zone.h
index fb54b08b5d..5a633a8e61 100644
--- a/lib/dns/include/dns/zone.h
+++ b/lib/dns/include/dns/zone.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: zone.h,v 1.106.2.9 2004/10/26 02:08:00 marka Exp $ */
+/* $Id: zone.h,v 1.106.2.10 2006/03/01 01:34:07 marka Exp $ */
#ifndef DNS_ZONE_H
#define DNS_ZONE_H 1
@@ -156,7 +156,7 @@ dns_zone_getview(dns_zone_t *zone);
*/
isc_result_t
-dns_zone_setorigin(dns_zone_t *zone, dns_name_t *origin);
+dns_zone_setorigin(dns_zone_t *zone, const dns_name_t *origin);
/*
* Sets the zones origin to 'origin'.
*
@@ -393,11 +393,13 @@ dns_zone_maintenance(dns_zone_t *zone);
*/
isc_result_t
-dns_zone_setmasters(dns_zone_t *zone, isc_sockaddr_t *masters,
+dns_zone_setmasters(dns_zone_t *zone, const isc_sockaddr_t *masters,
isc_uint32_t count);
isc_result_t
-dns_zone_setmasterswithkeys(dns_zone_t *zone, isc_sockaddr_t *masters,
- dns_name_t **keynames, isc_uint32_t count);
+dns_zone_setmasterswithkeys(dns_zone_t *zone,
+ const isc_sockaddr_t *masters,
+ dns_name_t **keynames,
+ isc_uint32_t count);
/*
* Set the list of master servers for the zone.
*
@@ -419,7 +421,7 @@ dns_zone_setmasterswithkeys(dns_zone_t *zone, isc_sockaddr_t *masters,
*/
isc_result_t
-dns_zone_setalsonotify(dns_zone_t *zone, isc_sockaddr_t *notify,
+dns_zone_setalsonotify(dns_zone_t *zone, const isc_sockaddr_t *notify,
isc_uint32_t count);
/*
* Set the list of additional servers to be notified when
@@ -504,7 +506,7 @@ dns_zone_setmaxretrytime(dns_zone_t *zone, isc_uint32_t val);
*/
isc_result_t
-dns_zone_setxfrsource4(dns_zone_t *zone, isc_sockaddr_t *xfrsource);
+dns_zone_setxfrsource4(dns_zone_t *zone, const isc_sockaddr_t *xfrsource);
/*
* Set the source address to be used in IPv4 zone transfers.
*
@@ -527,7 +529,7 @@ dns_zone_getxfrsource4(dns_zone_t *zone);
*/
isc_result_t
-dns_zone_setxfrsource6(dns_zone_t *zone, isc_sockaddr_t *xfrsource);
+dns_zone_setxfrsource6(dns_zone_t *zone, const isc_sockaddr_t *xfrsource);
/*
* Set the source address to be used in IPv6 zone transfers.
*
@@ -550,7 +552,7 @@ dns_zone_getxfrsource6(dns_zone_t *zone);
*/
isc_result_t
-dns_zone_setnotifysrc4(dns_zone_t *zone, isc_sockaddr_t *notifysrc);
+dns_zone_setnotifysrc4(dns_zone_t *zone, const isc_sockaddr_t *notifysrc);
/*
* Set the source address to be used with IPv4 NOTIFY messages.
*
@@ -573,7 +575,7 @@ dns_zone_getnotifysrc4(dns_zone_t *zone);
*/
isc_result_t
-dns_zone_setnotifysrc6(dns_zone_t *zone, isc_sockaddr_t *notifysrc);
+dns_zone_setnotifysrc6(dns_zone_t *zone, const isc_sockaddr_t *notifysrc);
/*
* Set the source address to be used with IPv6 NOTIFY messages.
*
diff --git a/lib/dns/message.c b/lib/dns/message.c
index 25eb2e4c79..a19014df1c 100644
--- a/lib/dns/message.c
+++ b/lib/dns/message.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: message.c,v 1.194.2.19 2006/01/05 01:04:30 marka Exp $ */
+/* $Id: message.c,v 1.194.2.20 2006/03/01 01:34:05 marka Exp $ */
/***
*** Imports
@@ -1799,7 +1799,7 @@ dns_message_rendersection(dns_message_t *msg, dns_section_t sectionid,
if (rdataset != NULL &&
(rdataset->attributes & DNS_RDATASETATTR_REQUIREDGLUE) != 0 &&
(rdataset->attributes & DNS_RDATASETATTR_RENDERED) == 0) {
- void *order_arg = msg->order_arg;
+ const void *order_arg = msg->order_arg;
st = *(msg->buffer);
count = 0;
if (partial)
@@ -3153,7 +3153,7 @@ dns_message_getrawmessage(dns_message_t *msg) {
void
dns_message_setsortorder(dns_message_t *msg, dns_rdatasetorderfunc_t order,
- void *order_arg)
+ const void *order_arg)
{
REQUIRE(DNS_MESSAGE_VALID(msg));
msg->order = order;
diff --git a/lib/dns/name.c b/lib/dns/name.c
index 41ea103d21..e4fd8f87c5 100644
--- a/lib/dns/name.c
+++ b/lib/dns/name.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: name.c,v 1.127.2.12 2005/07/23 04:34:21 marka Exp $ */
+/* $Id: name.c,v 1.127.2.13 2006/03/01 01:34:05 marka Exp $ */
#include
@@ -1032,7 +1032,7 @@ dns_name_getlabelsequence(const dns_name_t *source,
}
void
-dns_name_clone(dns_name_t *source, dns_name_t *target) {
+dns_name_clone(const dns_name_t *source, dns_name_t *target) {
/*
* Make 'target' refer to the same name as 'source'.
@@ -2545,7 +2545,9 @@ dns_name_fromwire(dns_name_t *name, isc_buffer_t *source,
}
isc_result_t
-dns_name_towire(dns_name_t *name, dns_compress_t *cctx, isc_buffer_t *target) {
+dns_name_towire(const dns_name_t *name, dns_compress_t *cctx,
+ isc_buffer_t *target)
+{
unsigned int methods;
isc_uint16_t offset;
dns_name_t gp; /* Global compression prefix */
@@ -3127,7 +3129,9 @@ dns_name_splitatdepth(dns_name_t *name, unsigned int depth,
}
isc_result_t
-dns_name_dup(dns_name_t *source, isc_mem_t *mctx, dns_name_t *target) {
+dns_name_dup(const dns_name_t *source, isc_mem_t *mctx,
+ dns_name_t *target)
+{
/*
* Make 'target' a dynamically allocated copy of 'source'.
*/
diff --git a/lib/dns/rdataset.c b/lib/dns/rdataset.c
index f77765805c..534847d15c 100644
--- a/lib/dns/rdataset.c
+++ b/lib/dns/rdataset.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: rdataset.c,v 1.58.2.5 2004/03/09 06:11:06 marka Exp $ */
+/* $Id: rdataset.c,v 1.58.2.6 2006/03/01 01:34:05 marka Exp $ */
#include
@@ -272,9 +272,9 @@ towire_compare(const void *av, const void *bv) {
}
static isc_result_t
-towiresorted(dns_rdataset_t *rdataset, dns_name_t *owner_name,
+towiresorted(dns_rdataset_t *rdataset, const dns_name_t *owner_name,
dns_compress_t *cctx, isc_buffer_t *target,
- dns_rdatasetorderfunc_t order, void *order_arg,
+ dns_rdatasetorderfunc_t order, const void *order_arg,
isc_boolean_t partial, unsigned int *countp,
void **state)
{
@@ -483,11 +483,11 @@ towiresorted(dns_rdataset_t *rdataset, dns_name_t *owner_name,
isc_result_t
dns_rdataset_towiresorted(dns_rdataset_t *rdataset,
- dns_name_t *owner_name,
+ const dns_name_t *owner_name,
dns_compress_t *cctx,
isc_buffer_t *target,
dns_rdatasetorderfunc_t order,
- void *order_arg,
+ const void *order_arg,
unsigned int *countp)
{
return (towiresorted(rdataset, owner_name, cctx, target,
@@ -496,11 +496,11 @@ dns_rdataset_towiresorted(dns_rdataset_t *rdataset,
isc_result_t
dns_rdataset_towirepartial(dns_rdataset_t *rdataset,
- dns_name_t *owner_name,
+ const dns_name_t *owner_name,
dns_compress_t *cctx,
isc_buffer_t *target,
dns_rdatasetorderfunc_t order,
- void *order_arg,
+ const void *order_arg,
unsigned int *countp,
void **state)
{
@@ -511,7 +511,7 @@ dns_rdataset_towirepartial(dns_rdataset_t *rdataset,
isc_result_t
dns_rdataset_towire(dns_rdataset_t *rdataset,
- dns_name_t *owner_name,
+ const dns_name_t *owner_name,
dns_compress_t *cctx,
isc_buffer_t *target,
unsigned int *countp)
diff --git a/lib/dns/zone.c b/lib/dns/zone.c
index f046f5d30c..ce09bbcbca 100644
--- a/lib/dns/zone.c
+++ b/lib/dns/zone.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: zone.c,v 1.333.2.42 2006/01/04 04:08:14 marka Exp $ */
+/* $Id: zone.c,v 1.333.2.43 2006/03/01 01:34:05 marka Exp $ */
#include
@@ -754,7 +754,7 @@ dns_zone_getview(dns_zone_t *zone) {
isc_result_t
-dns_zone_setorigin(dns_zone_t *zone, dns_name_t *origin) {
+dns_zone_setorigin(dns_zone_t *zone, const dns_name_t *origin) {
isc_result_t result;
REQUIRE(DNS_ZONE_VALID(zone));
@@ -1698,7 +1698,7 @@ dns_zone_getoptions(dns_zone_t *zone) {
}
isc_result_t
-dns_zone_setxfrsource4(dns_zone_t *zone, isc_sockaddr_t *xfrsource) {
+dns_zone_setxfrsource4(dns_zone_t *zone, const isc_sockaddr_t *xfrsource) {
REQUIRE(DNS_ZONE_VALID(zone));
LOCK_ZONE(zone);
@@ -1715,7 +1715,7 @@ dns_zone_getxfrsource4(dns_zone_t *zone) {
}
isc_result_t
-dns_zone_setxfrsource6(dns_zone_t *zone, isc_sockaddr_t *xfrsource) {
+dns_zone_setxfrsource6(dns_zone_t *zone, const isc_sockaddr_t *xfrsource) {
REQUIRE(DNS_ZONE_VALID(zone));
LOCK_ZONE(zone);
@@ -1732,7 +1732,7 @@ dns_zone_getxfrsource6(dns_zone_t *zone) {
}
isc_result_t
-dns_zone_setnotifysrc4(dns_zone_t *zone, isc_sockaddr_t *notifysrc) {
+dns_zone_setnotifysrc4(dns_zone_t *zone, const isc_sockaddr_t *notifysrc) {
REQUIRE(DNS_ZONE_VALID(zone));
LOCK_ZONE(zone);
@@ -1749,7 +1749,7 @@ dns_zone_getnotifysrc4(dns_zone_t *zone) {
}
isc_result_t
-dns_zone_setnotifysrc6(dns_zone_t *zone, isc_sockaddr_t *notifysrc) {
+dns_zone_setnotifysrc6(dns_zone_t *zone, const isc_sockaddr_t *notifysrc) {
REQUIRE(DNS_ZONE_VALID(zone));
LOCK_ZONE(zone);
@@ -1766,7 +1766,7 @@ dns_zone_getnotifysrc6(dns_zone_t *zone) {
}
isc_result_t
-dns_zone_setalsonotify(dns_zone_t *zone, isc_sockaddr_t *notify,
+dns_zone_setalsonotify(dns_zone_t *zone, const isc_sockaddr_t *notify,
isc_uint32_t count)
{
isc_sockaddr_t *new;
@@ -1796,7 +1796,7 @@ dns_zone_setalsonotify(dns_zone_t *zone, isc_sockaddr_t *notify,
}
isc_result_t
-dns_zone_setmasters(dns_zone_t *zone, isc_sockaddr_t *masters,
+dns_zone_setmasters(dns_zone_t *zone, const isc_sockaddr_t *masters,
isc_uint32_t count)
{
isc_result_t result;
@@ -1806,8 +1806,10 @@ dns_zone_setmasters(dns_zone_t *zone, isc_sockaddr_t *masters,
}
isc_result_t
-dns_zone_setmasterswithkeys(dns_zone_t *zone, isc_sockaddr_t *masters,
- dns_name_t **keynames, isc_uint32_t count)
+dns_zone_setmasterswithkeys(dns_zone_t *zone,
+ const isc_sockaddr_t *masters,
+ dns_name_t **keynames,
+ isc_uint32_t count)
{
isc_sockaddr_t *new;
isc_result_t result = ISC_R_SUCCESS;
diff --git a/lib/isc/include/isc/sockaddr.h b/lib/isc/include/isc/sockaddr.h
index a18f1c623d..6bb470a43b 100644
--- a/lib/isc/include/isc/sockaddr.h
+++ b/lib/isc/include/isc/sockaddr.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: sockaddr.h,v 1.35.2.2 2004/03/09 06:12:01 marka Exp $ */
+/* $Id: sockaddr.h,v 1.35.2.3 2006/03/01 01:34:07 marka Exp $ */
#ifndef ISC_SOCKADDR_H
#define ISC_SOCKADDR_H 1
@@ -138,7 +138,7 @@ isc_sockaddr_setport(isc_sockaddr_t *sockaddr, in_port_t port);
*/
in_port_t
-isc_sockaddr_getport(isc_sockaddr_t *sockaddr);
+isc_sockaddr_getport(const isc_sockaddr_t *sockaddr);
/*
* Get the port stored in 'sockaddr'.
*/
@@ -157,7 +157,7 @@ isc_sockaddr_totext(const isc_sockaddr_t *sockaddr, isc_buffer_t *target);
*/
void
-isc_sockaddr_format(isc_sockaddr_t *sa, char *array, unsigned int size);
+isc_sockaddr_format(const isc_sockaddr_t *sa, char *array, unsigned int size);
/*
* Format a human-readable representation of the socket address '*sa'
* into the character array 'array', which is of size 'size'.
@@ -165,13 +165,13 @@ isc_sockaddr_format(isc_sockaddr_t *sa, char *array, unsigned int size);
*/
isc_boolean_t
-isc_sockaddr_ismulticast(isc_sockaddr_t *sa);
+isc_sockaddr_ismulticast(const isc_sockaddr_t *sa);
/*
* Returns ISC_TRUE if the address is a multicast address
*/
isc_boolean_t
-isc_sockaddr_isexperimental(isc_sockaddr_t *sa);
+isc_sockaddr_isexperimental(const isc_sockaddr_t *sa);
/*
* Returns ISC_TRUE if the address is a experimental (CLASS E) address.
*/
diff --git a/lib/isc/include/isc/symtab.h b/lib/isc/include/isc/symtab.h
index 55ff8b57ab..b65529093e 100644
--- a/lib/isc/include/isc/symtab.h
+++ b/lib/isc/include/isc/symtab.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: symtab.h,v 1.16.2.1 2004/03/09 06:12:02 marka Exp $ */
+/* $Id: symtab.h,v 1.16.2.2 2006/03/01 01:34:07 marka Exp $ */
#ifndef ISC_SYMTAB_H
#define ISC_SYMTAB_H 1
@@ -88,6 +88,7 @@
typedef union isc_symvalue {
void * as_pointer;
+ const void * as_cpointer;
int as_integer;
unsigned int as_uinteger;
} isc_symvalue_t;
diff --git a/lib/isc/sockaddr.c b/lib/isc/sockaddr.c
index 89562118f5..58b9fe6f17 100644
--- a/lib/isc/sockaddr.c
+++ b/lib/isc/sockaddr.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: sockaddr.c,v 1.48.2.5 2004/03/09 06:11:51 marka Exp $ */
+/* $Id: sockaddr.c,v 1.48.2.6 2006/03/01 01:34:07 marka Exp $ */
#include
@@ -155,7 +155,7 @@ isc_sockaddr_totext(const isc_sockaddr_t *sockaddr, isc_buffer_t *target) {
}
void
-isc_sockaddr_format(isc_sockaddr_t *sa, char *array, unsigned int size) {
+isc_sockaddr_format(const isc_sockaddr_t *sa, char *array, unsigned int size) {
isc_result_t result;
isc_buffer_t buf;
@@ -388,7 +388,7 @@ isc_sockaddr_setport(isc_sockaddr_t *sockaddr, in_port_t port) {
}
in_port_t
-isc_sockaddr_getport(isc_sockaddr_t *sockaddr) {
+isc_sockaddr_getport(const isc_sockaddr_t *sockaddr) {
in_port_t port = 0;
switch (sockaddr->type.sa.sa_family) {
@@ -410,7 +410,7 @@ isc_sockaddr_getport(isc_sockaddr_t *sockaddr) {
}
isc_boolean_t
-isc_sockaddr_ismulticast(isc_sockaddr_t *sockaddr) {
+isc_sockaddr_ismulticast(const isc_sockaddr_t *sockaddr) {
isc_netaddr_t netaddr;
isc_netaddr_fromsockaddr(&netaddr, sockaddr);
@@ -418,7 +418,7 @@ isc_sockaddr_ismulticast(isc_sockaddr_t *sockaddr) {
}
isc_boolean_t
-isc_sockaddr_isexperimental(isc_sockaddr_t *sockaddr) {
+isc_sockaddr_isexperimental(const isc_sockaddr_t *sockaddr) {
isc_netaddr_t netaddr;
if (sockaddr->type.sa.sa_family == AF_INET) {
diff --git a/lib/isccfg/check.c b/lib/isccfg/check.c
index a69a4fdb91..7f09f76245 100644
--- a/lib/isccfg/check.c
+++ b/lib/isccfg/check.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: check.c,v 1.14.2.26 2004/11/22 05:01:37 marka Exp $ */
+/* $Id: check.c,v 1.14.2.27 2006/03/01 01:34:07 marka Exp $ */
#include
@@ -45,9 +45,9 @@ freekey(char *key, unsigned int type, isc_symvalue_t value, void *userarg) {
}
static isc_result_t
-check_forward(cfg_obj_t *options, isc_log_t *logctx) {
- cfg_obj_t *forward = NULL;
- cfg_obj_t *forwarders = NULL;
+check_forward(const cfg_obj_t *options, isc_log_t *logctx) {
+ const cfg_obj_t *forward = NULL;
+ const cfg_obj_t *forwarders = NULL;
(void)cfg_map_get(options, "forward", &forward);
(void)cfg_map_get(options, "forwarders", &forwarders);
@@ -66,10 +66,10 @@ typedef struct {
} intervaltable;
static isc_result_t
-check_options(cfg_obj_t *options, isc_log_t *logctx) {
+check_options(const cfg_obj_t *options, isc_log_t *logctx) {
isc_result_t result = ISC_R_SUCCESS;
unsigned int i;
- cfg_obj_t *obj;
+ const cfg_obj_t *obj;
static intervaltable intervals[] = {
{ "cleaning-interval", 60 },
@@ -89,7 +89,7 @@ check_options(cfg_obj_t *options, isc_log_t *logctx) {
*/
for (i = 0; i < sizeof(intervals) / sizeof(intervals[0]); i++) {
isc_uint32_t val;
- cfg_obj_t *obj = NULL;
+ const cfg_obj_t *obj = NULL;
(void)cfg_map_get(options, intervals[i].name, &obj);
if (obj == NULL)
continue;
@@ -106,9 +106,9 @@ check_options(cfg_obj_t *options, isc_log_t *logctx) {
(void)cfg_map_get(options, "root-delegation-only", &obj);
if (obj != NULL) {
if (!cfg_obj_isvoid(obj)) {
- cfg_listelt_t *element;
- cfg_obj_t *exclude;
- char *str;
+ const cfg_listelt_t *element;
+ const cfg_obj_t *exclude;
+ const char *str;
dns_fixedname_t fixed;
dns_name_t *name;
isc_buffer_t b;
@@ -151,15 +151,15 @@ typedef struct {
} optionstable;
static isc_result_t
-check_zoneconf(cfg_obj_t *zconfig, isc_symtab_t *symtab, isc_log_t *logctx,
- isc_mem_t *mctx)
+check_zoneconf(const cfg_obj_t *zconfig, isc_symtab_t *symtab,
+ isc_log_t *logctx, isc_mem_t *mctx)
{
const char *zname;
const char *typestr;
unsigned int ztype;
- cfg_obj_t *zoptions;
- cfg_obj_t *obj = NULL;
- cfg_obj_t *addrlist = NULL;
+ const cfg_obj_t *zoptions;
+ const cfg_obj_t *obj = NULL;
+ const cfg_obj_t *addrlist = NULL;
isc_symvalue_t symvalue;
isc_result_t result = ISC_R_SUCCESS;
isc_result_t tresult;
@@ -349,10 +349,10 @@ check_zoneconf(cfg_obj_t *zconfig, isc_symtab_t *symtab, isc_log_t *logctx,
* Check the excessively complicated "dialup" option.
*/
if (ztype == MASTERZONE || ztype == SLAVEZONE || ztype == STUBZONE) {
- cfg_obj_t *dialup = NULL;
+ const cfg_obj_t *dialup = NULL;
cfg_map_get(zoptions, "dialup", &dialup);
if (dialup != NULL && cfg_obj_isstring(dialup)) {
- char *str = cfg_obj_asstring(dialup);
+ const char *str = cfg_obj_asstring(dialup);
for (i = 0;
i < sizeof(dialups) / sizeof(dialups[0]);
i++)
@@ -417,9 +417,9 @@ check_zoneconf(cfg_obj_t *zconfig, isc_symtab_t *symtab, isc_log_t *logctx,
}
isc_result_t
-cfg_check_key(cfg_obj_t *key, isc_log_t *logctx) {
- cfg_obj_t *algobj = NULL;
- cfg_obj_t *secretobj = NULL;
+cfg_check_key(const cfg_obj_t *key, isc_log_t *logctx) {
+ const cfg_obj_t *algobj = NULL;
+ const cfg_obj_t *secretobj = NULL;
const char *keyname = cfg_obj_asstring(cfg_map_getname(key));
cfg_map_get(key, "algorithm", &algobj);
@@ -435,16 +435,16 @@ cfg_check_key(cfg_obj_t *key, isc_log_t *logctx) {
}
static isc_result_t
-check_keylist(cfg_obj_t *keys, isc_symtab_t *symtab, isc_log_t *logctx) {
+check_keylist(const cfg_obj_t *keys, isc_symtab_t *symtab, isc_log_t *logctx) {
isc_result_t result = ISC_R_SUCCESS;
isc_result_t tresult;
- cfg_listelt_t *element;
+ const cfg_listelt_t *element;
for (element = cfg_list_first(keys);
element != NULL;
element = cfg_list_next(element))
{
- cfg_obj_t *key = cfg_listelt_value(element);
+ const cfg_obj_t *key = cfg_listelt_value(element);
const char *keyname = cfg_obj_asstring(cfg_map_getname(key));
isc_symvalue_t symvalue;
@@ -466,11 +466,11 @@ check_keylist(cfg_obj_t *keys, isc_symtab_t *symtab, isc_log_t *logctx) {
}
static isc_result_t
-check_servers(cfg_obj_t *servers, isc_log_t *logctx) {
+check_servers(const cfg_obj_t *servers, isc_log_t *logctx) {
isc_result_t result = ISC_R_SUCCESS;
- cfg_listelt_t *e1, *e2;
- cfg_obj_t *v1, *v2;
- isc_sockaddr_t *s1, *s2;
+ const cfg_listelt_t *e1, *e2;
+ const cfg_obj_t *v1, *v2;
+ const isc_sockaddr_t *s1, *s2;
isc_netaddr_t na;
for (e1 = cfg_list_first(servers); e1 != NULL; e1 = cfg_list_next(e1)) {
@@ -501,12 +501,13 @@ check_servers(cfg_obj_t *servers, isc_log_t *logctx) {
}
static isc_result_t
-check_viewconf(cfg_obj_t *config, cfg_obj_t *vconfig, isc_log_t *logctx, isc_mem_t *mctx)
+check_viewconf(const cfg_obj_t *config, const cfg_obj_t *vconfig,
+ isc_log_t *logctx, isc_mem_t *mctx)
{
- cfg_obj_t *servers = NULL;
- cfg_obj_t *zones = NULL;
- cfg_obj_t *keys = NULL;
- cfg_listelt_t *element;
+ const cfg_obj_t *servers = NULL;
+ const cfg_obj_t *zones = NULL;
+ const cfg_obj_t *keys = NULL;
+ const cfg_listelt_t *element;
isc_symtab_t *symtab = NULL;
isc_result_t result = ISC_R_SUCCESS;
isc_result_t tresult = ISC_R_SUCCESS;
@@ -529,7 +530,7 @@ check_viewconf(cfg_obj_t *config, cfg_obj_t *vconfig, isc_log_t *logctx, isc_mem
element != NULL;
element = cfg_list_next(element))
{
- cfg_obj_t *zone = cfg_listelt_value(element);
+ const cfg_obj_t *zone = cfg_listelt_value(element);
if (check_zoneconf(zone, symtab, logctx, mctx) != ISC_R_SUCCESS)
result = ISC_R_FAILURE;
@@ -572,7 +573,7 @@ check_viewconf(cfg_obj_t *config, cfg_obj_t *vconfig, isc_log_t *logctx, isc_mem
* Check that forwarding is reasonable.
*/
if (vconfig == NULL) {
- cfg_obj_t *options = NULL;
+ const cfg_obj_t *options = NULL;
cfg_map_get(config, "options", &options);
if (options != NULL)
if (check_forward(options, logctx) != ISC_R_SUCCESS)
@@ -602,13 +603,15 @@ check_viewconf(cfg_obj_t *config, cfg_obj_t *vconfig, isc_log_t *logctx, isc_mem
isc_result_t
-cfg_check_namedconf(cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx) {
- cfg_obj_t *options = NULL;
- cfg_obj_t *servers = NULL;
- cfg_obj_t *views = NULL;
- cfg_obj_t *acls = NULL;
- cfg_obj_t *obj;
- cfg_listelt_t *velement;
+cfg_check_namedconf(const cfg_obj_t *config, isc_log_t *logctx,
+ isc_mem_t *mctx)
+{
+ const cfg_obj_t *options = NULL;
+ const cfg_obj_t *servers = NULL;
+ const cfg_obj_t *views = NULL;
+ const cfg_obj_t *acls = NULL;
+ const cfg_obj_t *obj;
+ const cfg_listelt_t *velement;
isc_result_t result = ISC_R_SUCCESS;
isc_result_t tresult;
isc_symtab_t *symtab = NULL;
@@ -634,7 +637,7 @@ cfg_check_namedconf(cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx) {
!= ISC_R_SUCCESS)
result = ISC_R_FAILURE;
} else {
- cfg_obj_t *zones = NULL;
+ const cfg_obj_t *zones = NULL;
(void)cfg_map_get(config, "zone", &zones);
if (zones != NULL) {
@@ -652,10 +655,10 @@ cfg_check_namedconf(cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx) {
velement != NULL;
velement = cfg_list_next(velement))
{
- cfg_obj_t *view = cfg_listelt_value(velement);
- cfg_obj_t *vname = cfg_tuple_get(view, "name");
- cfg_obj_t *voptions = cfg_tuple_get(view, "options");
- cfg_obj_t *vclassobj = cfg_tuple_get(view, "class");
+ const cfg_obj_t *view = cfg_listelt_value(velement);
+ const cfg_obj_t *vname = cfg_tuple_get(view, "name");
+ const cfg_obj_t *voptions = cfg_tuple_get(view, "options");
+ const cfg_obj_t *vclassobj = cfg_tuple_get(view, "class");
dns_rdataclass_t vclass = dns_rdataclass_in;
isc_result_t tresult = ISC_R_SUCCESS;
const char *key = cfg_obj_asstring(vname);
@@ -673,7 +676,7 @@ cfg_check_namedconf(cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx) {
cfg_obj_asstring(vname), r.base);
}
if (tresult == ISC_R_SUCCESS && symtab != NULL) {
- symvalue.as_pointer = view;
+ symvalue.as_cpointer = view;
tresult = isc_symtab_define(symtab, key, vclass,
symvalue,
isc_symexists_reject);
@@ -713,14 +716,14 @@ cfg_check_namedconf(cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx) {
tresult = cfg_map_get(config, "acl", &acls);
if (tresult == ISC_R_SUCCESS) {
- cfg_listelt_t *elt;
- cfg_listelt_t *elt2;
+ const cfg_listelt_t *elt;
+ const cfg_listelt_t *elt2;
const char *aclname;
for (elt = cfg_list_first(acls);
elt != NULL;
elt = cfg_list_next(elt)) {
- cfg_obj_t *acl = cfg_listelt_value(elt);
+ const cfg_obj_t *acl = cfg_listelt_value(elt);
unsigned int i;
aclname = cfg_obj_asstring(cfg_tuple_get(acl, "name"));
@@ -739,7 +742,7 @@ cfg_check_namedconf(cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx) {
for (elt2 = cfg_list_next(elt);
elt2 != NULL;
elt2 = cfg_list_next(elt2)) {
- cfg_obj_t *acl2 = cfg_listelt_value(elt2);
+ const cfg_obj_t *acl2 = cfg_listelt_value(elt2);
const char *name;
name = cfg_obj_asstring(cfg_tuple_get(acl2,
"name"));
diff --git a/lib/isccfg/include/isccfg/cfg.h b/lib/isccfg/include/isccfg/cfg.h
index c7fa8cbafb..46c04c90b3 100644
--- a/lib/isccfg/include/isccfg/cfg.h
+++ b/lib/isccfg/include/isccfg/cfg.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: cfg.h,v 1.30.2.1 2004/03/09 06:12:31 marka Exp $ */
+/* $Id: cfg.h,v 1.30.2.2 2006/03/01 01:34:08 marka Exp $ */
#ifndef ISCCFG_CFG_H
#define ISCCFG_CFG_H 1
@@ -75,7 +75,7 @@ typedef struct cfg_listelt cfg_listelt_t;
* "directory".
*/
typedef isc_result_t
-(*cfg_parsecallback_t)(const char *clausename, cfg_obj_t *obj, void *arg);
+(*cfg_parsecallback_t)(const char *clausename, const cfg_obj_t *obj, void *arg);
/***
*** Functions
@@ -144,20 +144,20 @@ cfg_parser_destroy(cfg_parser_t **pctxp);
*/
isc_boolean_t
-cfg_obj_isvoid(cfg_obj_t *obj);
+cfg_obj_isvoid(const cfg_obj_t *obj);
/*
* Return true iff 'obj' is of void type (e.g., an optional
* value not specified).
*/
isc_boolean_t
-cfg_obj_ismap(cfg_obj_t *obj);
+cfg_obj_ismap(const cfg_obj_t *obj);
/*
* Return true iff 'obj' is of a map type.
*/
isc_result_t
-cfg_map_get(cfg_obj_t *mapobj, const char* name, cfg_obj_t **obj);
+cfg_map_get(const cfg_obj_t *mapobj, const char* name, const cfg_obj_t **obj);
/*
* Extract an element from a configuration object, which
* must be of a map type.
@@ -172,8 +172,8 @@ cfg_map_get(cfg_obj_t *mapobj, const char* name, cfg_obj_t **obj);
* ISC_R_NOTFOUND - name not found in map
*/
-cfg_obj_t *
-cfg_map_getname(cfg_obj_t *mapobj);
+const cfg_obj_t *
+cfg_map_getname(const cfg_obj_t *mapobj);
/*
* Get the name of a named map object, like a server "key" clause.
*
@@ -186,13 +186,13 @@ cfg_map_getname(cfg_obj_t *mapobj);
*/
isc_boolean_t
-cfg_obj_istuple(cfg_obj_t *obj);
+cfg_obj_istuple(const cfg_obj_t *obj);
/*
* Return true iff 'obj' is of a map type.
*/
-cfg_obj_t *
-cfg_tuple_get(cfg_obj_t *tupleobj, const char *name);
+const cfg_obj_t *
+cfg_tuple_get(const cfg_obj_t *tupleobj, const char *name);
/*
* Extract an element from a configuration object, which
* must be of a tuple type.
@@ -204,13 +204,13 @@ cfg_tuple_get(cfg_obj_t *tupleobj, const char *name);
*/
isc_boolean_t
-cfg_obj_isuint32(cfg_obj_t *obj);
+cfg_obj_isuint32(const cfg_obj_t *obj);
/*
* Return true iff 'obj' is of integer type.
*/
isc_uint32_t
-cfg_obj_asuint32(cfg_obj_t *obj);
+cfg_obj_asuint32(const cfg_obj_t *obj);
/*
* Returns the value of a configuration object of 32-bit integer type.
*
@@ -222,13 +222,13 @@ cfg_obj_asuint32(cfg_obj_t *obj);
*/
isc_boolean_t
-cfg_obj_isuint64(cfg_obj_t *obj);
+cfg_obj_isuint64(const cfg_obj_t *obj);
/*
* Return true iff 'obj' is of integer type.
*/
isc_uint64_t
-cfg_obj_asuint64(cfg_obj_t *obj);
+cfg_obj_asuint64(const cfg_obj_t *obj);
/*
* Returns the value of a configuration object of 64-bit integer type.
*
@@ -240,13 +240,13 @@ cfg_obj_asuint64(cfg_obj_t *obj);
*/
isc_boolean_t
-cfg_obj_isstring(cfg_obj_t *obj);
+cfg_obj_isstring(const cfg_obj_t *obj);
/*
* Return true iff 'obj' is of string type.
*/
-char *
-cfg_obj_asstring(cfg_obj_t *obj);
+const char *
+cfg_obj_asstring(const cfg_obj_t *obj);
/*
* Returns the value of a configuration object of a string type
* as a null-terminated string.
@@ -259,13 +259,13 @@ cfg_obj_asstring(cfg_obj_t *obj);
*/
isc_boolean_t
-cfg_obj_isboolean(cfg_obj_t *obj);
+cfg_obj_isboolean(const cfg_obj_t *obj);
/*
* Return true iff 'obj' is of a boolean type.
*/
isc_boolean_t
-cfg_obj_asboolean(cfg_obj_t *obj);
+cfg_obj_asboolean(const cfg_obj_t *obj);
/*
* Returns the value of a configuration object of a boolean type.
*
@@ -277,13 +277,13 @@ cfg_obj_asboolean(cfg_obj_t *obj);
*/
isc_boolean_t
-cfg_obj_issockaddr(cfg_obj_t *obj);
+cfg_obj_issockaddr(const cfg_obj_t *obj);
/*
* Return true iff 'obj' is a socket address.
*/
-isc_sockaddr_t *
-cfg_obj_assockaddr(cfg_obj_t *obj);
+const isc_sockaddr_t *
+cfg_obj_assockaddr(const cfg_obj_t *obj);
/*
* Returns the value of a configuration object representing a socket address.
*
@@ -296,13 +296,13 @@ cfg_obj_assockaddr(cfg_obj_t *obj);
*/
isc_boolean_t
-cfg_obj_isnetprefix(cfg_obj_t *obj);
+cfg_obj_isnetprefix(const cfg_obj_t *obj);
/*
* Return true iff 'obj' is a network prefix.
*/
void
-cfg_obj_asnetprefix(cfg_obj_t *obj, isc_netaddr_t *netaddr,
+cfg_obj_asnetprefix(const cfg_obj_t *obj, isc_netaddr_t *netaddr,
unsigned int *prefixlen);
/*
* Gets the value of a configuration object representing a network
@@ -315,13 +315,13 @@ cfg_obj_asnetprefix(cfg_obj_t *obj, isc_netaddr_t *netaddr,
*/
isc_boolean_t
-cfg_obj_islist(cfg_obj_t *obj);
+cfg_obj_islist(const cfg_obj_t *obj);
/*
* Return true iff 'obj' is of list type.
*/
-cfg_listelt_t *
-cfg_list_first(cfg_obj_t *obj);
+const cfg_listelt_t *
+cfg_list_first(const cfg_obj_t *obj);
/*
* Returns the first list element in a configuration object of a list type.
*
@@ -333,8 +333,8 @@ cfg_list_first(cfg_obj_t *obj);
* or NULL if the list is empty or nonexistent.
*/
-cfg_listelt_t *
-cfg_list_next(cfg_listelt_t *elt);
+const cfg_listelt_t *
+cfg_list_next(const cfg_listelt_t *elt);
/*
* Returns the next element of a list of configuration objects.
*
@@ -347,8 +347,8 @@ cfg_list_next(cfg_listelt_t *elt);
* or NULL if there are no more elements.
*/
-cfg_obj_t *
-cfg_listelt_value(cfg_listelt_t *elt);
+const cfg_obj_t *
+cfg_listelt_value(const cfg_listelt_t *elt);
/*
* Returns the configuration object associated with cfg_listelt_t.
*
@@ -361,7 +361,7 @@ cfg_listelt_value(cfg_listelt_t *elt);
*/
void
-cfg_print(cfg_obj_t *obj,
+cfg_print(const cfg_obj_t *obj,
void (*f)(void *closure, const char *text, int textlen),
void *closure);
/*
@@ -379,7 +379,7 @@ cfg_print_grammar(const cfg_type_t *type,
*/
isc_boolean_t
-cfg_obj_istype(cfg_obj_t *obj, const cfg_type_t *type);
+cfg_obj_istype(const cfg_obj_t *obj, const cfg_type_t *type);
/*
* Return true iff 'obj' is of type 'type'.
*/
@@ -390,7 +390,8 @@ void cfg_obj_destroy(cfg_parser_t *pctx, cfg_obj_t **obj);
*/
void
-cfg_obj_log(cfg_obj_t *obj, isc_log_t *lctx, int level, const char *fmt, ...)
+cfg_obj_log(const cfg_obj_t *obj, isc_log_t *lctx, int level,
+ const char *fmt, ...)
ISC_FORMAT_PRINTF(4, 5);
/*
* Log a message concerning configuration object 'obj' to the logging
diff --git a/lib/isccfg/include/isccfg/check.h b/lib/isccfg/include/isccfg/check.h
index b45e385a10..0c9811673c 100644
--- a/lib/isccfg/include/isccfg/check.h
+++ b/lib/isccfg/include/isccfg/check.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: check.h,v 1.4.2.1 2004/03/09 06:12:31 marka Exp $ */
+/* $Id: check.h,v 1.4.2.2 2006/03/01 01:34:08 marka Exp $ */
#ifndef ISCCFG_CHECK_H
#define ISCCFG_CHECK_H 1
@@ -28,7 +28,8 @@
ISC_LANG_BEGINDECLS
isc_result_t
-cfg_check_namedconf(cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx);
+cfg_check_namedconf(const cfg_obj_t *config, isc_log_t *logctx,
+ isc_mem_t *mctx);
/*
* Check the syntactic validity of a configuration parse tree generated from
* a named.conf file.
@@ -44,7 +45,7 @@ cfg_check_namedconf(cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx);
*/
isc_result_t
-cfg_check_key(cfg_obj_t *config, isc_log_t *logctx);
+cfg_check_key(const cfg_obj_t *config, isc_log_t *logctx);
/*
* As above, but for a single 'key' statement.
*/
diff --git a/lib/isccfg/parser.c b/lib/isccfg/parser.c
index 7d48910da4..32146a167f 100644
--- a/lib/isccfg/parser.c
+++ b/lib/isccfg/parser.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: parser.c,v 1.70.2.27 2006/01/04 23:50:17 marka Exp $ */
+/* $Id: parser.c,v 1.70.2.28 2006/03/01 01:34:07 marka Exp $ */
#include
@@ -101,7 +101,7 @@ typedef struct cfg_rep cfg_rep_t;
typedef isc_result_t (*cfg_parsefunc_t)(cfg_parser_t *, const cfg_type_t *type,
cfg_obj_t **);
-typedef void (*cfg_printfunc_t)(cfg_printer_t *, cfg_obj_t *);
+typedef void (*cfg_printfunc_t)(cfg_printer_t *, const cfg_obj_t *);
typedef void (*cfg_freefunc_t)(cfg_parser_t *, cfg_obj_t *);
@@ -290,7 +290,7 @@ static void
print(cfg_printer_t *pctx, const char *text, int len);
static void
-print_void(cfg_printer_t *pctx, cfg_obj_t *obj);
+print_void(cfg_printer_t *pctx, const cfg_obj_t *obj);
static isc_result_t
parse_enum_or_other(cfg_parser_t *pctx, const cfg_type_t *enumtype,
@@ -300,13 +300,13 @@ static isc_result_t
parse_mapbody(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret);
static void
-print_mapbody(cfg_printer_t *pctx, cfg_obj_t *obj);
+print_mapbody(cfg_printer_t *pctx, const cfg_obj_t *obj);
static isc_result_t
parse_map(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret);
static void
-print_map(cfg_printer_t *pctx, cfg_obj_t *obj);
+print_map(cfg_printer_t *pctx, const cfg_obj_t *obj);
static isc_result_t
parse_named_map(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret);
@@ -318,13 +318,13 @@ static isc_result_t
parse_list(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret);
static void
-print_list(cfg_printer_t *pctx, cfg_obj_t *obj);
+print_list(cfg_printer_t *pctx, const cfg_obj_t *obj);
static isc_result_t
parse_tuple(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret);
static void
-print_tuple(cfg_printer_t *pctx, cfg_obj_t *obj);
+print_tuple(cfg_printer_t *pctx, const cfg_obj_t *obj);
static void
free_tuple(cfg_parser_t *pctx, cfg_obj_t *obj);
@@ -333,10 +333,10 @@ static isc_result_t
parse_spacelist(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret);
static void
-print_spacelist(cfg_printer_t *pctx, cfg_obj_t *obj);
+print_spacelist(cfg_printer_t *pctx, const cfg_obj_t *obj);
static void
-print_sockaddr(cfg_printer_t *pctx, cfg_obj_t *obj);
+print_sockaddr(cfg_printer_t *pctx, const cfg_obj_t *obj);
static isc_result_t
parse_addrmatchelt(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret);
@@ -345,7 +345,7 @@ static isc_result_t
parse_bracketed_list(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret);
static void
-print_bracketed_list(cfg_printer_t *pctx, cfg_obj_t *obj);
+print_bracketed_list(cfg_printer_t *pctx, const cfg_obj_t *obj);
static isc_result_t
parse_keyvalue(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret);
@@ -354,7 +354,7 @@ static isc_result_t
parse_optional_keyvalue(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret);
static void
-print_keyvalue(cfg_printer_t *pctx, cfg_obj_t *obj);
+print_keyvalue(cfg_printer_t *pctx, const cfg_obj_t *obj);
static isc_result_t
parse_symtab_elt(cfg_parser_t *pctx, const char *name,
@@ -389,10 +389,10 @@ parser_complain(cfg_parser_t *pctx, isc_boolean_t is_warning,
unsigned int flags, const char *format, va_list args);
static void
-print_uint32(cfg_printer_t *pctx, cfg_obj_t *obj);
+print_uint32(cfg_printer_t *pctx, const cfg_obj_t *obj);
static void
-print_ustring(cfg_printer_t *pctx, cfg_obj_t *obj);
+print_ustring(cfg_printer_t *pctx, const cfg_obj_t *obj);
static isc_result_t
parse_enum(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret);
@@ -1132,7 +1132,7 @@ static cfg_type_t cfg_type_logging = {
/* Functions. */
static void
-print_obj(cfg_printer_t *pctx, cfg_obj_t *obj) {
+print_obj(cfg_printer_t *pctx, const cfg_obj_t *obj) {
obj->type->print(pctx, obj);
}
@@ -1175,7 +1175,7 @@ parse(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
}
void
-cfg_print(cfg_obj_t *obj,
+cfg_print(const cfg_obj_t *obj,
void (*f)(void *closure, const char *text, int textlen),
void *closure)
{
@@ -1241,7 +1241,7 @@ parse_tuple(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret)
}
static void
-print_tuple(cfg_printer_t *pctx, cfg_obj_t *obj) {
+print_tuple(cfg_printer_t *pctx, const cfg_obj_t *obj) {
unsigned int i;
const cfg_tuplefielddef_t *fields = obj->type->of;
const cfg_tuplefielddef_t *f;
@@ -1275,13 +1275,13 @@ free_tuple(cfg_parser_t *pctx, cfg_obj_t *obj) {
}
isc_boolean_t
-cfg_obj_istuple(cfg_obj_t *obj) {
+cfg_obj_istuple(const cfg_obj_t *obj) {
REQUIRE(obj != NULL);
return (ISC_TF(obj->type->rep == &cfg_rep_tuple));
}
-cfg_obj_t *
-cfg_tuple_get(cfg_obj_t *tupleobj, const char* name) {
+const cfg_obj_t *
+cfg_tuple_get(const cfg_obj_t *tupleobj, const char* name) {
unsigned int i;
const cfg_tuplefielddef_t *fields;
const cfg_tuplefielddef_t *f;
@@ -1536,13 +1536,13 @@ parse_void(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
}
static void
-print_void(cfg_printer_t *pctx, cfg_obj_t *obj) {
+print_void(cfg_printer_t *pctx, const cfg_obj_t *obj) {
UNUSED(pctx);
UNUSED(obj);
}
isc_boolean_t
-cfg_obj_isvoid(cfg_obj_t *obj) {
+cfg_obj_isvoid(const cfg_obj_t *obj) {
REQUIRE(obj != NULL);
return (ISC_TF(obj->type->rep == &cfg_rep_void));
}
@@ -1587,18 +1587,18 @@ print_uint(cfg_printer_t *pctx, unsigned int u) {
}
static void
-print_uint32(cfg_printer_t *pctx, cfg_obj_t *obj) {
+print_uint32(cfg_printer_t *pctx, const cfg_obj_t *obj) {
print_uint(pctx, obj->value.uint32);
}
isc_boolean_t
-cfg_obj_isuint32(cfg_obj_t *obj) {
+cfg_obj_isuint32(const cfg_obj_t *obj) {
REQUIRE(obj != NULL);
return (ISC_TF(obj->type->rep == &cfg_rep_uint32));
}
isc_uint32_t
-cfg_obj_asuint32(cfg_obj_t *obj) {
+cfg_obj_asuint32(const cfg_obj_t *obj) {
REQUIRE(obj != NULL && obj->type->rep == &cfg_rep_uint32);
return (obj->value.uint32);
}
@@ -1611,13 +1611,13 @@ static cfg_type_t cfg_type_uint32 = {
* uint64
*/
isc_boolean_t
-cfg_obj_isuint64(cfg_obj_t *obj) {
+cfg_obj_isuint64(const cfg_obj_t *obj) {
REQUIRE(obj != NULL);
return (ISC_TF(obj->type->rep == &cfg_rep_uint64));
}
isc_uint64_t
-cfg_obj_asuint64(cfg_obj_t *obj) {
+cfg_obj_asuint64(const cfg_obj_t *obj) {
REQUIRE(obj != NULL && obj->type->rep == &cfg_rep_uint64);
return (obj->value.uint64);
}
@@ -1662,7 +1662,7 @@ parse_unitstring(char *str, isc_resourcevalue_t *valuep) {
}
static void
-print_uint64(cfg_printer_t *pctx, cfg_obj_t *obj) {
+print_uint64(cfg_printer_t *pctx, const cfg_obj_t *obj) {
char buf[32];
sprintf(buf, "%" ISC_PRINT_QUADFORMAT "u", obj->value.uint64);
print_cstr(pctx, buf);
@@ -1768,7 +1768,7 @@ parse_optional_keyvalue(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **
}
static void
-print_keyvalue(cfg_printer_t *pctx, cfg_obj_t *obj) {
+print_keyvalue(cfg_printer_t *pctx, const cfg_obj_t *obj) {
const keyword_type_t *kw = obj->type->of;
print_cstr(pctx, kw->name);
print(pctx, " ", 1);
@@ -1907,12 +1907,12 @@ parse_enum_or_other(cfg_parser_t *pctx, const cfg_type_t *enumtype,
* Print a string object.
*/
static void
-print_ustring(cfg_printer_t *pctx, cfg_obj_t *obj) {
+print_ustring(cfg_printer_t *pctx, const cfg_obj_t *obj) {
print(pctx, obj->value.string.base, obj->value.string.length);
}
static void
-print_qstring(cfg_printer_t *pctx, cfg_obj_t *obj) {
+print_qstring(cfg_printer_t *pctx, const cfg_obj_t *obj) {
print(pctx, "\"", 1);
print_ustring(pctx, obj);
print(pctx, "\"", 1);
@@ -1925,25 +1925,25 @@ free_string(cfg_parser_t *pctx, cfg_obj_t *obj) {
}
isc_boolean_t
-cfg_obj_isstring(cfg_obj_t *obj) {
+cfg_obj_isstring(const cfg_obj_t *obj) {
REQUIRE(obj != NULL);
return (ISC_TF(obj->type->rep == &cfg_rep_string));
}
-char *
-cfg_obj_asstring(cfg_obj_t *obj) {
+const char *
+cfg_obj_asstring(const cfg_obj_t *obj) {
REQUIRE(obj != NULL && obj->type->rep == &cfg_rep_string);
return (obj->value.string.base);
}
isc_boolean_t
-cfg_obj_isboolean(cfg_obj_t *obj) {
+cfg_obj_isboolean(const cfg_obj_t *obj) {
REQUIRE(obj != NULL);
return (ISC_TF(obj->type->rep == &cfg_rep_boolean));
}
isc_boolean_t
-cfg_obj_asboolean(cfg_obj_t *obj) {
+cfg_obj_asboolean(const cfg_obj_t *obj) {
REQUIRE(obj != NULL && obj->type->rep == &cfg_rep_boolean);
return (obj->value.boolean);
}
@@ -2005,7 +2005,7 @@ parse_boolean(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret)
}
static void
-print_boolean(cfg_printer_t *pctx, cfg_obj_t *obj) {
+print_boolean(cfg_printer_t *pctx, const cfg_obj_t *obj) {
if (obj->value.boolean)
print(pctx, "yes", 3);
else
@@ -2151,9 +2151,9 @@ parse_list(cfg_parser_t *pctx, const cfg_type_t *listtype, cfg_obj_t **ret)
}
static void
-print_list(cfg_printer_t *pctx, cfg_obj_t *obj) {
- cfg_list_t *list = &obj->value.list;
- cfg_listelt_t *elt;
+print_list(cfg_printer_t *pctx, const cfg_obj_t *obj) {
+ const cfg_list_t *list = &obj->value.list;
+ const cfg_listelt_t *elt;
for (elt = ISC_LIST_HEAD(*list);
elt != NULL;
@@ -2176,7 +2176,7 @@ parse_bracketed_list(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret
}
static void
-print_bracketed_list(cfg_printer_t *pctx, cfg_obj_t *obj) {
+print_bracketed_list(cfg_printer_t *pctx, const cfg_obj_t *obj) {
print_open(pctx);
print_list(pctx, obj);
print_close(pctx);
@@ -2215,9 +2215,9 @@ parse_spacelist(cfg_parser_t *pctx, const cfg_type_t *listtype, cfg_obj_t **ret)
}
static void
-print_spacelist(cfg_printer_t *pctx, cfg_obj_t *obj) {
- cfg_list_t *list = &obj->value.list;
- cfg_listelt_t *elt;
+print_spacelist(cfg_printer_t *pctx, const cfg_obj_t *obj) {
+ const cfg_list_t *list = &obj->value.list;
+ const cfg_listelt_t *elt;
for (elt = ISC_LIST_HEAD(*list);
elt != NULL;
@@ -2229,27 +2229,27 @@ print_spacelist(cfg_printer_t *pctx, cfg_obj_t *obj) {
}
isc_boolean_t
-cfg_obj_islist(cfg_obj_t *obj) {
+cfg_obj_islist(const cfg_obj_t *obj) {
REQUIRE(obj != NULL);
return (ISC_TF(obj->type->rep == &cfg_rep_list));
}
-cfg_listelt_t *
-cfg_list_first(cfg_obj_t *obj) {
+const cfg_listelt_t *
+cfg_list_first(const cfg_obj_t *obj) {
REQUIRE(obj == NULL || obj->type->rep == &cfg_rep_list);
if (obj == NULL)
return (NULL);
return (ISC_LIST_HEAD(obj->value.list));
}
-cfg_listelt_t *
-cfg_list_next(cfg_listelt_t *elt) {
+const cfg_listelt_t *
+cfg_list_next(const cfg_listelt_t *elt) {
REQUIRE(elt != NULL);
return (ISC_LIST_NEXT(elt, link));
}
-cfg_obj_t *
-cfg_listelt_value(cfg_listelt_t *elt) {
+const cfg_obj_t *
+cfg_listelt_value(const cfg_listelt_t *elt) {
REQUIRE(elt != NULL);
return (elt->obj);
}
@@ -2509,7 +2509,7 @@ parse_addressed_map(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret)
}
static void
-print_mapbody(cfg_printer_t *pctx, cfg_obj_t *obj) {
+print_mapbody(cfg_printer_t *pctx, const cfg_obj_t *obj) {
isc_result_t result = ISC_R_SUCCESS;
const cfg_clausedef_t * const *clauseset;
@@ -2559,7 +2559,7 @@ print_mapbody(cfg_printer_t *pctx, cfg_obj_t *obj) {
}
static void
-print_map(cfg_printer_t *pctx, cfg_obj_t *obj) {
+print_map(cfg_printer_t *pctx, const cfg_obj_t *obj) {
if (obj->value.map.id != NULL) {
print_obj(pctx, obj->value.map.id);
print(pctx, " ", 1);
@@ -2570,16 +2570,16 @@ print_map(cfg_printer_t *pctx, cfg_obj_t *obj) {
}
isc_boolean_t
-cfg_obj_ismap(cfg_obj_t *obj) {
+cfg_obj_ismap(const cfg_obj_t *obj) {
REQUIRE(obj != NULL);
return (ISC_TF(obj->type->rep == &cfg_rep_map));
}
isc_result_t
-cfg_map_get(cfg_obj_t *mapobj, const char* name, cfg_obj_t **obj) {
+cfg_map_get(const cfg_obj_t *mapobj, const char* name, const cfg_obj_t **obj) {
isc_result_t result;
isc_symvalue_t val;
- cfg_map_t *map;
+ const cfg_map_t *map;
REQUIRE(mapobj != NULL && mapobj->type->rep == &cfg_rep_map);
REQUIRE(name != NULL);
@@ -2594,8 +2594,8 @@ cfg_map_get(cfg_obj_t *mapobj, const char* name, cfg_obj_t **obj) {
return (ISC_R_SUCCESS);
}
-cfg_obj_t *
-cfg_map_getname(cfg_obj_t *mapobj) {
+const cfg_obj_t *
+cfg_map_getname(const cfg_obj_t *mapobj) {
REQUIRE(mapobj != NULL && mapobj->type->rep == &cfg_rep_map);
return (mapobj->value.map.id);
}
@@ -2936,7 +2936,7 @@ parse_querysource6(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret)
}
static void
-print_isc_netaddr(cfg_printer_t *pctx, isc_netaddr_t *na) {
+print_isc_netaddr(cfg_printer_t *pctx, const isc_netaddr_t *na) {
isc_result_t result;
char text[128];
isc_buffer_t buf;
@@ -2948,7 +2948,7 @@ print_isc_netaddr(cfg_printer_t *pctx, isc_netaddr_t *na) {
}
static void
-print_querysource(cfg_printer_t *pctx, cfg_obj_t *obj) {
+print_querysource(cfg_printer_t *pctx, const cfg_obj_t *obj) {
isc_netaddr_t na;
isc_netaddr_fromsockaddr(&na, &obj->value.sockaddr);
print(pctx, "address ", 8);
@@ -3038,21 +3038,21 @@ parse_netprefix(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
}
static void
-print_netprefix(cfg_printer_t *pctx, cfg_obj_t *obj) {
- cfg_netprefix_t *p = &obj->value.netprefix;
+print_netprefix(cfg_printer_t *pctx, const cfg_obj_t *obj) {
+ const cfg_netprefix_t *p = &obj->value.netprefix;
print_isc_netaddr(pctx, &p->address);
print(pctx, "/", 1);
print_uint(pctx, p->prefixlen);
}
isc_boolean_t
-cfg_obj_isnetprefix(cfg_obj_t *obj) {
+cfg_obj_isnetprefix(const cfg_obj_t *obj) {
REQUIRE(obj != NULL);
return (ISC_TF(obj->type->rep == &cfg_rep_netprefix));
}
void
-cfg_obj_asnetprefix(cfg_obj_t *obj, isc_netaddr_t *netaddr,
+cfg_obj_asnetprefix(const cfg_obj_t *obj, isc_netaddr_t *netaddr,
unsigned int *prefixlen) {
REQUIRE(obj != NULL && obj->type->rep == &cfg_rep_netprefix);
*netaddr = obj->value.netprefix.address;
@@ -3115,7 +3115,7 @@ static cfg_tuplefielddef_t negated_fields[] = {
};
static void
-print_negated(cfg_printer_t *pctx, cfg_obj_t *obj) {
+print_negated(cfg_printer_t *pctx, const cfg_obj_t *obj) {
print(pctx, "!", 1);
print_tuple(pctx, obj);
}
@@ -3167,7 +3167,7 @@ parse_sockaddr(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
}
static void
-print_sockaddr(cfg_printer_t *pctx, cfg_obj_t *obj) {
+print_sockaddr(cfg_printer_t *pctx, const cfg_obj_t *obj) {
isc_netaddr_t netaddr;
in_port_t port;
char buf[ISC_NETADDR_FORMATSIZE];
@@ -3183,13 +3183,13 @@ print_sockaddr(cfg_printer_t *pctx, cfg_obj_t *obj) {
}
isc_boolean_t
-cfg_obj_issockaddr(cfg_obj_t *obj) {
+cfg_obj_issockaddr(const cfg_obj_t *obj) {
REQUIRE(obj != NULL);
return (ISC_TF(obj->type->rep == &cfg_rep_sockaddr));
}
-isc_sockaddr_t *
-cfg_obj_assockaddr(cfg_obj_t *obj) {
+const isc_sockaddr_t *
+cfg_obj_assockaddr(const cfg_obj_t *obj) {
REQUIRE(obj != NULL && obj->type->rep == &cfg_rep_sockaddr);
return (&obj->value.sockaddr);
}
@@ -3400,7 +3400,7 @@ parse_logfile(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
}
static void
-print_logfile(cfg_printer_t *pctx, cfg_obj_t *obj) {
+print_logfile(cfg_printer_t *pctx, const cfg_obj_t *obj) {
print_obj(pctx, obj->value.tuple[0]); /* file */
if (obj->value.tuple[1]->type->print != print_void) {
print(pctx, " versions ", 10);
@@ -3720,7 +3720,8 @@ parser_complain(cfg_parser_t *pctx, isc_boolean_t is_warning,
}
void
-cfg_obj_log(cfg_obj_t *obj, isc_log_t *lctx, int level, const char *fmt, ...) {
+cfg_obj_log(const cfg_obj_t *obj, isc_log_t *lctx, int level,
+ const char *fmt, ...) {
va_list ap;
char msgbuf[2048];
@@ -3794,7 +3795,7 @@ free_map(cfg_parser_t *pctx, cfg_obj_t *obj) {
}
isc_boolean_t
-cfg_obj_istype(cfg_obj_t *obj, const cfg_type_t *type) {
+cfg_obj_istype(const cfg_obj_t *obj, const cfg_type_t *type) {
return (ISC_TF(obj->type == type));
}
From 2c4ae1d331c98beba03a337a58e9b44aec98d663 Mon Sep 17 00:00:00 2001
From: Mark Andrews
Date: Wed, 1 Mar 2006 02:05:11 +0000
Subject: [PATCH 065/465] 1992. [bug] Not all incoming zone tranfer
messages included the view. [RT #15825]
---
CHANGES | 3 +++
lib/dns/xfrin.c | 46 ++++++++++++++++++++++++----------------------
2 files changed, 27 insertions(+), 22 deletions(-)
diff --git a/CHANGES b/CHANGES
index 0d7d8fd621..1493f2ae15 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+1992. [bug] Not all incoming zone tranfer messages included the
+ view. [RT #15825]
+
1991. [cleanup] The configuration data, once read, should be treated
as readonly. Expand the use of const to enforce this
at compile time. [RT #15813]
diff --git a/lib/dns/xfrin.c b/lib/dns/xfrin.c
index e0595558f1..2b640eedc7 100644
--- a/lib/dns/xfrin.c
+++ b/lib/dns/xfrin.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: xfrin.c,v 1.145 2006/01/04 23:50:24 marka Exp $ */
+/* $Id: xfrin.c,v 1.146 2006/03/01 02:05:11 marka Exp $ */
/*! \file */
@@ -224,14 +224,14 @@ static isc_result_t
render(dns_message_t *msg, isc_mem_t *mctx, isc_buffer_t *buf);
static void
-xfrin_logv(int level, dns_name_t *zonename, dns_rdataclass_t rdclass,
- isc_sockaddr_t *masteraddr, const char *fmt, va_list ap)
- ISC_FORMAT_PRINTF(5, 0);
+xfrin_logv(int level, const char *zonetext, isc_sockaddr_t *masteraddr,
+ const char *fmt, va_list ap)
+ ISC_FORMAT_PRINTF(4, 0);
static void
-xfrin_log1(int level, dns_name_t *zonename, dns_rdataclass_t rdclass,
- isc_sockaddr_t *masteraddr, const char *fmt, ...)
- ISC_FORMAT_PRINTF(5, 6);
+xfrin_log1(int level, const char *zonetext, isc_sockaddr_t *masteraddr,
+ const char *fmt, ...)
+ ISC_FORMAT_PRINTF(4, 5);
static void
xfrin_log(dns_xfrin_ctx_t *xfr, int level, const char *fmt, ...)
@@ -604,9 +604,12 @@ dns_xfrin_create2(dns_zone_t *zone, dns_rdatatype_t xfrtype,
failure:
if (db != NULL)
dns_db_detach(&db);
- if (result != ISC_R_SUCCESS)
- xfrin_log1(ISC_LOG_ERROR, zonename, dns_zone_getclass(zone),
- masteraddr, "zone transfer setup failed");
+ if (result != ISC_R_SUCCESS) {
+ char zonetext[DNS_NAME_MAXTEXT+32];
+ dns_zone_name(zone, zonetext, sizeof(zonetext));
+ xfrin_log1(ISC_LOG_ERROR, zonetext, masteraddr,
+ "zone transfer setup failed");
+ }
return (result);
}
@@ -1364,23 +1367,19 @@ maybe_free(dns_xfrin_ctx_t *xfr) {
* transfer of from :
*/
static void
-xfrin_logv(int level, dns_name_t *zonename, dns_rdataclass_t rdclass,
- isc_sockaddr_t *masteraddr, const char *fmt, va_list ap)
+xfrin_logv(int level, const char *zonetext, isc_sockaddr_t *masteraddr,
+ const char *fmt, va_list ap)
{
- char zntext[DNS_NAME_FORMATSIZE];
char mastertext[ISC_SOCKADDR_FORMATSIZE];
- char classtext[DNS_RDATACLASS_FORMATSIZE];
char msgtext[2048];
- dns_name_format(zonename, zntext, sizeof(zntext));
- dns_rdataclass_format(rdclass, classtext, sizeof(classtext));
isc_sockaddr_format(masteraddr, mastertext, sizeof(mastertext));
vsnprintf(msgtext, sizeof(msgtext), fmt, ap);
isc_log_write(dns_lctx, DNS_LOGCATEGORY_XFER_IN,
DNS_LOGMODULE_XFER_IN, level,
- "transfer of '%s/%s' from %s: %s",
- zntext, classtext, mastertext, msgtext);
+ "transfer of '%s' from %s: %s",
+ zonetext, mastertext, msgtext);
}
/*
@@ -1388,8 +1387,8 @@ xfrin_logv(int level, dns_name_t *zonename, dns_rdataclass_t rdclass,
*/
static void
-xfrin_log1(int level, dns_name_t *zonename, dns_rdataclass_t rdclass,
- isc_sockaddr_t *masteraddr, const char *fmt, ...)
+xfrin_log1(int level, const char *zonetext, isc_sockaddr_t *masteraddr,
+ const char *fmt, ...)
{
va_list ap;
@@ -1397,7 +1396,7 @@ xfrin_log1(int level, dns_name_t *zonename, dns_rdataclass_t rdclass,
return;
va_start(ap, fmt);
- xfrin_logv(level, zonename, rdclass, masteraddr, fmt, ap);
+ xfrin_logv(level, zonetext, masteraddr, fmt, ap);
va_end(ap);
}
@@ -1409,11 +1408,14 @@ static void
xfrin_log(dns_xfrin_ctx_t *xfr, int level, const char *fmt, ...)
{
va_list ap;
+ char zonetext[DNS_NAME_MAXTEXT+32];
if (isc_log_wouldlog(dns_lctx, level) == ISC_FALSE)
return;
+ dns_zone_name(xfr->zone, zonetext, sizeof(zonetext));
+
va_start(ap, fmt);
- xfrin_logv(level, &xfr->name, xfr->rdclass, &xfr->masteraddr, fmt, ap);
+ xfrin_logv(level, zonetext, &xfr->masteraddr, fmt, ap);
va_end(ap);
}
From 5581e28ed8c05350ce6119230c223da60dafdbaf Mon Sep 17 00:00:00 2001
From: Mark Andrews
Date: Wed, 1 Mar 2006 02:09:46 +0000
Subject: [PATCH 066/465] spelling
---
CHANGES | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CHANGES b/CHANGES
index 1493f2ae15..ac6c13eb23 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,4 @@
-1992. [bug] Not all incoming zone tranfer messages included the
+1992. [bug] Not all incoming zone transfer messages included the
view. [RT #15825]
1991. [cleanup] The configuration data, once read, should be treated
From 7042126e8a10315255144989f7723f0510558928 Mon Sep 17 00:00:00 2001
From: Mark Andrews
Date: Wed, 1 Mar 2006 02:20:41 +0000
Subject: [PATCH 067/465] 1993. [bug] Log messsage, via syslog,
were missing the space after the timestamp if
"print-time yes" was specified. [RT #15844]
---
CHANGES | 4 ++++
lib/isc/log.c | 5 +++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/CHANGES b/CHANGES
index ac6c13eb23..530b30c160 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,7 @@
+1993. [bug] Log messsage, via syslog, were missing the space
+ after the timestamp if "print-time yes" was specified.
+ [RT #15844]
+
1992. [bug] Not all incoming zone transfer messages included the
view. [RT #15825]
diff --git a/lib/isc/log.c b/lib/isc/log.c
index 998156aeb0..dbbb43a70d 100644
--- a/lib/isc/log.c
+++ b/lib/isc/log.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: log.c,v 1.90 2005/07/12 01:00:17 marka Exp $ */
+/* $Id: log.c,v 1.91 2006/03/01 02:20:41 marka Exp $ */
/*! \file
* \author Principal Authors: DCL */
@@ -1735,8 +1735,9 @@ isc_log_doit(isc_log_t *lctx, isc_logcategory_t *category,
syslog_level = syslog_map[-level];
(void)syslog(FACILITY(channel) | syslog_level,
- "%s%s%s%s%s%s%s%s%s",
+ "%s%s%s%s%s%s%s%s%s%s",
printtime ? time_string : "",
+ printtime ? " " : "",
printtag ? lcfg->tag : "",
printtag ? ": " : "",
printcategory ? category->name : "",
From 25c18fded02c5df8391a333e90ea776b52bff079 Mon Sep 17 00:00:00 2001
From: Mark Andrews
Date: Wed, 1 Mar 2006 02:32:46 +0000
Subject: [PATCH 068/465] 1994. [port] OpenSSL 0.9.8 support. [RT
#15694]
---
CHANGES | 2 +
config.h.in | 11 +-
configure | 354 ++++++++++++++++++++++++++++++++++----
configure.in | 11 +-
lib/dns/openssldh_link.c | 75 +++++++-
lib/dns/openssldsa_link.c | 79 ++++++++-
lib/dns/opensslrsa_link.c | 96 ++++++++++-
7 files changed, 593 insertions(+), 35 deletions(-)
diff --git a/CHANGES b/CHANGES
index 530b30c160..8410931f7c 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,5 @@
+1994. [port] OpenSSL 0.9.8 support. [RT #15694]
+
1993. [bug] Log messsage, via syslog, were missing the space
after the timestamp if "print-time yes" was specified.
[RT #15844]
diff --git a/config.h.in b/config.h.in
index 2f304c2b64..fdfa9cd329 100644
--- a/config.h.in
+++ b/config.h.in
@@ -16,7 +16,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: config.h.in,v 1.78 2006/02/02 23:07:53 marka Exp $ */
+/* $Id: config.h.in,v 1.79 2006/03/01 02:32:46 marka Exp $ */
/*! \file */
@@ -157,9 +157,15 @@ int sigwait(const unsigned int *set, int *sig);
/* Define if you cannot bind() before connect() for TCP sockets. */
#undef BROKEN_TCP_BIND_BEFORE_CONNECT
+/* Define if libcrypto has DH_generate_parameters */
+#undef HAVE_DH_GENERATE_PARAMETERS
+
/* Define to 1 if you have the header file. */
#undef HAVE_DLFCN_H
+/* Define if libcrypto has DSA_generate_parameters */
+#undef HAVE_DSA_GENERATE_PARAMETERS
+
/* Define to 1 if you have the header file. */
#undef HAVE_FCNTL_H
@@ -196,6 +202,9 @@ int sigwait(const unsigned int *set, int *sig);
/* Define to 1 if you have the header file. */
#undef HAVE_NET_IF6_H
+/* Define if libcrypto has RSA_generate_key */
+#undef HAVE_RSA_GENERATE_KEY
+
/* Define to 1 if you have the `setlocale' function. */
#undef HAVE_SETLOCALE
diff --git a/configure b/configure
index ea0f9938df..925f6ba06e 100755
--- a/configure
+++ b/configure
@@ -14,7 +14,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
#
-# $Id: configure,v 1.390 2006/02/26 22:57:17 marka Exp $
+# $Id: configure,v 1.391 2006/03/01 02:32:46 marka Exp $
#
# Portions Copyright (C) 1996-2001 Nominum, Inc.
#
@@ -29,7 +29,7 @@
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-# From configure.in Revision: 1.402 .
+# From configure.in Revision: 1.403 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.59.
#
@@ -5089,6 +5089,300 @@ fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
+ echo "$as_me:$LINENO: checking for DH_generate_parameters" >&5
+echo $ECHO_N "checking for DH_generate_parameters... $ECHO_C" >&6
+if test "${ac_cv_func_DH_generate_parameters+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define DH_generate_parameters to an innocuous variant, in case declares DH_generate_parameters.
+ For example, HP-UX 11i declares gettimeofday. */
+#define DH_generate_parameters innocuous_DH_generate_parameters
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char DH_generate_parameters (); below.
+ Prefer to if __STDC__ is defined, since
+ exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include
+#else
+# include
+#endif
+
+#undef DH_generate_parameters
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char DH_generate_parameters ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_DH_generate_parameters) || defined (__stub___DH_generate_parameters)
+choke me
+#else
+char (*f) () = DH_generate_parameters;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != DH_generate_parameters;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_DH_generate_parameters=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_DH_generate_parameters=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_DH_generate_parameters" >&5
+echo "${ECHO_T}$ac_cv_func_DH_generate_parameters" >&6
+if test $ac_cv_func_DH_generate_parameters = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DH_GENERATE_PARAMETERS 1
+_ACEOF
+
+fi
+
+ echo "$as_me:$LINENO: checking for RSA_generate_key" >&5
+echo $ECHO_N "checking for RSA_generate_key... $ECHO_C" >&6
+if test "${ac_cv_func_RSA_generate_key+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define RSA_generate_key to an innocuous variant, in case declares RSA_generate_key.
+ For example, HP-UX 11i declares gettimeofday. */
+#define RSA_generate_key innocuous_RSA_generate_key
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char RSA_generate_key (); below.
+ Prefer to if __STDC__ is defined, since
+ exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include
+#else
+# include
+#endif
+
+#undef RSA_generate_key
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char RSA_generate_key ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_RSA_generate_key) || defined (__stub___RSA_generate_key)
+choke me
+#else
+char (*f) () = RSA_generate_key;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != RSA_generate_key;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_RSA_generate_key=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_RSA_generate_key=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_RSA_generate_key" >&5
+echo "${ECHO_T}$ac_cv_func_RSA_generate_key" >&6
+if test $ac_cv_func_RSA_generate_key = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_RSA_GENERATE_KEY 1
+_ACEOF
+
+fi
+
+ echo "$as_me:$LINENO: checking for DSA_generate_parameters" >&5
+echo $ECHO_N "checking for DSA_generate_parameters... $ECHO_C" >&6
+if test "${ac_cv_func_DSA_generate_parameters+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define DSA_generate_parameters to an innocuous variant, in case declares DSA_generate_parameters.
+ For example, HP-UX 11i declares gettimeofday. */
+#define DSA_generate_parameters innocuous_DSA_generate_parameters
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char DSA_generate_parameters (); below.
+ Prefer to if __STDC__ is defined, since
+ exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include
+#else
+# include
+#endif
+
+#undef DSA_generate_parameters
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char DSA_generate_parameters ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_DSA_generate_parameters) || defined (__stub___DSA_generate_parameters)
+choke me
+#else
+char (*f) () = DSA_generate_parameters;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != DSA_generate_parameters;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_DSA_generate_parameters=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_DSA_generate_parameters=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_DSA_generate_parameters" >&5
+echo "${ECHO_T}$ac_cv_func_DSA_generate_parameters" >&6
+if test $ac_cv_func_DSA_generate_parameters = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DSA_GENERATE_PARAMETERS 1
+_ACEOF
+
+fi
+
#
# OpenSSLDie is new with CERT CS-2002-23. If we see it we have may
# have a patched library otherwise check that we are greater than
@@ -8171,7 +8465,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 8174 "configure"' > conftest.$ac_ext
+ echo '#line 8468 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -9168,7 +9462,7 @@ fi
# Provide some information about the compiler.
-echo "$as_me:9171:" \
+echo "$as_me:9465:" \
"checking for Fortran 77 compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5
@@ -10229,11 +10523,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:10232: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:10526: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:10236: \$? = $ac_status" >&5
+ echo "$as_me:10530: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@@ -10472,11 +10766,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:10475: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:10769: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:10479: \$? = $ac_status" >&5
+ echo "$as_me:10773: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@@ -10532,11 +10826,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:10535: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:10829: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:10539: \$? = $ac_status" >&5
+ echo "$as_me:10833: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -12717,7 +13011,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext < conftest.$ac_ext <&5)
+ (eval echo "\"\$as_me:15309: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:15019: \$? = $ac_status" >&5
+ echo "$as_me:15313: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@@ -15072,11 +15366,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:15075: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:15369: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:15079: \$? = $ac_status" >&5
+ echo "$as_me:15373: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -16433,7 +16727,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext < conftest.$ac_ext <&5)
+ (eval echo "\"\$as_me:17665: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:17375: \$? = $ac_status" >&5
+ echo "$as_me:17669: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@@ -17428,11 +17722,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:17431: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:17725: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:17435: \$? = $ac_status" >&5
+ echo "$as_me:17729: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -19467,11 +19761,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:19470: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:19764: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:19474: \$? = $ac_status" >&5
+ echo "$as_me:19768: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@@ -19710,11 +20004,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:19713: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:20007: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:19717: \$? = $ac_status" >&5
+ echo "$as_me:20011: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@@ -19770,11 +20064,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:19773: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:20067: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:19777: \$? = $ac_status" >&5
+ echo "$as_me:20071: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -21955,7 +22249,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext < conftest.$ac_ext <flags &= ~(RSA_FLAG_CACHE_PUBLIC | RSA_FLAG_CACHE_PRIVATE); \
(rsa)->flags &= ~RSA_FLAG_BLINDING; \
} while (0)
+#elif defined(RSA_FLAG_NO_BLINDING)
+#define SET_FLAGS(rsa) \
+ do { \
+ (rsa)->flags &= ~RSA_FLAG_BLINDING; \
+ (rsa)->flags |= RSA_FLAG_NO_BLINDING; \
+ } while (0)
#else
#define SET_FLAGS(rsa) \
do { \
@@ -262,6 +268,94 @@ opensslrsa_compare(const dst_key_t *key1, const dst_key_t *key2) {
return (ISC_TRUE);
}
+#ifndef HAVE_RSA_GENERATE_KEY
+/* ====================================================================
+ * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this
+ * software must display the following acknowledgment:
+ * "This product includes software developed by the OpenSSL Project
+ * for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
+ *
+ * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * openssl-core@openssl.org.
+ *
+ * 5. Products derived from this software may not be called "OpenSSL"
+ * nor may "OpenSSL" appear in their names without prior written
+ * permission of the OpenSSL Project.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by the OpenSSL Project
+ * for use in the OpenSSL Toolkit (http://www.openssl.org/)"
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This product includes cryptographic software written by Eric Young
+ * (eay@cryptsoft.com). This product includes software written by Tim
+ * Hudson (tjh@cryptsoft.com).
+ *
+ */
+static RSA *
+RSA_generate_key(int bits, unsigned long e_value,
+ void (*callback)(int,int,void *), void *cb_arg)
+{
+ BN_GENCB cb;
+ size_t i;
+ RSA *rsa = RSA_new();
+ BIGNUM *e = BN_new();
+
+ if (rsa == NULL || e == NULL)
+ goto err;
+
+ /* The problem is when building with 8, 16, or 32 BN_ULONG,
+ * unsigned long can be larger */
+ for (i = 0; i < sizeof(unsigned long) * 8; i++) {
+ if ((e_value & (1UL<
Date: Wed, 1 Mar 2006 02:49:40 +0000
Subject: [PATCH 069/465] 1994. [port] OpenSSL 0.9.8 support. [RT
#15694]
---
CHANGES | 2 +
config.h.in | 11 +-
configure | 352 ++++++++++++++++++++++++++++++++++----
configure.in | 11 +-
lib/dns/openssldh_link.c | 75 +++++++-
lib/dns/openssldsa_link.c | 79 ++++++++-
lib/dns/opensslrsa_link.c | 90 +++++++++-
7 files changed, 586 insertions(+), 34 deletions(-)
diff --git a/CHANGES b/CHANGES
index 86bec10f5f..2805b43bfd 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,5 @@
+1994. [port] OpenSSL 0.9.8 support. [RT #15694]
+
1991. [cleanup] The configuration data, once read, should be treated
as readonly. Expand the use of const to enforce this
at compile time. [RT #15813]
diff --git a/config.h.in b/config.h.in
index 226611cd2c..b3d224e43d 100644
--- a/config.h.in
+++ b/config.h.in
@@ -16,7 +16,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: config.h.in,v 1.47.2.20 2006/02/02 23:13:27 marka Exp $ */
+/* $Id: config.h.in,v 1.47.2.21 2006/03/01 02:49:40 marka Exp $ */
/***
*** This file is not to be included by any public header files, because
@@ -144,9 +144,15 @@ int sigwait(const unsigned int *set, int *sig);
/* Define if you cannot bind() before connect() for TCP sockets. */
#undef BROKEN_TCP_BIND_BEFORE_CONNECT
+/* Define if libcrypto has DH_generate_parameters */
+#undef HAVE_DH_GENERATE_PARAMETERS
+
/* Define to 1 if you have the header file. */
#undef HAVE_DLFCN_H
+/* Define if libcrypto has DSA_generate_parameters */
+#undef HAVE_DSA_GENERATE_PARAMETERS
+
/* Define to 1 if you have the header file. */
#undef HAVE_FCNTL_H
@@ -177,6 +183,9 @@ int sigwait(const unsigned int *set, int *sig);
/* Define to 1 if you have the header file. */
#undef HAVE_MEMORY_H
+/* Define if libcrypto has RSA_generate_key */
+#undef HAVE_RSA_GENERATE_KEY
+
/* Define to 1 if you have the header file. */
#undef HAVE_STDINT_H
diff --git a/configure b/configure
index 6253d4007e..58e40ecb56 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.in Revision: 1.294.2.59 .
+# From configure.in Revision: 1.294.2.60 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.59.
#
@@ -4922,6 +4922,300 @@ fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
+ echo "$as_me:$LINENO: checking for DH_generate_parameters" >&5
+echo $ECHO_N "checking for DH_generate_parameters... $ECHO_C" >&6
+if test "${ac_cv_func_DH_generate_parameters+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define DH_generate_parameters to an innocuous variant, in case declares DH_generate_parameters.
+ For example, HP-UX 11i declares gettimeofday. */
+#define DH_generate_parameters innocuous_DH_generate_parameters
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char DH_generate_parameters (); below.
+ Prefer to if __STDC__ is defined, since
+ exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include
+#else
+# include
+#endif
+
+#undef DH_generate_parameters
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char DH_generate_parameters ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_DH_generate_parameters) || defined (__stub___DH_generate_parameters)
+choke me
+#else
+char (*f) () = DH_generate_parameters;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != DH_generate_parameters;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_DH_generate_parameters=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_DH_generate_parameters=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_DH_generate_parameters" >&5
+echo "${ECHO_T}$ac_cv_func_DH_generate_parameters" >&6
+if test $ac_cv_func_DH_generate_parameters = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DH_GENERATE_PARAMETERS 1
+_ACEOF
+
+fi
+
+ echo "$as_me:$LINENO: checking for RSA_generate_key" >&5
+echo $ECHO_N "checking for RSA_generate_key... $ECHO_C" >&6
+if test "${ac_cv_func_RSA_generate_key+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define RSA_generate_key to an innocuous variant, in case declares RSA_generate_key.
+ For example, HP-UX 11i declares gettimeofday. */
+#define RSA_generate_key innocuous_RSA_generate_key
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char RSA_generate_key (); below.
+ Prefer to if __STDC__ is defined, since
+ exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include
+#else
+# include
+#endif
+
+#undef RSA_generate_key
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char RSA_generate_key ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_RSA_generate_key) || defined (__stub___RSA_generate_key)
+choke me
+#else
+char (*f) () = RSA_generate_key;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != RSA_generate_key;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_RSA_generate_key=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_RSA_generate_key=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_RSA_generate_key" >&5
+echo "${ECHO_T}$ac_cv_func_RSA_generate_key" >&6
+if test $ac_cv_func_RSA_generate_key = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_RSA_GENERATE_KEY 1
+_ACEOF
+
+fi
+
+ echo "$as_me:$LINENO: checking for DSA_generate_parameters" >&5
+echo $ECHO_N "checking for DSA_generate_parameters... $ECHO_C" >&6
+if test "${ac_cv_func_DSA_generate_parameters+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define DSA_generate_parameters to an innocuous variant, in case declares DSA_generate_parameters.
+ For example, HP-UX 11i declares gettimeofday. */
+#define DSA_generate_parameters innocuous_DSA_generate_parameters
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char DSA_generate_parameters (); below.
+ Prefer