summaryrefslogtreecommitdiffstats
path: root/contrib/bind9/bin/named
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/bind9/bin/named')
-rw-r--r--contrib/bind9/bin/named/Makefile.in8
-rw-r--r--contrib/bind9/bin/named/client.c4
-rw-r--r--contrib/bind9/bin/named/config.c6
-rw-r--r--contrib/bind9/bin/named/control.c2
-rw-r--r--contrib/bind9/bin/named/include/named/control.h2
-rw-r--r--contrib/bind9/bin/named/main.c16
-rw-r--r--contrib/bind9/bin/named/named.conf.53
-rw-r--r--contrib/bind9/bin/named/named.conf.docbook3
-rw-r--r--contrib/bind9/bin/named/named.conf.html14
-rw-r--r--contrib/bind9/bin/named/server.c32
-rw-r--r--contrib/bind9/bin/named/unix/include/named/os.h5
-rw-r--r--contrib/bind9/bin/named/unix/os.c56
-rw-r--r--contrib/bind9/bin/named/update.c25
13 files changed, 132 insertions, 44 deletions
diff --git a/contrib/bind9/bin/named/Makefile.in b/contrib/bind9/bin/named/Makefile.in
index d95351a..50fb93b 100644
--- a/contrib/bind9/bin/named/Makefile.in
+++ b/contrib/bind9/bin/named/Makefile.in
@@ -13,7 +13,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
-# $Id: Makefile.in,v 1.74.12.10 2004/08/21 06:22:40 marka Exp $
+# $Id: Makefile.in,v 1.74.12.11 2004/09/06 21:47:25 marka Exp $
srcdir = @srcdir@
VPATH = @srcdir@
@@ -123,9 +123,13 @@ clean distclean maintainer-clean::
installdirs:
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${sbindir}
+ $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man5
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man8
install:: named@EXEEXT@ lwresd@EXEEXT@ installdirs
${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} named@EXEEXT@ ${DESTDIR}${sbindir}
(cd ${DESTDIR}${sbindir}; rm -f lwresd@EXEEXT@; @LN@ named@EXEEXT@ lwresd@EXEEXT@)
- for m in ${MANPAGES}; do ${INSTALL_DATA} ${srcdir}/$$m ${DESTDIR}${mandir}/man8; done
+ ${INSTALL_DATA} ${srcdir}/named.8 ${DESTDIR}${mandir}/man8
+ ${INSTALL_DATA} ${srcdir}/lwresd.8 ${DESTDIR}${mandir}/man8
+ ${INSTALL_DATA} ${srcdir}/named.conf.5 ${DESTDIR}${mandir}/man5
+
diff --git a/contrib/bind9/bin/named/client.c b/contrib/bind9/bin/named/client.c
index acb9b21..259f8d9 100644
--- a/contrib/bind9/bin/named/client.c
+++ b/contrib/bind9/bin/named/client.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: client.c,v 1.176.2.13.4.22 2004/07/23 02:56:51 marka Exp $ */
+/* $Id: client.c,v 1.176.2.13.4.23 2004/09/26 22:37:43 marka Exp $ */
#include <config.h>
@@ -1938,7 +1938,7 @@ client_udprecv(ns_client_t *client) {
client->task, client->recvevent, 0);
if (result != ISC_R_SUCCESS) {
UNEXPECTED_ERROR(__FILE__, __LINE__,
- "isc_socket_recv() failed: %s",
+ "isc_socket_recv2() failed: %s",
isc_result_totext(result));
/*
* This cannot happen in the current implementation, since
diff --git a/contrib/bind9/bin/named/config.c b/contrib/bind9/bin/named/config.c
index 75158c0..99e5ffa 100644
--- a/contrib/bind9/bin/named/config.c
+++ b/contrib/bind9/bin/named/config.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: config.c,v 1.11.2.4.8.28 2004/08/28 05:41:42 marka Exp $ */
+/* $Id: config.c,v 1.11.2.4.8.29 2004/10/05 02:52:26 marka Exp $ */
#include <config.h>
@@ -555,8 +555,8 @@ ns_config_getipandkeylist(cfg_obj_t *config, cfg_obj_t *list, isc_mem_t *mctx,
if (new == NULL)
goto cleanup;
if (keycount != 0) {
- memcpy(new, keys, newsize);
- isc_mem_put(mctx, keys, newsize);
+ memcpy(new, keys, oldsize);
+ isc_mem_put(mctx, keys, oldsize);
}
keys = new;
keycount = newlen;
diff --git a/contrib/bind9/bin/named/control.c b/contrib/bind9/bin/named/control.c
index 8eb7533..b6ff6fe 100644
--- a/contrib/bind9/bin/named/control.c
+++ b/contrib/bind9/bin/named/control.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: control.c,v 1.7.2.2.2.10.4.1 2004/09/20 01:00:00 marka Exp $ */
+/* $Id: control.c,v 1.7.2.2.2.11 2004/09/03 03:43:31 marka Exp $ */
#include <config.h>
diff --git a/contrib/bind9/bin/named/include/named/control.h b/contrib/bind9/bin/named/include/named/control.h
index 9cf4a33..bbb7d36 100644
--- a/contrib/bind9/bin/named/include/named/control.h
+++ b/contrib/bind9/bin/named/include/named/control.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: control.h,v 1.6.2.2.2.6.6.1 2004/09/20 01:00:01 marka Exp $ */
+/* $Id: control.h,v 1.6.2.2.2.7 2004/09/03 03:43:32 marka Exp $ */
#ifndef NAMED_CONTROL_H
#define NAMED_CONTROL_H 1
diff --git a/contrib/bind9/bin/named/main.c b/contrib/bind9/bin/named/main.c
index 432afe5..f78ea24 100644
--- a/contrib/bind9/bin/named/main.c
+++ b/contrib/bind9/bin/named/main.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: main.c,v 1.119.2.3.2.16 2004/09/01 07:16:35 marka Exp $ */
+/* $Id: main.c,v 1.119.2.3.2.17 2004/10/25 00:42:54 marka Exp $ */
#include <config.h>
@@ -605,6 +605,15 @@ setup(void) {
if (!ns_g_foreground)
ns_os_daemonize();
+ /*
+ * We call isc_app_start() here as some versions of FreeBSD's fork()
+ * destroys all the signal handling it sets up.
+ */
+ result = isc_app_start();
+ if (result != ISC_R_SUCCESS)
+ ns_main_earlyfatal("isc_app_start() failed: %s",
+ isc_result_totext(result));
+
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
ISC_LOG_NOTICE, "starting BIND %s%s", ns_g_version,
saved_command_line);
@@ -801,11 +810,6 @@ main(int argc, char *argv[]) {
ns_os_init(program_name);
- result = isc_app_start();
- if (result != ISC_R_SUCCESS)
- ns_main_earlyfatal("isc_app_start() failed: %s",
- isc_result_totext(result));
-
dns_result_register();
dst_result_register();
isccc_result_register();
diff --git a/contrib/bind9/bin/named/named.conf.5 b/contrib/bind9/bin/named/named.conf.5
index 1755d5c..2b7387b 100644
--- a/contrib/bind9/bin/named/named.conf.5
+++ b/contrib/bind9/bin/named/named.conf.5
@@ -12,7 +12,7 @@
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
.\" PERFORMANCE OF THIS SOFTWARE.
.\"
-.\" $Id: named.conf.5,v 1.1.4.2 2004/08/21 07:35:01 marka Exp $
+.\" $Id: named.conf.5,v 1.1.4.3 2004/10/18 02:33:06 marka Exp $
.\"
.TH "NAMED.CONF" "5" "Aug 13, 2004" "BIND9" ""
.SH NAME
@@ -142,6 +142,7 @@ options {
files \fIsize\fR;
heartbeat-interval \fIinteger\fR;
host-statistics \fIboolean\fR; // not implemented
+ host-statistics-max \fInumber\fR; // not implemented
hostname ( \fIquoted_string\fR | none );
interface-interval \fIinteger\fR;
listen-on [ port \fIinteger\fR ] { \fIaddress_match_element\fR; ... };
diff --git a/contrib/bind9/bin/named/named.conf.docbook b/contrib/bind9/bin/named/named.conf.docbook
index ba6ac12..b5a71dc 100644
--- a/contrib/bind9/bin/named/named.conf.docbook
+++ b/contrib/bind9/bin/named/named.conf.docbook
@@ -15,7 +15,7 @@
- PERFORMANCE OF THIS SOFTWARE.
-->
-<!-- $Id: named.conf.docbook,v 1.1.4.1 2004/08/20 22:02:38 marka Exp $ -->
+<!-- $Id: named.conf.docbook,v 1.1.4.2 2004/10/17 23:19:49 marka Exp $ -->
<refentry>
<refentryinfo>
@@ -177,6 +177,7 @@ options {
files <replaceable>size</replaceable>;
heartbeat-interval <replaceable>integer</replaceable>;
host-statistics <replaceable>boolean</replaceable>; // not implemented
+ host-statistics-max <replaceable>number</replaceable>; // not implemented
hostname ( <replaceable>quoted_string</replaceable> | none );
interface-interval <replaceable>integer</replaceable>;
listen-on <optional> port <replaceable>integer</replaceable> </optional> { <replaceable>address_match_element</replaceable>; ... };
diff --git a/contrib/bind9/bin/named/named.conf.html b/contrib/bind9/bin/named/named.conf.html
index 9991522..7f8bb2e 100644
--- a/contrib/bind9/bin/named/named.conf.html
+++ b/contrib/bind9/bin/named/named.conf.html
@@ -14,7 +14,7 @@
- PERFORMANCE OF THIS SOFTWARE.
-->
-<!-- $Id: named.conf.html,v 1.1.4.3 2004/08/22 23:38:59 marka Exp $ -->
+<!-- $Id: named.conf.html,v 1.1.4.4 2004/10/18 02:33:06 marka Exp $ -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML
@@ -470,6 +470,10 @@ CLASS="REPLACEABLE"
CLASS="REPLACEABLE"
>boolean</VAR
>;&nbsp;//&nbsp;not&nbsp;implemented<br>
+ host-statistics-max&nbsp;<VAR
+CLASS="REPLACEABLE"
+>number</VAR
+>;&nbsp;//&nbsp;not&nbsp;implemented<br>
hostname&nbsp;(&nbsp;<VAR
CLASS="REPLACEABLE"
>quoted_string</VAR
@@ -1038,7 +1042,7 @@ CLASS="REPLACEABLE"
><DIV
CLASS="REFSECT1"
><A
-NAME="AEN271"
+NAME="AEN272"
></A
><H2
>VIEW</H2
@@ -1530,7 +1534,7 @@ CLASS="REPLACEABLE"
><DIV
CLASS="REFSECT1"
><A
-NAME="AEN397"
+NAME="AEN398"
></A
><H2
>ZONE</H2
@@ -1848,7 +1852,7 @@ CLASS="REPLACEABLE"
><DIV
CLASS="REFSECT1"
><A
-NAME="AEN479"
+NAME="AEN480"
></A
><H2
>FILES</H2
@@ -1861,7 +1865,7 @@ CLASS="FILENAME"
><DIV
CLASS="REFSECT1"
><A
-NAME="AEN483"
+NAME="AEN484"
></A
><H2
>SEE ALSO</H2
diff --git a/contrib/bind9/bin/named/server.c b/contrib/bind9/bin/named/server.c
index 9080376..d0b6afc 100644
--- a/contrib/bind9/bin/named/server.c
+++ b/contrib/bind9/bin/named/server.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: server.c,v 1.339.2.15.2.56 2004/06/18 04:39:48 marka Exp $ */
+/* $Id: server.c,v 1.339.2.15.2.59 2004/11/10 22:13:56 marka Exp $ */
#include <config.h>
@@ -522,6 +522,7 @@ configure_order(dns_order_t *order, cfg_obj_t *ent) {
const char *str;
isc_buffer_t b;
isc_result_t result;
+ isc_boolean_t addroot;
result = ns_config_getclass(cfg_tuple_get(ent, "class"),
dns_rdataclass_any, &rdclass);
@@ -538,11 +539,12 @@ configure_order(dns_order_t *order, cfg_obj_t *ent) {
str = cfg_obj_asstring(obj);
else
str = "*";
+ addroot = ISC_TF(strcmp(str, "*") == 0);
isc_buffer_init(&b, str, strlen(str));
isc_buffer_add(&b, strlen(str));
dns_fixedname_init(&fixed);
result = dns_name_fromtext(dns_fixedname_name(&fixed), &b,
- dns_rootname, ISC_FALSE, NULL);
+ dns_rootname, ISC_FALSE, NULL);
if (result != ISC_R_SUCCESS)
return (result);
@@ -558,6 +560,18 @@ configure_order(dns_order_t *order, cfg_obj_t *ent) {
else
INSIST(0);
+ /*
+ * "*" should match everything including the root (BIND 8 compat).
+ * As dns_name_matcheswildcard(".", "*.") returns FALSE add a
+ * explict entry for "." when the name is "*".
+ */
+ if (addroot) {
+ result = dns_order_add(order, dns_rootname,
+ rdtype, rdclass, mode);
+ if (result != ISC_R_SUCCESS)
+ return (result);
+ }
+
return (dns_order_add(order, dns_fixedname_name(&fixed),
rdtype, rdclass, mode));
}
@@ -1903,7 +1917,8 @@ adjust_interfaces(ns_server_t *server, isc_mem_t *mctx) {
dns_dispatch_t *dispatch6;
dispatch6 = dns_resolver_dispatchv6(view->resolver);
- INSIST(dispatch6 != NULL);
+ if (dispatch6 == NULL)
+ continue;
result = dns_dispatch_getlocaladdress(dispatch6, &addr);
if (result != ISC_R_SUCCESS)
goto fail;
@@ -2805,7 +2820,7 @@ run_server(isc_task_t *task, isc_event_t *event) {
isc_result_t result;
ns_server_t *server = (ns_server_t *)event->ev_arg;
- UNUSED(task);
+ INSIST(task == server->task);
isc_event_free(&event);
@@ -2843,11 +2858,11 @@ run_server(isc_task_t *task, isc_event_t *event) {
isc_hash_init();
- CHECKFATAL(load_zones(server, ISC_FALSE),
- "loading zones");
+ CHECKFATAL(load_zones(server, ISC_FALSE), "loading zones");
+ ns_os_started();
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_SERVER,
- ISC_LOG_INFO, "running");
+ ISC_LOG_NOTICE, "running");
}
void
@@ -3187,8 +3202,7 @@ loadconfig(ns_server_t *server) {
start_reserved_dispatches(server);
result = load_configuration(ns_g_lwresdonly ?
lwresd_g_conffile : ns_g_conffile,
- server,
- ISC_FALSE);
+ server, ISC_FALSE);
if (result == ISC_R_SUCCESS)
end_reserved_dispatches(server, ISC_FALSE);
else
diff --git a/contrib/bind9/bin/named/unix/include/named/os.h b/contrib/bind9/bin/named/unix/include/named/os.h
index a9fbcb7..03baee5 100644
--- a/contrib/bind9/bin/named/unix/include/named/os.h
+++ b/contrib/bind9/bin/named/unix/include/named/os.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: os.h,v 1.14.2.2.8.8 2004/03/08 04:04:21 marka Exp $ */
+/* $Id: os.h,v 1.14.2.2.8.9 2004/09/29 06:36:44 marka Exp $ */
#ifndef NS_OS_H
#define NS_OS_H 1
@@ -61,4 +61,7 @@ ns_os_shutdownmsg(char *command, isc_buffer_t *text);
void
ns_os_tzset(void);
+void
+ns_os_started(void);
+
#endif /* NS_OS_H */
diff --git a/contrib/bind9/bin/named/unix/os.c b/contrib/bind9/bin/named/unix/os.c
index 7df7f3b..7977549 100644
--- a/contrib/bind9/bin/named/unix/os.c
+++ b/contrib/bind9/bin/named/unix/os.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: os.c,v 1.46.2.4.8.16 2004/05/04 03:19:42 marka Exp $ */
+/* $Id: os.c,v 1.46.2.4.8.19 2004/10/07 02:34:20 marka Exp $ */
#include <config.h>
#include <stdarg.h>
@@ -104,6 +104,7 @@ static pid_t mainpid = 0;
static struct passwd *runas_pw = NULL;
static isc_boolean_t done_setuid = ISC_FALSE;
+static int dfd[2] = { -1, -1 };
#ifdef HAVE_LINUX_CAPABILITY_H
@@ -161,7 +162,10 @@ linux_setcaps(unsigned int caps) {
cap.inheritable = caps;
if (syscall(SYS_capset, &caphead, &cap) < 0) {
isc__strerror(errno, strbuf, sizeof(strbuf));
- ns_main_earlyfatal("capset failed: %s", strbuf);
+ ns_main_earlyfatal("capset failed: %s:"
+ " please ensure that the capset kernel"
+ " module is loaded. see insmod(8)",
+ strbuf);
}
}
@@ -302,13 +306,33 @@ ns_os_daemonize(void) {
pid_t pid;
char strbuf[ISC_STRERRORSIZE];
+ if (pipe(dfd) == -1) {
+ isc__strerror(errno, strbuf, sizeof(strbuf));
+ ns_main_earlyfatal("pipe(): %s", strbuf);
+ }
+
pid = fork();
if (pid == -1) {
isc__strerror(errno, strbuf, sizeof(strbuf));
ns_main_earlyfatal("fork(): %s", strbuf);
}
- if (pid != 0)
- _exit(0);
+ if (pid != 0) {
+ int n;
+ /*
+ * Wait for the child to finish loading for the first time.
+ * This would be so much simpler if fork() worked once we
+ * were multi-threaded.
+ */
+ (void)close(dfd[1]);
+ do {
+ char buf;
+ n = read(dfd[0], &buf, 1);
+ if (n == 1)
+ _exit(0);
+ } while (n == -1 && errno == EINTR);
+ _exit(1);
+ }
+ (void)close(dfd[0]);
/*
* We're the child.
@@ -350,6 +374,20 @@ ns_os_daemonize(void) {
}
void
+ns_os_started(void) {
+ char buf = 0;
+
+ /*
+ * Signal to the parent that we stated successfully.
+ */
+ if (dfd[0] != -1 && dfd[1] != -1) {
+ write(dfd[1], &buf, 1);
+ close(dfd[1]);
+ dfd[0] = dfd[1] = -1;
+ }
+}
+
+void
ns_os_opendevnull(void) {
devnullfd = open("/dev/null", O_RDWR, 0);
}
@@ -426,10 +464,14 @@ ns_os_changeuser(void) {
#ifdef HAVE_LINUXTHREADS
#ifdef HAVE_LINUX_CAPABILITY_H
if (!non_root_caps)
+ ns_main_earlyfatal("-u with Linux threads not supported: "
+ "requires kernel support for "
+ "prctl(PR_SET_KEEPCAPS)");
+#else
+ ns_main_earlyfatal("-u with Linux threads not supported: "
+ "no capabilities support or capabilities "
+ "disabled at build time");
#endif
- ns_main_earlyfatal(
- "-u not supported on Linux kernels older than "
- "2.3.99-pre3 or 2.2.18 when using threads");
#endif
if (setgid(runas_pw->pw_gid) < 0) {
diff --git a/contrib/bind9/bin/named/update.c b/contrib/bind9/bin/named/update.c
index 24779b3..325381a 100644
--- a/contrib/bind9/bin/named/update.c
+++ b/contrib/bind9/bin/named/update.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: update.c,v 1.88.2.5.2.23 2004/07/23 02:56:52 marka Exp $ */
+/* $Id: update.c,v 1.88.2.5.2.25 2004/10/21 01:40:22 marka Exp $ */
#include <config.h>
@@ -708,7 +708,7 @@ ssu_checkrule(void *data, dns_rdataset_t *rrset) {
*/
if (rrset->type == dns_rdatatype_rrsig ||
rrset->type == dns_rdatatype_nsec)
- return (ISC_TRUE);
+ return (ISC_R_SUCCESS);
result = dns_ssutable_checkrules(ssuinfo->table, ssuinfo->signer,
ssuinfo->name, rrset->type);
return (result == ISC_TRUE ? ISC_R_SUCCESS : ISC_R_FAILURE);
@@ -965,13 +965,27 @@ typedef struct {
*/
/*
- * Return true iff 'update_rr' is neither a SOA nor an NS RR.
+ * Return true iff 'db_rr' is neither a SOA nor an NS RR nor
+ * an RRSIG nor a NSEC.
*/
static isc_boolean_t
type_not_soa_nor_ns_p(dns_rdata_t *update_rr, dns_rdata_t *db_rr) {
UNUSED(update_rr);
return ((db_rr->type != dns_rdatatype_soa &&
- db_rr->type != dns_rdatatype_ns) ?
+ db_rr->type != dns_rdatatype_ns &&
+ db_rr->type != dns_rdatatype_rrsig &&
+ db_rr->type != dns_rdatatype_nsec) ?
+ ISC_TRUE : ISC_FALSE);
+}
+
+/*
+ * Return true iff 'db_rr' is neither a RRSIG nor a NSEC.
+ */
+static isc_boolean_t
+type_not_dnssec(dns_rdata_t *update_rr, dns_rdata_t *db_rr) {
+ UNUSED(update_rr);
+ return ((db_rr->type != dns_rdatatype_rrsig &&
+ db_rr->type != dns_rdatatype_nsec) ?
ISC_TRUE : ISC_FALSE);
}
@@ -2514,7 +2528,8 @@ update_action(isc_task_t *task, isc_event_t *event) {
dns_rdatatype_any, 0,
&rdata, &diff));
} else {
- CHECK(delete_if(true_p, db, ver, name,
+ CHECK(delete_if(type_not_dnssec,
+ db, ver, name,
dns_rdatatype_any, 0,
&rdata, &diff));
}
OpenPOWER on IntegriCloud