diff options
| author | Internet Software Consortium, Inc <@isc.org> | 2014-02-11 09:00:42 -0700 |
|---|---|---|
| committer | Internet Software Consortium, Inc <@isc.org> | 2014-02-11 09:00:42 -0700 |
| commit | 8af21b710f34092dcd08abdc13e7971553b616d2 (patch) | |
| tree | f88f42a2ea6576f512958360ee049636e18046b0 /bin | |
| parent | 892b23e1710e6770b12c3aa952eb2cdc9ab4bc1b (diff) | |
| download | bind9-8af21b710f34092dcd08abdc13e7971553b616d2.tar.gz | |
9.9.5rc1
Diffstat (limited to 'bin')
51 files changed, 1382 insertions, 805 deletions
diff --git a/bin/check/named-checkconf.8 b/bin/check/named-checkconf.8 index 67a8f4a3..909184ef 100644 --- a/bin/check/named-checkconf.8 +++ b/bin/check/named-checkconf.8 @@ -1,4 +1,4 @@ -.\" Copyright (C) 2004, 2005, 2007, 2009 Internet Systems Consortium, Inc. ("ISC") +.\" Copyright (C) 2004, 2005, 2007, 2009, 2014 Internet Systems Consortium, Inc. ("ISC") .\" Copyright (C) 2000-2002 Internet Software Consortium. .\" .\" Permission to use, copy, modify, and/or distribute this software for any @@ -33,7 +33,7 @@ named\-checkconf \- named configuration file syntax checking tool .SH "SYNOPSIS" .HP 16 -\fBnamed\-checkconf\fR [\fB\-h\fR] [\fB\-v\fR] [\fB\-j\fR] [\fB\-t\ \fR\fB\fIdirectory\fR\fR] {filename} [\fB\-p\fR] [\fB\-z\fR] +\fBnamed\-checkconf\fR [\fB\-h\fR] [\fB\-v\fR] [\fB\-j\fR] [\fB\-t\ \fR\fB\fIdirectory\fR\fR] {filename} [\fB\-p\fR] [\fB\-x\fR] [\fB\-z\fR] .SH "DESCRIPTION" .PP \fBnamed\-checkconf\fR @@ -84,6 +84,14 @@ Print out the and included files in canonical form if no errors were detected. .RE .PP +\-x +.RS 4 +When printing the configuration files in canonical form, obscure shared secrets by replacing them with strings of question marks ('?'). This allows the contents of +\fInamed.conf\fR +and related files to be shared \(em for example, when submitting bug reports \(em without compromising private data. This option cannot be used without +\fB\-p\fR. +.RE +.PP \-z .RS 4 Perform a test load of all master zones found in @@ -113,7 +121,7 @@ BIND 9 Administrator Reference Manual. .PP Internet Systems Consortium .SH "COPYRIGHT" -Copyright \(co 2004, 2005, 2007, 2009 Internet Systems Consortium, Inc. ("ISC") +Copyright \(co 2004, 2005, 2007, 2009, 2014 Internet Systems Consortium, Inc. ("ISC") .br Copyright \(co 2000\-2002 Internet Software Consortium. .br diff --git a/bin/check/named-checkconf.c b/bin/check/named-checkconf.c index 6f52a662..fd3795a5 100644 --- a/bin/check/named-checkconf.c +++ b/bin/check/named-checkconf.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2007, 2009-2013 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2007, 2009-2014 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1999-2002 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -482,10 +482,11 @@ main(int argc, char **argv) { isc_entropy_t *ectx = NULL; isc_boolean_t load_zones = ISC_FALSE; isc_boolean_t print = ISC_FALSE; + unsigned int flags = 0; isc_commandline_errprint = ISC_FALSE; - while ((c = isc_commandline_parse(argc, argv, "dhjt:pvz")) != EOF) { + while ((c = isc_commandline_parse(argc, argv, "dhjt:pvxz")) != EOF) { switch (c) { case 'd': debug++; @@ -512,6 +513,10 @@ main(int argc, char **argv) { printf(VERSION "\n"); exit(0); + case 'x': + flags |= CFG_PRINTER_XKEY; + break; + case 'z': load_zones = ISC_TRUE; docheckmx = ISC_FALSE; @@ -534,6 +539,11 @@ main(int argc, char **argv) { } } + if (((flags & CFG_PRINTER_XKEY) != 0) && !print) { + fprintf(stderr, "%s: -x cannot be used without -p\n", program); + exit(1); + } + if (isc_commandline_index + 1 < argc) usage(); if (argv[isc_commandline_index] != NULL) @@ -574,7 +584,7 @@ main(int argc, char **argv) { } if (print && exit_status == 0) - cfg_print(config, output, NULL); + cfg_printx(config, flags, output, NULL); cfg_obj_destroy(parser, &config); cfg_parser_destroy(&parser); diff --git a/bin/check/named-checkconf.docbook b/bin/check/named-checkconf.docbook index 9535e284..485dc42a 100644 --- a/bin/check/named-checkconf.docbook +++ b/bin/check/named-checkconf.docbook @@ -2,7 +2,7 @@ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [<!ENTITY mdash "—">]> <!-- - - Copyright (C) 2004, 2005, 2007, 2009 Internet Systems Consortium, Inc. ("ISC") + - Copyright (C) 2004, 2005, 2007, 2009, 2014 Internet Systems Consortium, Inc. ("ISC") - Copyright (C) 2000-2002 Internet Software Consortium. - - Permission to use, copy, modify, and/or distribute this software for any @@ -36,6 +36,7 @@ <year>2005</year> <year>2007</year> <year>2009</year> + <year>2014</year> <holder>Internet Systems Consortium, Inc. ("ISC")</holder> </copyright> <copyright> @@ -60,6 +61,7 @@ <arg><option>-t <replaceable class="parameter">directory</replaceable></option></arg> <arg choice="req">filename</arg> <arg><option>-p</option></arg> + <arg><option>-x</option></arg> <arg><option>-z</option></arg> </cmdsynopsis> </refsynopsisdiv> @@ -130,6 +132,21 @@ </varlistentry> <varlistentry> + <term>-x</term> + <listitem> + <para> + When printing the configuration files in canonical + form, obscure shared secrets by replacing them with + strings of question marks ('?'). This allows the + contents of <filename>named.conf</filename> and related + files to be shared — for example, when submitting + bug reports — without compromising private data. + This option cannot be used without <option>-p</option>. + </para> + </listitem> + </varlistentry> + + <varlistentry> <term>-z</term> <listitem> <para> diff --git a/bin/check/named-checkconf.html b/bin/check/named-checkconf.html index aa80c7cb..1c5ebc12 100644 --- a/bin/check/named-checkconf.html +++ b/bin/check/named-checkconf.html @@ -1,5 +1,5 @@ <!-- - - Copyright (C) 2004, 2005, 2007, 2009 Internet Systems Consortium, Inc. ("ISC") + - Copyright (C) 2004, 2005, 2007, 2009, 2014 Internet Systems Consortium, Inc. ("ISC") - Copyright (C) 2000-2002 Internet Software Consortium. - - Permission to use, copy, modify, and/or distribute this software for any @@ -29,10 +29,10 @@ </div> <div class="refsynopsisdiv"> <h2>Synopsis</h2> -<div class="cmdsynopsis"><p><code class="command">named-checkconf</code> [<code class="option">-h</code>] [<code class="option">-v</code>] [<code class="option">-j</code>] [<code class="option">-t <em class="replaceable"><code>directory</code></em></code>] {filename} [<code class="option">-p</code>] [<code class="option">-z</code>]</p></div> +<div class="cmdsynopsis"><p><code class="command">named-checkconf</code> [<code class="option">-h</code>] [<code class="option">-v</code>] [<code class="option">-j</code>] [<code class="option">-t <em class="replaceable"><code>directory</code></em></code>] {filename} [<code class="option">-p</code>] [<code class="option">-x</code>] [<code class="option">-z</code>]</p></div> </div> <div class="refsect1" lang="en"> -<a name="id2543396"></a><h2>DESCRIPTION</h2> +<a name="id2543403"></a><h2>DESCRIPTION</h2> <p><span><strong class="command">named-checkconf</strong></span> checks the syntax, but not the semantics, of a <span><strong class="command">named</strong></span> configuration file. The file is parsed @@ -52,7 +52,7 @@ </p> </div> <div class="refsect1" lang="en"> -<a name="id2543445"></a><h2>OPTIONS</h2> +<a name="id2543452"></a><h2>OPTIONS</h2> <div class="variablelist"><dl> <dt><span class="term">-h</span></dt> <dd><p> @@ -74,6 +74,16 @@ Print out the <code class="filename">named.conf</code> and included files in canonical form if no errors were detected. </p></dd> +<dt><span class="term">-x</span></dt> +<dd><p> + When printing the configuration files in canonical + form, obscure shared secrets by replacing them with + strings of question marks ('?'). This allows the + contents of <code class="filename">named.conf</code> and related + files to be shared — for example, when submitting + bug reports — without compromising private data. + This option cannot be used without <code class="option">-p</code>. + </p></dd> <dt><span class="term">-z</span></dt> <dd><p> Perform a test load of all master zones found in @@ -91,21 +101,21 @@ </dl></div> </div> <div class="refsect1" lang="en"> -<a name="id2543569"></a><h2>RETURN VALUES</h2> +<a name="id2543596"></a><h2>RETURN VALUES</h2> <p><span><strong class="command">named-checkconf</strong></span> returns an exit status of 1 if errors were detected and 0 otherwise. </p> </div> <div class="refsect1" lang="en"> -<a name="id2543580"></a><h2>SEE ALSO</h2> +<a name="id2543608"></a><h2>SEE ALSO</h2> <p><span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>, <span class="citerefentry"><span class="refentrytitle">named-checkzone</span>(8)</span>, <em class="citetitle">BIND 9 Administrator Reference Manual</em>. </p> </div> <div class="refsect1" lang="en"> -<a name="id2543610"></a><h2>AUTHOR</h2> +<a name="id2543638"></a><h2>AUTHOR</h2> <p><span class="corpauthor">Internet Systems Consortium</span> </p> </div> diff --git a/bin/confgen/ddns-confgen.c b/bin/confgen/ddns-confgen.c index d655145e..e2a86283 100644 --- a/bin/confgen/ddns-confgen.c +++ b/bin/confgen/ddns-confgen.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009, 2011 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2009, 2011, 2014 Internet Systems Consortium, Inc. ("ISC") * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -101,7 +101,7 @@ main(int argc, char **argv) { result = isc_file_progname(*argv, program, sizeof(program)); if (result != ISC_R_SUCCESS) - memcpy(program, "ddns-confgen", 13); + memmove(program, "ddns-confgen", 13); progname = program; isc_commandline_errprint = ISC_FALSE; diff --git a/bin/confgen/rndc-confgen.c b/bin/confgen/rndc-confgen.c index e2ac0792..2f65f4b0 100644 --- a/bin/confgen/rndc-confgen.c +++ b/bin/confgen/rndc-confgen.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004, 2005, 2007-2009, 2011, 2013 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004, 2005, 2007-2009, 2011, 2013, 2014 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2001, 2003 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -120,7 +120,7 @@ main(int argc, char **argv) { result = isc_file_progname(*argv, program, sizeof(program)); if (result != ISC_R_SUCCESS) - memcpy(program, "rndc-confgen", 13); + memmove(program, "rndc-confgen", 13); progname = program; keyname = DEFAULT_KEYNAME; diff --git a/bin/dig/dighost.c b/bin/dig/dighost.c index b7d231fd..56d763c2 100644 --- a/bin/dig/dighost.c +++ b/bin/dig/dighost.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2013 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2014 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2000-2003 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -448,7 +448,7 @@ static isc_result_t append(const char *text, int len, char **p, char *end) { if (len > end - *p) return (ISC_R_NOSPACE); - memcpy(*p, text, len); + memmove(*p, text, len); *p += len; return (ISC_R_SUCCESS); } @@ -2330,6 +2330,7 @@ setup_lookup(dig_lookup_t *lookup) { query->rr_count = 0; query->msg_count = 0; query->byte_count = 0; + query->ixfr_axfr = ISC_FALSE; ISC_LIST_INIT(query->recvlist); ISC_LIST_INIT(query->lengthlist); query->sock = NULL; @@ -2982,6 +2983,9 @@ check_for_more_data(dig_query_t *query, dns_message_t *msg, isc_boolean_t ixfr = query->lookup->rdtype == dns_rdatatype_ixfr; isc_boolean_t axfr = query->lookup->rdtype == dns_rdatatype_axfr; + if (ixfr) + axfr = query->ixfr_axfr; + debug("check_for_more_data()"); /* @@ -3030,7 +3034,7 @@ check_for_more_data(dig_query_t *query, dns_message_t *msg, query->second_rr_rcvd = ISC_TRUE; query->second_rr_serial = 0; debug("got the second rr as nonsoa"); - axfr = ISC_TRUE; + axfr = query->ixfr_axfr = ISC_TRUE; goto next_rdata; } @@ -3941,7 +3945,7 @@ output_filter(isc_buffer_t *buffer, unsigned int used_org, fromlen = isc_buffer_usedlength(buffer) - used_org; if (fromlen >= MAXDLEN) return (ISC_R_SUCCESS); - memcpy(tmp1, (char *)isc_buffer_base(buffer) + used_org, fromlen); + memmove(tmp1, (char *)isc_buffer_base(buffer) + used_org, fromlen); end_with_dot = (tmp1[fromlen - 1] == '.') ? ISC_TRUE : ISC_FALSE; if (absolute && !end_with_dot) { fromlen++; @@ -3970,7 +3974,7 @@ output_filter(isc_buffer_t *buffer, unsigned int used_org, return (ISC_R_NOSPACE); isc_buffer_subtract(buffer, isc_buffer_usedlength(buffer) - used_org); - memcpy(isc_buffer_used(buffer), tmp1, tolen); + memmove(isc_buffer_used(buffer), tmp1, tolen); isc_buffer_add(buffer, (unsigned int)tolen); return (ISC_R_SUCCESS); @@ -3990,7 +3994,8 @@ append_textname(char *name, const char *origin, size_t namesize) { if (namelen + 1 + originlen >= namesize) return idn_buffer_overflow; - name[namelen++] = '.'; + if (*origin != '.') + name[namelen++] = '.'; (void)strcpy(name + namelen, origin); return idn_success; } diff --git a/bin/dig/include/dig/dig.h b/bin/dig/include/dig/dig.h index 00466391..0150d11d 100644 --- a/bin/dig/include/dig/dig.h +++ b/bin/dig/include/dig/dig.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2009, 2011-2013 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2009, 2011-2014 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2000-2003 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -202,6 +202,7 @@ struct dig_query { isc_uint32_t second_rr_serial; isc_uint32_t msg_count; isc_uint32_t rr_count; + isc_boolean_t ixfr_axfr; char *servname; char *userarg; isc_bufferlist_t sendlist, diff --git a/bin/dnssec/dnssec-signzone.c b/bin/dnssec/dnssec-signzone.c index fb347e3c..0a13d9fa 100644 --- a/bin/dnssec/dnssec-signzone.c +++ b/bin/dnssec/dnssec-signzone.c @@ -1,5 +1,5 @@ /* - * Portions Copyright (C) 2004-2013 Internet Systems Consortium, Inc. ("ISC") + * Portions Copyright (C) 2004-2014 Internet Systems Consortium, Inc. ("ISC") * Portions Copyright (C) 1999-2003 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -730,7 +730,7 @@ hashlist_add(hashlist_t *l, const unsigned char *hash, size_t len) fatal("unable to grow hashlist: out of memory"); } memset(l->hashbuf + l->entries * l->length, 0, l->length); - memcpy(l->hashbuf + l->entries * l->length, hash, len); + memmove(l->hashbuf + l->entries * l->length, hash, len); l->entries++; } @@ -2668,7 +2668,7 @@ set_nsec3params(isc_boolean_t update_chain, isc_boolean_t set_salt, "Use -u to update it."); } else if (!set_salt) { salt_length = orig_saltlen; - memcpy(saltbuf, orig_salt, orig_saltlen); + memmove(saltbuf, orig_salt, orig_saltlen); salt = saltbuf; } diff --git a/bin/dnssec/dnssectool.c b/bin/dnssec/dnssectool.c index 5f5f7d88..74698e1b 100644 --- a/bin/dnssec/dnssectool.c +++ b/bin/dnssec/dnssectool.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004, 2005, 2007, 2009-2013 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004, 2005, 2007, 2009-2014 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2000, 2001, 2003 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -725,11 +725,11 @@ record_nsec3(const unsigned char *rawhash, const dns_rdata_nsec3_t *nsec3, element->next_length = nsec3->next_length; element->iterations = nsec3->iterations; cp = (unsigned char *)(element + 1); - memcpy(cp, nsec3->salt, nsec3->salt_length); + memmove(cp, nsec3->salt, nsec3->salt_length); cp += nsec3->salt_length; - memcpy(cp, rawhash, nsec3->next_length); + memmove(cp, rawhash, nsec3->next_length); cp += nsec3->next_length; - memcpy(cp, nsec3->next, nsec3->next_length); + memmove(cp, nsec3->next, nsec3->next_length); result = isc_heap_insert(chains, element); if (result != ISC_R_SUCCESS) { fprintf(stderr, "isc_heap_insert failed: %s\n", diff --git a/bin/named/bind9.ver3.xsl b/bin/named/bind9.ver3.xsl index 22e5c45f..699bcb48 100644 --- a/bin/named/bind9.ver3.xsl +++ b/bin/named/bind9.ver3.xsl @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- - - Copyright (C) 2012, 2013 Internet Systems Consortium, Inc. ("ISC") + - Copyright (C) 2012-2014 Internet Systems Consortium, Inc. ("ISC") - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above @@ -20,60 +20,61 @@ <!-- %Id: bind9.xsl,v 1.21 2009/01/27 23:47:54 tbox Exp % --> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0"> <xsl:output method="html" indent="yes" version="4.0"/> - <xsl:template match="statistics[@version="3.0"]"> + <xsl:template match="statistics[@version="3.3"]"> <html> <head> <xsl:if test="system-property('xsl:vendor')!='Transformiix'"> <!-- Non Mozilla specific markup --> <script type="text/javascript" src="https://www.google.com/jsapi"/> <script type="text/javascript"> - + google.load("visualization", "1", {packages:["corechart"]}); google.setOnLoadCallback(loadGraphs); var graphs=[]; - - function drawChart(chart_title,target,data) { + + function drawChart(chart_title,target,style,data) { var data = google.visualization.arrayToDataTable(data); var options = { title: chart_title }; - - var chart = new google.visualization.BarChart(document.getElementById(target)); - chart.draw(data, options); + + var chart; + if (style == "barchart") { + chart = new google.visualization.BarChart(document.getElementById(target)); + chart.draw(data, options); + } else if (style == "piechart") { + chart = new google.visualization.PieChart(document.getElementById(target)); + chart.draw(data, options); + } } - + function loadGraphs(){ - //alert("here we are!"); var g; - - // Server Incoming query Types + while(g = graphs.shift()){ // alert("going for: " + g.target); if(g.data.length > 1){ - drawChart(g.title,g.target,g.data); + drawChart(g.title,g.target,g.style,g.data); } } } - - // Server Incoming Queries Types - graphs.push({ - 'title' : "Server Incoming Query Types", - 'target': 'chart_incoming_qtypes', - 'data': [['Type','Counter'],<xsl:for-each select="server/counters[@type="qtype"]/counter">['<xsl:value-of select="@name"/>',<xsl:value-of select="."/>],</xsl:for-each>] - }); - - - // Server Incoming Requests - graphs.push({ - 'title' : "Server Incoming Requests", - 'target': 'chart_incoming_requests', - 'data': [['Requests','Counter'],<xsl:for-each select="server/counters[@type="opcode"]/counter">['<xsl:value-of select="@name"/>',<xsl:value-of select="."/>],</xsl:for-each>]}); - - - - + + // Server Incoming Query Types + graphs.push({ + 'title' : "Server Incoming Query Types", + 'target': 'chart_incoming_qtypes', + 'style': 'barchart', + 'data': [['Type','Counter'],<xsl:for-each select="server/counters[@type="qtype"]/counter">['<xsl:value-of select="@name"/>',<xsl:value-of select="."/>],</xsl:for-each>] + }); + + // Server Incoming Requests by opcode + graphs.push({ + 'title' : "Server Incoming Requests by DNS Opcode", + 'target': 'chart_incoming_opcodes', + 'style': 'barchart', + 'data': [['Opcode','Counter'],<xsl:for-each select="server/counters[@type="opcode"]/counter[. > 0 or substring(@name,1,3) != 'RES']">['<xsl:value-of select="@name"/>',<xsl:value-of select="."/>],</xsl:for-each>]}); </script> </xsl:if> <style type="text/css"> @@ -83,15 +84,15 @@ color: #000000; font-size: 10pt; } - + .odd{ background-color: #f0f0f0; } - + .even{ background-color: #ffffff; } - + p.footer{ font-style:italic; color: grey; @@ -106,21 +107,101 @@ border: 1px solid grey; width: 500px; } - table.counters th { + text-align: right; + border: 1px solid grey; + width: 150px; + } + table.counters td { + text-align: right; + font-family: monospace; + } + table.counters tr:hover{ + background-color: #99ddff; + } + + table.info { + border: 1px solid grey; + width: 500px; + } + table.info th { text-align: center; border: 1px solid grey; - width: 120px; - } - table.counters td{ - text-align:center; - - } - - table.counters tr:hover{ + width: 150px; + } + table.info td { + text-align: center; + } + table.info tr:hover{ background-color: #99ddff; - } - + } + + table.tasks { + border: 1px solid grey; + width: 500px; + } + table.tasks th { + text-align: center; + border: 1px solid grey; + width: 150px; + } + table.tasks td { + text-align: right; + font-family: monospace; + } + table.tasks td:nth-child(2) { + text-align: center; + } + table.tasks td:nth-child(4) { + text-align: center; + } + table.tasks tr:hover{ + background-color: #99ddff; + } + + table.netstat { + border: 1px solid grey; + width: 500px; + } + table.netstat th { + text-align: center; + border: 1px solid grey; + width: 150px; + } + table.netstat td { + text-align: center; + } + table.netstat td:nth-child(4) { + text-align: right; + font-family: monospace; + } + table.netstat td:nth-child(7) { + text-align: left; + } + table.netstat tr:hover{ + background-color: #99ddff; + } + + table.mctx { + border: 1px solid grey; + width: 500px; + } + table.mctx th { + text-align: center; + border: 1px solid grey; + } + table.mctx td { + text-align: right; + font-family: monospace; + } + table.mctx td:nth-child(-n+2) { + text-align: left; + width: 100px; + } + table.mctx tr:hover{ + background-color: #99ddff; + } + .totals { background-color: rgb(1,169,206); color: #ffffff; @@ -160,20 +241,18 @@ width:500px; text-align:center; } - + h3 { color: #444444; font-size: 12pt; width:500px; text-align:center; - } h4 { color: rgb(1,169,206); font-size: 10pt; width:500px; text-align:center; - } .pie { @@ -190,7 +269,7 @@ </div> <hr/> <h2>Server Times</h2> - <table class="counters"> + <table class="info"> <tr> <th>Boot time:</th> <td> @@ -198,97 +277,142 @@ </td> </tr> <tr> - <th>Sample time:</th> + <th>Current time:</th> <td> <xsl:value-of select="server/current-time"/> </td> </tr> </table> <br/> - <h2>Incoming Requests</h2> - <xsl:if test="system-property('xsl:vendor')!='Transformiix'"> - <!-- Non Mozilla specific markup --> - <div class="pie" id="chart_incoming_requests">[no incoming requests]</div> - </xsl:if> - <table class="counters"> - <xsl:for-each select="server/counters[@type="opcode"]/counter"> - <xsl:sort select="." data-type="number" order="descending"/> + <xsl:if test="server/counters[@type="opcode"]/counter[. > 0]"> + <xsl:if test="system-property('xsl:vendor')!='Transformiix'"> + <h2>Incoming Requests by DNS Opcode</h2> + <!-- Non Mozilla specific markup --> + <div class="pie" id="chart_incoming_opcodes"> + [cannot display chart] + </div> + </xsl:if> + <table class="counters"> + <xsl:for-each select="server/counters[@type="opcode"]/counter[. > 0 or substring(@name,1,3) != 'RES']"> + <xsl:sort select="." data-type="number" order="descending"/> + <tr> + <th> + <xsl:value-of select="@name"/> + </th> + <td> + <xsl:value-of select="."/> + </td> + </tr> + </xsl:for-each> <tr> - <th> - <xsl:value-of select="@name"/> - </th> - <td> - <xsl:value-of select="."/> + <th class="totals">Total:</th> + <td class="totals"> + <xsl:value-of select="sum(server/counters[@type="opcode"]/counter)"/> </td> </tr> - </xsl:for-each> - <tr> - <th class="totals">Total:</th> - <td class="totals"> - <xsl:value-of select="sum(server/counters[@type="opcode"]/counter)"/> - </td> - </tr> - </table> - <br/> - <h3>Incoming Queries by Type</h3> - <xsl:if test="system-property('xsl:vendor')!='Transformiix'"> - <!-- Non Mozilla specific markup --> - <div class="pie" id="chart_incoming_qtypes">[no incoming queries]</div> + </table> + <br/> </xsl:if> - <table class="counters"> - <xsl:for-each select="server/counters[@type="qtype"]/counter"> - <xsl:sort select="." data-type="number" order="descending"/> - <xsl:variable name="css-class"> - <xsl:choose> - <xsl:when test="position() mod 2 = 0">even</xsl:when> - <xsl:otherwise>odd</xsl:otherwise> - </xsl:choose> - </xsl:variable> - <tr class="{$css-class}"> - <th> - <xsl:value-of select="@name"/> - </th> - <td> - <xsl:value-of select="."/> + <xsl:if test="server/counters[@type="qtype"]/counter"> + <xsl:if test="system-property('xsl:vendor')!='Transformiix'"> + <!-- Non Mozilla specific markup --> + <h3>Incoming Queries by Query Type</h3> + <div class="pie" id="chart_incoming_qtypes"> + [cannot display chart] + </div> + </xsl:if> + <table class="counters"> + <xsl:for-each select="server/counters[@type="qtype"]/counter"> + <xsl:sort select="." data-type="number" order="descending"/> + <xsl:variable name="css-class"> + <xsl:choose> + <xsl:when test="position() mod 2 = 0">even</xsl:when> + <xsl:otherwise>odd</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <tr class="{$css-class}"> + <th> + <xsl:value-of select="@name"/> + </th> + <td> + <xsl:value-of select="."/> + </td> + </tr> + </xsl:for-each> + <tr> + <th class="totals">Total:</th> + <td class="totals"> + <xsl:value-of select="sum(server/counters[@type="qtype"]/counter)"/> </td> </tr> + </table> + <br/> + </xsl:if> + <xsl:if test="views/view[count(counters[@type="resqtype"]/counter) > 0]"> + <h2>Outgoing Queries per view</h2> + <xsl:for-each select="views/view[count(counters[@type="resqtype"]/counter) > 0]"> + <h3>View <xsl:value-of select="@name"/></h3> + <xsl:if test="system-property('xsl:vendor')!='Transformiix'"> + <!-- Non Mozilla specific markup --> + <script type="text/javascript"> + graphs.push({ + 'title': "Outgoing Queries for view: <xsl:value-of select="@name"/>", + 'target': 'chart_outgoing_queries_view_<xsl:value-of select="@name"/>', + 'style': 'barchart', + 'data': [['Type','Counter'],<xsl:for-each select="counters[@type="resqtype"]/counter">['<xsl:value-of select="@name"/>',<xsl:value-of select="."/>],</xsl:for-each>] + }); + </script> + <xsl:variable name="target"> + <xsl:value-of select="@name"/> + </xsl:variable> + <div class="pie" id="chart_outgoing_queries_view_{$target}">[no data to display]</div> + </xsl:if> + <table class="counters"> + <xsl:for-each select="counters[@type="resqtype"]/counter"> + <xsl:sort select="." data-type="number" order="descending"/> + <xsl:variable name="css-class1"> + <xsl:choose> + <xsl:when test="position() mod 2 = 0">even</xsl:when> + <xsl:otherwise>odd</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <tr class="{$css-class1}"> + <th> + <xsl:value-of select="@name"/> + </th> + <td> + <xsl:value-of select="."/> + </td> + </tr> + </xsl:for-each> + </table> + <br/> </xsl:for-each> - <tr> - <th class="totals">Total:</th> - <td class="totals"> - <xsl:value-of select="sum(server/counters[@type="qtype"]/counter)"/> - </td> - </tr> - </table> - <br/> - <h2>Outgoing Queries per view</h2> - <xsl:for-each select="views/view[count(counters[@type="resqtype"]/counter) > 0]"> - <h3>View <xsl:value-of select="@name"/></h3> + </xsl:if> + <xsl:if test="server/counters[@type="nsstat"]/counter[.>0]"> + <h2>Server Statistics</h2> <xsl:if test="system-property('xsl:vendor')!='Transformiix'"> <!-- Non Mozilla specific markup --> <script type="text/javascript"> - graphs.push({ - 'title': "Outgoing queries for view: <xsl:value-of select="@name"/>", - 'target': 'chart_outgoing_queries_view_<xsl:value-of select="@name"/>', - 'data': [['Type','Counter'],<xsl:for-each select="counters[@type="resqtype"]/counter">['<xsl:value-of select="@name"/>',<xsl:value-of select="."/>],</xsl:for-each>] - }); - - </script> - <xsl:variable name="target"> - <xsl:value-of select="@name"/> - </xsl:variable> - <div class="pie" id="chart_outgoing_queries_view_{$target}"/> + graphs.push({ + 'title' : "Server Counters", + 'target': 'chart_server_nsstat_restype', + 'style': 'barchart', + 'data': [['Type','Counter'],<xsl:for-each select="server/counters[@type="nsstat"]/counter[.>0]">['<xsl:value-of select="@name"/>',<xsl:value-of select="."/>],</xsl:for-each>] + }); + </script> + <div class="pie" id="chart_server_nsstat_restype">[no data to display]</div> </xsl:if> <table class="counters"> - <xsl:for-each select="counters[@type="resqtype"]/counter"> + <xsl:for-each select="server/counters[@type="nsstat"]/counter[.>0]"> <xsl:sort select="." data-type="number" order="descending"/> - <xsl:variable name="css-class1"> + <xsl:variable name="css-class2"> <xsl:choose> <xsl:when test="position() mod 2 = 0">even</xsl:when> <xsl:otherwise>odd</xsl:otherwise> </xsl:choose> </xsl:variable> - <tr class="{$css-class1}"> + <tr class="{$css-class2}"> <th> <xsl:value-of select="@name"/> </th> @@ -299,104 +423,53 @@ </xsl:for-each> </table> <br/> - </xsl:for-each> - <h2>Server Statistics</h2> - <xsl:if test="system-property('xsl:vendor')!='Transformiix'"> - <!-- Non Mozilla specific markup --> - <script type="text/javascript"> - graphs.push({ - 'title' : "Server Counters", - 'target': 'chart_server_nsstat_restype', - 'data': [['Type','Counter'],<xsl:for-each select="server/counters[@type="nsstat"]/counter[.>0]">['<xsl:value-of select="@name"/>',<xsl:value-of select="."/>],</xsl:for-each>] - }); - - </script> - <div class="pie" id="chart_server_nsstat_restype"/> </xsl:if> - <table class="counters"> - <xsl:for-each select="server/counters[@type="nsstat"]/counter[.>0]"> - <xsl:sort select="." data-type="number" order="descending"/> - <xsl:variable name="css-class2"> - <xsl:choose> - <xsl:when test="position() mod 2 = 0">even</xsl:when> - <xsl:otherwise>odd</xsl:otherwise> - </xsl:choose> - </xsl:variable> - <tr class="{$css-class2}"> - <th> - <xsl:value-of select="@name"/> - </th> - <td> - <xsl:value-of select="."/> - </td> - </tr> - </xsl:for-each> - </table> - <br/> - <h2>Zone Maintenance Statistics</h2> - <xsl:if test="system-property('xsl:vendor')!='Transformiix'"> - <script type="text/javascript"> - graphs.push({ - 'title' : "Zone Maintenance Stats", - 'target': 'chart_server_zone_maint', - 'data': [['Type','Counter'],<xsl:for-each select="server/counters[@type="zonestat"]/counter">['<xsl:value-of select="@name"/>',<xsl:value-of select="."/>],</xsl:for-each>] - }); - - </script> - <!-- Non Mozilla specific markup --> - <div class="pie" id="chart_server_zone_maint"/> + <xsl:if test="server/counters[@type="zonestat"]/counter[.>0]"> + <xsl:if test="system-property('xsl:vendor')!='Transformiix'"> + <h2>Zone Maintenance Statistics</h2> + <script type="text/javascript"> + graphs.push({ + 'title' : "Zone Maintenance Stats", + 'target': 'chart_server_zone_maint', + 'style': 'barchart', + 'data': [['Type','Counter'],<xsl:for-each select="server/counters[@type="zonestat"]/counter[.>0]">['<xsl:value-of select="@name"/>',<xsl:value-of select="."/>],</xsl:for-each>] + }); + </script> + <!-- Non Mozilla specific markup --> + <div class="pie" id="chart_server_zone_maint">[no data to display]</div> + </xsl:if> + <table class="counters"> + <xsl:for-each select="server/counters[@type="zonestat"]/counter"> + <xsl:sort select="." data-type="number" order="descending"/> + <xsl:variable name="css-class3"> + <xsl:choose> + <xsl:when test="position() mod 2 = 0">even</xsl:when> + <xsl:otherwise>odd</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <tr class="{$css-class3}"> + <th> + <xsl:value-of select="@name"/> + </th> + <td> + <xsl:value-of select="."/> + </td> + </tr> + </xsl:for-each> + </table> </xsl:if> - <table class="counters"> - <xsl:for-each select="server/counters[@type="zonestat"]/counter"> - <xsl:sort select="." data-type="number" order="descending"/> - <xsl:variable name="css-class3"> - <xsl:choose> - <xsl:when test="position() mod 2 = 0">even</xsl:when> - <xsl:otherwise>odd</xsl:otherwise> - </xsl:choose> - </xsl:variable> - <tr class="{$css-class3}"> - <th> - <xsl:value-of select="@name"/> - </th> - <td> - <xsl:value-of select="."/> - </td> - </tr> - </xsl:for-each> - </table> - <h2>Resolver Statistics (Common)</h2> - <table class="counters"> - <xsl:for-each select="server/counters[@type="restat"]/counter"> - <xsl:sort select="." data-type="number" order="descending"/> - <xsl:variable name="css-class4"> - <xsl:choose> - <xsl:when test="position() mod 2 = 0">even</xsl:when> - <xsl:otherwise>odd</xsl:otherwise> - </xsl:choose> - </xsl:variable> - <tr class="{$css-class4}"> - <th> - <xsl:value-of select="@name"/> - </th> - <td> - <xsl:value-of select="."/> - </td> - </tr> - </xsl:for-each> - </table> - <xsl:for-each select="views/view"> - <h3>Resolver Statistics for View <xsl:value-of select="@name"/></h3> + <xsl:if test="server/counters[@type="resstat"]/counter[.>0]"> + <h2>Resolver Statistics (Common)</h2> <table class="counters"> - <xsl:for-each select="counters[@type="resstats"]/counter[.>0]"> + <xsl:for-each select="server/counters[@type="resstat"]/counter"> <xsl:sort select="." data-type="number" order="descending"/> - <xsl:variable name="css-class5"> + <xsl:variable name="css-class4"> <xsl:choose> <xsl:when test="position() mod 2 = 0">even</xsl:when> <xsl:otherwise>odd</xsl:otherwise> </xsl:choose> </xsl:variable> - <tr class="{$css-class5}"> + <tr class="{$css-class4}"> <th> <xsl:value-of select="@name"/> </th> @@ -406,330 +479,375 @@ </tr> </xsl:for-each> </table> + </xsl:if> + <xsl:for-each select="views/view"> + <xsl:if test="counters[@type="resstats"]/counter[.>0]"> + <h3>Resolver Statistics for View <xsl:value-of select="@name"/></h3> + <table class="counters"> + <xsl:for-each select="counters[@type="resstats"]/counter[.>0]"> + <xsl:sort select="." data-type="number" order="descending"/> + <xsl:variable name="css-class5"> + <xsl:choose> + <xsl:when test="position() mod 2 = 0">even</xsl:when> + <xsl:otherwise>odd</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <tr class="{$css-class5}"> + <th> + <xsl:value-of select="@name"/> + </th> + <td> + <xsl:value-of select="."/> + </td> + </tr> + </xsl:for-each> + </table> + </xsl:if> </xsl:for-each> - <h3>Cache DB RRsets for View <xsl:value-of select="@name"/></h3> + <xsl:for-each select="views/view"> + <xsl:if test="cache/rrset"> + <h3>Cache DB RRsets for View <xsl:value-of select="@name"/></h3> + <table class="counters"> + <xsl:for-each select="cache/rrset"> + <xsl:variable name="css-class6"> + <xsl:choose> + <xsl:when test="position() mod 2 = 0">even</xsl:when> + <xsl:otherwise>odd</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <tr class="{$css-class6}"> + <th> + <xsl:value-of select="name"/> + </th> + <td> + <xsl:value-of select="counter"/> + </td> + </tr> + </xsl:for-each> + </table> + <br/> + </xsl:if> + </xsl:for-each> + + <xsl:if test="server/counters[@type="sockstat"]/counter[.>0]"> + <h2>Socket I/O Statistics</h2> <table class="counters"> - <xsl:for-each select="cache/rrset"> - <xsl:variable name="css-class6"> + <xsl:for-each select="server/counters[@type="sockstat"]/counter[.>0]"> + <xsl:variable name="css-class7"> <xsl:choose> <xsl:when test="position() mod 2 = 0">even</xsl:when> <xsl:otherwise>odd</xsl:otherwise> </xsl:choose> </xsl:variable> - <tr class="{$css-class6}"> + <tr class="{$css-class7}"> <th> - <xsl:value-of select="name"/> + <xsl:value-of select="@name"/> </th> <td> - <xsl:value-of select="counter"/> + <xsl:value-of select="."/> </td> </tr> </xsl:for-each> </table> <br/> - </xsl:for-each> - <h2>Socket I/O Statistics</h2> - <table class="counters"> - <xsl:for-each select="server/counters[@type="sockstat"]/counter[.>0]"> - <xsl:variable name="css-class7"> - <xsl:choose> - <xsl:when test="position() mod 2 = 0">even</xsl:when> - <xsl:otherwise>odd</xsl:otherwise> - </xsl:choose> + </xsl:if> + <xsl:if test="views/view[zones/zone/counters[@type="rcode"]/counter >0]"> + <h2>Response Codes per view/zone</h2> + <xsl:for-each select="views/view[zones/zone/counters[@type="rcode"]/counter >0]"> + <h3>View <xsl:value-of select="@name"/></h3> + <xsl:variable name="thisview"> + <xsl:value-of select="@name"/> </xsl:variable> - <tr class="{$css-class7}"> - <th> - <xsl:value-of select="@name"/> - </th> - <td> - <xsl:value-of select="."/> - </td> - </tr> - </xsl:for-each> - </table> - <br/> - <br/> - <h2>Response Codes per view/zone</h2> - <xsl:for-each select="views/view[zones/zone/counters[@type="rcode"]/counter >0]"> - <h3>View <xsl:value-of select="@name"/></h3> - <xsl:variable name="thisview"> - <xsl:value-of select="@name"/> - </xsl:variable> - <xsl:for-each select="zones/zone"> - <xsl:if test="counters[@type="rcode"]/counter[. > 0]"> - <h4>Zone <xsl:value-of select="@name"/></h4> - <xsl:if test="system-property('xsl:vendor')!='Transformiix'"> - <!-- Non Mozilla specific markup --> - <script type="text/javascript"> - graphs.push({ - 'title': "Response Codes for zone <xsl:value-of select="@name"/>", - 'target': 'chart_rescode_<xsl:value-of select="../../@name"/>_<xsl:value-of select="@name"/>', - 'data': [['Type','Counter'],<xsl:for-each select="counters[@type="rcode"]/counter[.>0 and @name != "QryAuthAns"]">['<xsl:value-of select="@name"/>',<xsl:value-of select="."/>],</xsl:for-each>] - }); - - </script> - <xsl:variable name="target"> - <xsl:value-of select="@name"/> - </xsl:variable> - <div class="pie" id="chart_rescode_{$thisview}_{$target}"/> + <xsl:for-each select="zones/zone"> + <xsl:if test="counters[@type="rcode"]/counter[. > 0]"> + <h4>Zone <xsl:value-of select="@name"/></h4> + <xsl:if test="system-property('xsl:vendor')!='Transformiix'"> + <!-- Non Mozilla specific markup --> + <script type="text/javascript"> + graphs.push({ + 'title': "Response Codes for zone <xsl:value-of select="@name"/>", + 'target': 'chart_rescode_<xsl:value-of select="../../@name"/>_<xsl:value-of select="@name"/>', + 'style': 'barchart', + 'data': [['Type','Counter'],<xsl:for-each select="counters[@type="rcode"]/counter[.>0 and @name != "QryAuthAns"]">['<xsl:value-of select="@name"/>',<xsl:value-of select="."/>],</xsl:for-each>] + }); + + </script> + <xsl:variable name="target"> + <xsl:value-of select="@name"/> + </xsl:variable> + <div class="pie" id="chart_rescode_{$thisview}_{$target}">[no data to display]</div> + </xsl:if> + <table class="counters"> + <xsl:for-each select="counters[@type="rcode"]/counter[.>0 and @name != "QryAuthAns"]"> + <xsl:sort select="."/> + <xsl:variable name="css-class10"> + <xsl:choose> + <xsl:when test="position() mod 2 = 0">even</xsl:when> + <xsl:otherwise>odd</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <tr class="{$css-class10}"> + <th> + <xsl:value-of select="@name"/> + </th> + <td> + <xsl:value-of select="."/> + </td> + </tr> + </xsl:for-each> + </table> </xsl:if> - <table class="counters"> - <xsl:for-each select="counters[@type="rcode"]/counter[.>0 and @name != "QryAuthAns"]"> - <xsl:sort select="."/> - <xsl:variable name="css-class10"> - <xsl:choose> - <xsl:when test="position() mod 2 = 0">even</xsl:when> - <xsl:otherwise>odd</xsl:otherwise> - </xsl:choose> - </xsl:variable> - <tr class="{$css-class10}"> - <th> - <xsl:value-of select="@name"/> - </th> - <td> - <xsl:value-of select="."/> - </td> - </tr> - </xsl:for-each> - </table> - </xsl:if> + </xsl:for-each> </xsl:for-each> - </xsl:for-each> - <h2>Received QTYPES per view/zone</h2> - <xsl:for-each select="views/view[zones/zone/counters[@type="qtype"]/counter >0]"> - <h3>View <xsl:value-of select="@name"/></h3> - <xsl:variable name="thisview2"> - <xsl:value-of select="@name"/> - </xsl:variable> - <xsl:for-each select="zones/zone"> - <xsl:if test="counters[@type="qtype"]/counter[count(.) > 0]"> - <h4>Zone <xsl:value-of select="@name"/></h4> - <xsl:if test="system-property('xsl:vendor')!='Transformiix'"> - <!-- Non Mozilla specific markup --> - <script type="text/javascript"> - graphs.push({ - 'title': "Query Types for zone <xsl:value-of select="@name"/>", - 'target': 'chart_qtype_<xsl:value-of select="../../@name"/>_<xsl:value-of select="@name"/>', - 'data': [['Type','Counter'],<xsl:for-each select="counters[@type="qtype"]/counter[.>0 and @name != "QryAuthAns"]">['<xsl:value-of select="@name"/>',<xsl:value-of select="."/>],</xsl:for-each>] - }); - - </script> - <xsl:variable name="target"> - <xsl:value-of select="@name"/> - </xsl:variable> - <div class="pie" id="chart_qtype_{$thisview2}_{$target}"/> + </xsl:if> + <xsl:if test="views/view[zones/zone/counters[@type="qtype"]/counter >0]"> + <h2>Received QTYPES per view/zone</h2> + <xsl:for-each select="views/view[zones/zone/counters[@type="qtype"]/counter >0]"> + <h3>View <xsl:value-of select="@name"/></h3> + <xsl:variable name="thisview2"> + <xsl:value-of select="@name"/> + </xsl:variable> + <xsl:for-each select="zones/zone"> + <xsl:if test="counters[@type="qtype"]/counter[count(.) > 0]"> + <h4>Zone <xsl:value-of select="@name"/></h4> + <xsl:if test="system-property('xsl:vendor')!='Transformiix'"> + <!-- Non Mozilla specific markup --> + <script type="text/javascript"> + graphs.push({ + 'title': "Query Types for zone <xsl:value-of select="@name"/>", + 'target': 'chart_qtype_<xsl:value-of select="../../@name"/>_<xsl:value-of select="@name"/>', + 'style': 'barchart', + 'data': [['Type','Counter'],<xsl:for-each select="counters[@type="qtype"]/counter[.>0 and @name != "QryAuthAns"]">['<xsl:value-of select="@name"/>',<xsl:value-of select="."/>],</xsl:for-each>] + }); + + </script> + <xsl:variable name="target"> + <xsl:value-of select="@name"/> + </xsl:variable> + <div class="pie" id="chart_qtype_{$thisview2}_{$target}">[no data to display]</div> + </xsl:if> + <table class="counters"> + <xsl:for-each select="counters[@type="qtype"]/counter"> + <xsl:sort select="."/> + <xsl:variable name="css-class11"> + <xsl:choose> + <xsl:when test="position() mod 2 = 0">even</xsl:when> + <xsl:otherwise>odd</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <tr class="{$css-class11}"> + <th> + <xsl:value-of select="@name"/> + </th> + <td> + <xsl:value-of select="."/> + </td> + </tr> + </xsl:for-each> + </table> </xsl:if> - <table class="counters"> - <xsl:for-each select="counters[@type="qtype"]/counter"> - <xsl:sort select="."/> - <xsl:variable name="css-class11"> - <xsl:choose> - <xsl:when test="position() mod 2 = 0">even</xsl:when> - <xsl:otherwise>odd</xsl:otherwise> - </xsl:choose> - </xsl:variable> - <tr class="{$css-class11}"> - <th> - <xsl:value-of select="@name"/> - </th> - <td> - <xsl:value-of select="."/> - </td> - </tr> - </xsl:for-each> - </table> - </xsl:if> + </xsl:for-each> </xsl:for-each> - </xsl:for-each> - <h2>Network Status</h2> - <table class="counters"> - <tr> - <th>ID</th> - <th>Name</th> - <th>Type</th> - <th>References</th> - <th>LocalAddress</th> - <th>PeerAddress</th> - <th>State</th> - </tr> - <xsl:for-each select="socketmgr/sockets/socket"> - <xsl:sort select="id"/> - <xsl:variable name="css-class12"> - <xsl:choose> - <xsl:when test="position() mod 2 = 0">even</xsl:when> - <xsl:otherwise>odd</xsl:otherwise> - </xsl:choose> - </xsl:variable> - <tr class="{$css-class12}"> - <td> - <xsl:value-of select="id"/> - </td> - <td> - <xsl:value-of select="name"/> - </td> - <td> - <xsl:value-of select="type"/> - </td> - <td> - <xsl:value-of select="references"/> - </td> - <td> - <xsl:value-of select="local-address"/> - </td> - <td> - <xsl:value-of select="peer-address"/> - </td> - <td> - <xsl:for-each select="states"> - <xsl:value-of select="."/> - </xsl:for-each> - </td> + </xsl:if> + <xsl:if test="socketmgr/sockets/socket"> + <h2>Network Status</h2> + <table class="netstat"> + <tr> + <th>ID</th> + <th>Name</th> + <th>Type</th> + <th>References</th> + <th>LocalAddress</th> + <th>PeerAddress</th> + <th>State</th> </tr> - </xsl:for-each> - </table> - <br/> - <h2>Task Manager Configuration</h2> - <table class="counters"> - <tr> - <th class="even">Thread-Model</th> - <td> - <xsl:value-of select="taskmgr/thread-model/type"/> - </td> - </tr> - <tr class="odd"> - <th>Worker Threads</th> - <td> - <xsl:value-of select="taskmgr/thread-model/worker-threads"/> - </td> - </tr> - <tr class="even"> - <th>Default Quantum</th> - <td> - <xsl:value-of select="taskmgr/thread-model/default-quantum"/> - </td> - </tr> - <tr class="odd"> - <th>Tasks Running</th> - <td> - <xsl:value-of select="taskmgr/thread-model/tasks-running"/> - </td> - </tr> - </table> - <br/> - <h2>Tasks</h2> - <table class="counters"> - <tr> - <th>ID</th> - <th>Name</th> - <th>References</th> - <th>State</th> - <th>Quantum</th> - </tr> - <xsl:for-each select="taskmgr/tasks/task"> - <xsl:sort select="name"/> - <xsl:variable name="css-class14"> - <xsl:choose> - <xsl:when test="position() mod 2 = 0">even</xsl:when> - <xsl:otherwise>odd</xsl:otherwise> - </xsl:choose> - </xsl:variable> - <tr class="{$css-class14}"> - <td> - <xsl:value-of select="id"/> - </td> - <td> - <xsl:value-of select="name"/> - </td> - <td> - <xsl:value-of select="references"/> - </td> - <td> - <xsl:value-of select="state"/> - </td> + <xsl:for-each select="socketmgr/sockets/socket"> + <xsl:sort select="id"/> + <xsl:variable name="css-class12"> + <xsl:choose> + <xsl:when test="position() mod 2 = 0">even</xsl:when> + <xsl:otherwise>odd</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <tr class="{$css-class12}"> + <td> + <xsl:value-of select="id"/> + </td> + <td> + <xsl:value-of select="name"/> + </td> + <td> + <xsl:value-of select="type"/> + </td> + <td> + <xsl:value-of select="references"/> + </td> + <td> + <xsl:value-of select="local-address"/> + </td> + <td> + <xsl:value-of select="peer-address"/> + </td> + <td> + <xsl:for-each select="states"> + <xsl:value-of select="."/> + </xsl:for-each> + </td> + </tr> + </xsl:for-each> + </table> + <br/> + </xsl:if> + <xsl:if test="taskmgr/thread-model/type"> + <h2>Task Manager Configuration</h2> + <table class="counters"> + <tr> + <th class="even">Thread-Model</th> <td> - <xsl:value-of select="quantum"/> + <xsl:value-of select="taskmgr/thread-model/type"/> </td> </tr> - </xsl:for-each> - </table> - <br/> - <h2>Memory Usage Summary</h2> - <table class="counters"> - <xsl:for-each select="memory/summary/*"> - <xsl:variable name="css-class13"> - <xsl:choose> - <xsl:when test="position() mod 2 = 0">even</xsl:when> - <xsl:otherwise>odd</xsl:otherwise> - </xsl:choose> - </xsl:variable> - <tr class="{$css-class13}"> - <th> - <xsl:value-of select="name()"/> - </th> + <tr class="odd"> + <th>Worker Threads</th> <td> - <xsl:value-of select="."/> + <xsl:value-of select="taskmgr/thread-model/worker-threads"/> </td> </tr> - </xsl:for-each> - </table> - <br/> - <h2>Memory Contexts</h2> - <table class="counters"> - <tr> - <th>ID</th> - <th>Name</th> - <th>References</th> - <th>TotalUse</th> - <th>InUse</th> - <th>MaxUse</th> - <th>BlockSize</th> - <th>Pools</th> - <th>HiWater</th> - <th>LoWater</th> - </tr> - <xsl:for-each select="memory/contexts/context"> - <xsl:sort select="total" data-type="number" order="descending"/> - <xsl:variable name="css-class14"> - <xsl:choose> - <xsl:when test="position() mod 2 = 0">even</xsl:when> - <xsl:otherwise>odd</xsl:otherwise> - </xsl:choose> - </xsl:variable> - <tr class="{$css-class14}"> - <td> - <xsl:value-of select="id"/> - </td> - <td> - <xsl:value-of select="name"/> - </td> - <td> - <xsl:value-of select="references"/> - </td> - <td> - <xsl:value-of select="total"/> - </td> - <td> - <xsl:value-of select="inuse"/> - </td> - <td> - <xsl:value-of select="maxinuse"/> - </td> - <td> - <xsl:value-of select="blocksize"/> - </td> - <td> - <xsl:value-of select="pools"/> - </td> + <tr class="even"> + <th>Default Quantum</th> <td> - <xsl:value-of select="hiwater"/> + <xsl:value-of select="taskmgr/thread-model/default-quantum"/> </td> + </tr> + <tr class="odd"> + <th>Tasks Running</th> <td> - <xsl:value-of select="lowater"/> + <xsl:value-of select="taskmgr/thread-model/tasks-running"/> </td> </tr> - </xsl:for-each> - </table> + </table> + <br/> + </xsl:if> + <xsl:if test="taskmgr/tasks/task"> + <h2>Tasks</h2> + <table class="tasks"> + <tr> + <th>ID</th> + <th>Name</th> + <th>References</th> + <th>State</th> + <th>Quantum</th> + </tr> + <xsl:for-each select="taskmgr/tasks/task"> + <xsl:sort select="name"/> + <xsl:variable name="css-class14"> + <xsl:choose> + <xsl:when test="position() mod 2 = 0">even</xsl:when> + <xsl:otherwise>odd</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <tr class="{$css-class14}"> + <td> + <xsl:value-of select="id"/> + </td> + <td> + <xsl:value-of select="name"/> + </td> + <td> + <xsl:value-of select="references"/> + </td> + <td> + <xsl:value-of select="state"/> + </td> + <td> + <xsl:value-of select="quantum"/> + </td> + </tr> + </xsl:for-each> + </table> + <br/> + </xsl:if> + <xsl:if test="memory/summary"> + <h2>Memory Usage Summary</h2> + <table class="counters"> + <xsl:for-each select="memory/summary/*"> + <xsl:variable name="css-class13"> + <xsl:choose> + <xsl:when test="position() mod 2 = 0">even</xsl:when> + <xsl:otherwise>odd</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <tr class="{$css-class13}"> + <th> + <xsl:value-of select="name()"/> + </th> + <td> + <xsl:value-of select="."/> + </td> + </tr> + </xsl:for-each> + </table> + <br/> + </xsl:if> + <xsl:if test="memory/contexts/context"> + <h2>Memory Contexts</h2> + <table class="mctx"> + <tr> + <th>ID</th> + <th>Name</th> + <th>References</th> + <th>TotalUse</th> + <th>InUse</th> + <th>MaxUse</th> + <th>BlockSize</th> + <th>Pools</th> + <th>HiWater</th> + <th>LoWater</th> + </tr> + <xsl:for-each select="memory/contexts/context"> + <xsl:sort select="total" data-type="number" order="descending"/> + <xsl:variable name="css-class14"> + <xsl:choose> + <xsl:when test="position() mod 2 = 0">even</xsl:when> + <xsl:otherwise>odd</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <tr class="{$css-class14}"> + <td> + <xsl:value-of select="id"/> + </td> + <td> + <xsl:value-of select="name"/> + </td> + <td> + <xsl:value-of select="references"/> + </td> + <td> + <xsl:value-of select="total"/> + </td> + <td> + <xsl:value-of select="inuse"/> + </td> + <td> + <xsl:value-of select="maxinuse"/> + </td> + <td> + <xsl:value-of select="blocksize"/> + </td> + <td> + <xsl:value-of select="pools"/> + </td> + <td> + <xsl:value-of select="hiwater"/> + </td> + <td> + <xsl:value-of select="lowater"/> + </td> + </tr> + </xsl:for-each> + </table> + </xsl:if> <hr/> <p class="footer">Internet Systems Consortium Inc.<br/><a href="http://www.isc.org">http://www.isc.org</a></p> </body> diff --git a/bin/named/bind9.ver3.xsl.h b/bin/named/bind9.ver3.xsl.h index c55714a6..371e69c7 100644 --- a/bin/named/bind9.ver3.xsl.h +++ b/bin/named/bind9.ver3.xsl.h @@ -5,7 +5,7 @@ static char xslmsg[] = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" "<!--\n" - " - Copyright (C) 2006-2009 Internet Systems Consortium, Inc. (\"ISC\")\n" + " - Copyright (C) 2012-2014 Internet Systems Consortium, Inc. (\"ISC\")\n" " -\n" " - Permission to use, copy, modify, and/or distribute this software for any\n" " - purpose with or without fee is hereby granted, provided that the above\n" @@ -19,63 +19,67 @@ static char xslmsg[] = " - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\n" " - PERFORMANCE OF THIS SOFTWARE.\n" "-->\n" + "\n" + "<!-- $Id$ -->\n" + "\n" "<!-- \045Id: bind9.xsl,v 1.21 2009/01/27 23:47:54 tbox Exp \045 -->\n" "<xsl:stylesheet xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" xmlns=\"http://www.w3.org/1999/xhtml\" version=\"1.0\">\n" " <xsl:output method=\"html\" indent=\"yes\" version=\"4.0\"/>\n" - " <xsl:template match=\"statistics[@version="3.0"]\">\n" + " <xsl:template match=\"statistics[@version="3.3"]\">\n" " <html>\n" " <head>\n" " <xsl:if test=\"system-property('xsl:vendor')!='Transformiix'\">\n" " <!-- Non Mozilla specific markup -->\n" " <script type=\"text/javascript\" src=\"https://www.google.com/jsapi\"/>\n" " <script type=\"text/javascript\">\n" - " \n" + "\n" " google.load(\"visualization\", \"1\", {packages:[\"corechart\"]});\n" " google.setOnLoadCallback(loadGraphs);\n" "\n" " var graphs=[];\n" - " \n" - " function drawChart(chart_title,target,data) {\n" + "\n" + " function drawChart(chart_title,target,style,data) {\n" " var data = google.visualization.arrayToDataTable(data);\n" "\n" " var options = {\n" " title: chart_title\n" " };\n" - " \n" - " var chart = new google.visualization.BarChart(document.getElementById(target));\n" + "\n" + " var chart;\n" + " if (style == \"barchart\") {\n" + " chart = new google.visualization.BarChart(document.getElementById(target));\n" + " chart.draw(data, options);\n" + " } else if (style == \"piechart\") {\n" + " chart = new google.visualization.PieChart(document.getElementById(target));\n" " chart.draw(data, options);\n" " }\n" - " \n" + " }\n" + "\n" " function loadGraphs(){\n" - " //alert(\"here we are!\");\n" " var g;\n" - " \n" - " // Server Incoming query Types\n" + "\n" " while(g = graphs.shift()){\n" " // alert(\"going for: \" + g.target);\n" " if(g.data.length > 1){\n" - " drawChart(g.title,g.target,g.data);\n" + " drawChart(g.title,g.target,g.style,g.data);\n" " }\n" " }\n" " }\n" - " \n" - " // Server Incoming Queries Types \n" + "\n" + " // Server Incoming Query Types \n" " graphs.push({\n" " 'title' : \"Server Incoming Query Types\",\n" " 'target': 'chart_incoming_qtypes',\n" + " 'style': 'barchart',\n" " 'data': [['Type','Counter'],<xsl:for-each select=\"server/counters[@type="qtype"]/counter\">['<xsl:value-of select=\"@name\"/>',<xsl:value-of select=\".\"/>],</xsl:for-each>]\n" " });\n" "\n" - "\n" - " // Server Incoming Requests \n" + " // Server Incoming Requests by opcode\n" " graphs.push({\n" - " 'title' : \"Server Incoming Requests\",\n" - " 'target': 'chart_incoming_requests',\n" - " 'data': [['Requests','Counter'],<xsl:for-each select=\"server/counters[@type="opcode"]/counter\">['<xsl:value-of select=\"@name\"/>',<xsl:value-of select=\".\"/>],</xsl:for-each>]});\n" - " \n" - " \n" - " \n" - " \n" + " 'title' : \"Server Incoming Requests by DNS Opcode\",\n" + " 'target': 'chart_incoming_opcodes',\n" + " 'style': 'barchart',\n" + " 'data': [['Opcode','Counter'],<xsl:for-each select=\"server/counters[@type="opcode"]/counter[. > 0 or substring(@name,1,3) != 'RES']\">['<xsl:value-of select=\"@name\"/>',<xsl:value-of select=\".\"/>],</xsl:for-each>]});\n" " </script>\n" " </xsl:if>\n" " <style type=\"text/css\">\n" @@ -85,15 +89,15 @@ static char xslmsg[] = " color: #000000;\n" " font-size: 10pt;\n" " }\n" - " \n" + "\n" " .odd{\n" " background-color: #f0f0f0;\n" " }\n" - " \n" + "\n" " .even{\n" " background-color: #ffffff;\n" " }\n" - " \n" + "\n" " p.footer{\n" " font-style:italic;\n" " color: grey;\n" @@ -108,21 +112,101 @@ static char xslmsg[] = " border: 1px solid grey;\n" " width: 500px;\n" " }\n" - " \n" " table.counters th {\n" - " text-align: center;\n" + " text-align: right;\n" " border: 1px solid grey;\n" - " width: 120px;\n" + " width: 150px;\n" " }\n" - " table.counters td{\n" - " text-align:center;\n" - " \n" + " table.counters td {\n" + " text-align: right;\n" + " font-family: monospace;\n" " }\n" - " \n" " table.counters tr:hover{\n" " background-color: #99ddff;\n" " }\n" - " \n" + "\n" + " table.info {\n" + " border: 1px solid grey;\n" + " width: 500px;\n" + " }\n" + " table.info th {\n" + " text-align: center;\n" + " border: 1px solid grey;\n" + " width: 150px;\n" + " }\n" + " table.info td {\n" + " text-align: center;\n" + " }\n" + " table.info tr:hover{\n" + " background-color: #99ddff;\n" + " }\n" + "\n" + " table.tasks {\n" + " border: 1px solid grey;\n" + " width: 500px;\n" + " }\n" + " table.tasks th {\n" + " text-align: center;\n" + " border: 1px solid grey;\n" + " width: 150px;\n" + " }\n" + " table.tasks td {\n" + " text-align: right;\n" + " font-family: monospace;\n" + " }\n" + " table.tasks td:nth-child(2) {\n" + " text-align: center;\n" + " }\n" + " table.tasks td:nth-child(4) {\n" + " text-align: center;\n" + " }\n" + " table.tasks tr:hover{\n" + " background-color: #99ddff;\n" + " }\n" + "\n" + " table.netstat {\n" + " border: 1px solid grey;\n" + " width: 500px;\n" + " }\n" + " table.netstat th {\n" + " text-align: center;\n" + " border: 1px solid grey;\n" + " width: 150px;\n" + " }\n" + " table.netstat td {\n" + " text-align: center;\n" + " }\n" + " table.netstat td:nth-child(4) {\n" + " text-align: right;\n" + " font-family: monospace;\n" + " }\n" + " table.netstat td:nth-child(7) {\n" + " text-align: left;\n" + " }\n" + " table.netstat tr:hover{\n" + " background-color: #99ddff;\n" + " }\n" + "\n" + " table.mctx {\n" + " border: 1px solid grey;\n" + " width: 500px;\n" + " }\n" + " table.mctx th {\n" + " text-align: center;\n" + " border: 1px solid grey;\n" + " }\n" + " table.mctx td {\n" + " text-align: right;\n" + " font-family: monospace;\n" + " }\n" + " table.mctx td:nth-child(-n+2) {\n" + " text-align: left;\n" + " width: 100px;\n" + " }\n" + " table.mctx tr:hover{\n" + " background-color: #99ddff;\n" + " }\n" + "\n" " .totals {\n" " background-color: rgb(1,169,206);\n" " color: #ffffff;\n" @@ -162,20 +246,18 @@ static char xslmsg[] = " width:500px;\n" " text-align:center;\n" " }\n" - " \n" + "\n" " h3 {\n" " color: #444444;\n" " font-size: 12pt;\n" " width:500px;\n" " text-align:center;\n" - " \n" " }\n" " h4 {\n" " color: rgb(1,169,206);\n" " font-size: 10pt;\n" " width:500px;\n" " text-align:center;\n" - " \n" " }\n" "\n" " .pie {\n" @@ -192,7 +274,7 @@ static char xslmsg[] = " </div>\n" " <hr/>\n" " <h2>Server Times</h2>\n" - " <table class=\"counters\">\n" + " <table class=\"info\">\n" " <tr>\n" " <th>Boot time:</th>\n" " <td>\n" @@ -200,20 +282,23 @@ static char xslmsg[] = " </td>\n" " </tr>\n" " <tr>\n" - " <th>Sample time:</th>\n" + " <th>Current time:</th>\n" " <td>\n" " <xsl:value-of select=\"server/current-time\"/>\n" " </td>\n" " </tr>\n" " </table>\n" " <br/>\n" - " <h2>Incoming Requests</h2>\n" + " <xsl:if test=\"server/counters[@type="opcode"]/counter[. > 0]\">\n" " <xsl:if test=\"system-property('xsl:vendor')!='Transformiix'\">\n" + " <h2>Incoming Requests by DNS Opcode</h2>\n" " <!-- Non Mozilla specific markup -->\n" - " <div class=\"pie\" id=\"chart_incoming_requests\">[graph incoming requests]</div>\n" + " <div class=\"pie\" id=\"chart_incoming_opcodes\">\n" + " [cannot display chart]\n" + " </div>\n" " </xsl:if>\n" " <table class=\"counters\">\n" - " <xsl:for-each select=\"server/counters[@type="opcode"]/counter\">\n" + " <xsl:for-each select=\"server/counters[@type="opcode"]/counter[. > 0 or substring(@name,1,3) != 'RES']\">\n" " <xsl:sort select=\".\" data-type=\"number\" order=\"descending\"/>\n" " <tr>\n" " <th>\n" @@ -232,10 +317,14 @@ static char xslmsg[] = " </tr>\n" " </table>\n" " <br/>\n" - " <h3>Incoming Queries by Type</h3>\n" + " </xsl:if>\n" + " <xsl:if test=\"server/counters[@type="qtype"]/counter\">\n" " <xsl:if test=\"system-property('xsl:vendor')!='Transformiix'\">\n" " <!-- Non Mozilla specific markup -->\n" - " <div class=\"pie\" id=\"chart_incoming_qtypes\">[graph incoming qtypes]</div>\n" + " <h3>Incoming Queries by Query Type</h3>\n" + " <div class=\"pie\" id=\"chart_incoming_qtypes\">\n" + " [cannot display chart]\n" + " </div>\n" " </xsl:if>\n" " <table class=\"counters\">\n" " <xsl:for-each select=\"server/counters[@type="qtype"]/counter\">\n" @@ -263,6 +352,8 @@ static char xslmsg[] = " </tr>\n" " </table>\n" " <br/>\n" + " </xsl:if>\n" + " <xsl:if test=\"views/view[count(counters[@type="resqtype"]/counter) > 0]\">\n" " <h2>Outgoing Queries per view</h2>\n" " <xsl:for-each select=\"views/view[count(counters[@type="resqtype"]/counter) > 0]\">\n" " <h3>View <xsl:value-of select=\"@name\"/></h3>\n" @@ -270,16 +361,16 @@ static char xslmsg[] = " <!-- Non Mozilla specific markup -->\n" " <script type=\"text/javascript\">\n" " graphs.push({\n" - " 'title': \"Outgoing queries for view: <xsl:value-of select=\"@name\"/>\",\n" + " 'title': \"Outgoing Queries for view: <xsl:value-of select=\"@name\"/>\",\n" " 'target': 'chart_outgoing_queries_view_<xsl:value-of select=\"@name\"/>',\n" + " 'style': 'barchart',\n" " 'data': [['Type','Counter'],<xsl:for-each select=\"counters[@type="resqtype"]/counter\">['<xsl:value-of select=\"@name\"/>',<xsl:value-of select=\".\"/>],</xsl:for-each>]\n" " });\n" - " \n" " </script>\n" " <xsl:variable name=\"target\">\n" " <xsl:value-of select=\"@name\"/>\n" " </xsl:variable>\n" - " <div class=\"pie\" id=\"chart_outgoing_queries_view_{$target}\"/>\n" + " <div class=\"pie\" id=\"chart_outgoing_queries_view_{$target}\">[no data to display]</div>\n" " </xsl:if>\n" " <table class=\"counters\">\n" " <xsl:for-each select=\"counters[@type="resqtype"]/counter\">\n" @@ -302,18 +393,20 @@ static char xslmsg[] = " </table>\n" " <br/>\n" " </xsl:for-each>\n" + " </xsl:if>\n" + " <xsl:if test=\"server/counters[@type="nsstat"]/counter[.>0]\">\n" " <h2>Server Statistics</h2>\n" " <xsl:if test=\"system-property('xsl:vendor')!='Transformiix'\">\n" " <!-- Non Mozilla specific markup -->\n" " <script type=\"text/javascript\">\n" " graphs.push({\n" - " 'title' : \"Server Response Types\",\n" + " 'title' : \"Server Counters\",\n" " 'target': 'chart_server_nsstat_restype',\n" + " 'style': 'barchart',\n" " 'data': [['Type','Counter'],<xsl:for-each select=\"server/counters[@type="nsstat"]/counter[.>0]\">['<xsl:value-of select=\"@name\"/>',<xsl:value-of select=\".\"/>],</xsl:for-each>]\n" " });\n" - " \n" " </script>\n" - " <div class=\"pie\" id=\"chart_server_nsstat_restype\"/>\n" + " <div class=\"pie\" id=\"chart_server_nsstat_restype\">[no data to display]</div>\n" " </xsl:if>\n" " <table class=\"counters\">\n" " <xsl:for-each select=\"server/counters[@type="nsstat"]/counter[.>0]\">\n" @@ -335,18 +428,20 @@ static char xslmsg[] = " </xsl:for-each>\n" " </table>\n" " <br/>\n" - " <h2>Zone Maintenance Statistics</h2>\n" + " </xsl:if>\n" + " <xsl:if test=\"server/counters[@type="zonestat"]/counter[.>0]\">\n" " <xsl:if test=\"system-property('xsl:vendor')!='Transformiix'\">\n" + " <h2>Zone Maintenance Statistics</h2>\n" " <script type=\"text/javascript\">\n" " graphs.push({\n" " 'title' : \"Zone Maintenance Stats\",\n" " 'target': 'chart_server_zone_maint',\n" - " 'data': [['Type','Counter'],<xsl:for-each select=\"server/counters[@type="zonestat"]/counter\">['<xsl:value-of select=\"@name\"/>',<xsl:value-of select=\".\"/>],</xsl:for-each>]\n" + " 'style': 'barchart',\n" + " 'data': [['Type','Counter'],<xsl:for-each select=\"server/counters[@type="zonestat"]/counter[.>0]\">['<xsl:value-of select=\"@name\"/>',<xsl:value-of select=\".\"/>],</xsl:for-each>]\n" " });\n" - "\n" " </script>\n" " <!-- Non Mozilla specific markup -->\n" - " <div class=\"pie\" id=\"chart_server_zone_maint\"/>\n" + " <div class=\"pie\" id=\"chart_server_zone_maint\">[no data to display]</div>\n" " </xsl:if>\n" " <table class=\"counters\">\n" " <xsl:for-each select=\"server/counters[@type="zonestat"]/counter\">\n" @@ -367,9 +462,11 @@ static char xslmsg[] = " </tr>\n" " </xsl:for-each>\n" " </table>\n" + " </xsl:if>\n" + " <xsl:if test=\"server/counters[@type="resstat"]/counter[.>0]\">\n" " <h2>Resolver Statistics (Common)</h2>\n" " <table class=\"counters\">\n" - " <xsl:for-each select=\"server/counters[@type="restat"]/counter\">\n" + " <xsl:for-each select=\"server/counters[@type="resstat"]/counter\">\n" " <xsl:sort select=\".\" data-type=\"number\" order=\"descending\"/>\n" " <xsl:variable name=\"css-class4\">\n" " <xsl:choose>\n" @@ -387,7 +484,9 @@ static char xslmsg[] = " </tr>\n" " </xsl:for-each>\n" " </table>\n" + " </xsl:if>\n" " <xsl:for-each select=\"views/view\">\n" + " <xsl:if test=\"counters[@type="resstats"]/counter[.>0]\">\n" " <h3>Resolver Statistics for View <xsl:value-of select=\"@name\"/></h3>\n" " <table class=\"counters\">\n" " <xsl:for-each select=\"counters[@type="resstats"]/counter[.>0]\">\n" @@ -408,9 +507,12 @@ static char xslmsg[] = " </tr>\n" " </xsl:for-each>\n" " </table>\n" + " </xsl:if>\n" " </xsl:for-each>\n" - " <h3>Cache DB RRsets for View <xsl:value-of select=\"@name\"/></h3>\n" + "\n" " <xsl:for-each select=\"views/view\">\n" + " <xsl:if test=\"cache/rrset\">\n" + " <h3>Cache DB RRsets for View <xsl:value-of select=\"@name\"/></h3>\n" " <table class=\"counters\">\n" " <xsl:for-each select=\"cache/rrset\">\n" " <xsl:variable name=\"css-class6\">\n" @@ -430,7 +532,10 @@ static char xslmsg[] = " </xsl:for-each>\n" " </table>\n" " <br/>\n" + " </xsl:if>\n" " </xsl:for-each>\n" + "\n" + " <xsl:if test=\"server/counters[@type="sockstat"]/counter[.>0]\">\n" " <h2>Socket I/O Statistics</h2>\n" " <table class=\"counters\">\n" " <xsl:for-each select=\"server/counters[@type="sockstat"]/counter[.>0]\">\n" @@ -451,7 +556,8 @@ static char xslmsg[] = " </xsl:for-each>\n" " </table>\n" " <br/>\n" - " <br/>\n" + " </xsl:if>\n" + " <xsl:if test=\"views/view[zones/zone/counters[@type="rcode"]/counter >0]\">\n" " <h2>Response Codes per view/zone</h2>\n" " <xsl:for-each select=\"views/view[zones/zone/counters[@type="rcode"]/counter >0]\">\n" " <h3>View <xsl:value-of select=\"@name\"/></h3>\n" @@ -467,6 +573,7 @@ static char xslmsg[] = " graphs.push({\n" " 'title': \"Response Codes for zone <xsl:value-of select=\"@name\"/>\",\n" " 'target': 'chart_rescode_<xsl:value-of select=\"../../@name\"/>_<xsl:value-of select=\"@name\"/>',\n" + " 'style': 'barchart',\n" " 'data': [['Type','Counter'],<xsl:for-each select=\"counters[@type="rcode"]/counter[.>0 and @name != "QryAuthAns"]\">['<xsl:value-of select=\"@name\"/>',<xsl:value-of select=\".\"/>],</xsl:for-each>]\n" " });\n" "\n" @@ -474,7 +581,7 @@ static char xslmsg[] = " <xsl:variable name=\"target\">\n" " <xsl:value-of select=\"@name\"/>\n" " </xsl:variable>\n" - " <div class=\"pie\" id=\"chart_rescode_{$thisview}_{$target}\"/>\n" + " <div class=\"pie\" id=\"chart_rescode_{$thisview}_{$target}\">[no data to display]</div>\n" " </xsl:if>\n" " <table class=\"counters\">\n" " <xsl:for-each select=\"counters[@type="rcode"]/counter[.>0 and @name != "QryAuthAns"]\">\n" @@ -498,6 +605,8 @@ static char xslmsg[] = " </xsl:if>\n" " </xsl:for-each>\n" " </xsl:for-each>\n" + " </xsl:if>\n" + " <xsl:if test=\"views/view[zones/zone/counters[@type="qtype"]/counter >0]\">\n" " <h2>Received QTYPES per view/zone</h2>\n" " <xsl:for-each select=\"views/view[zones/zone/counters[@type="qtype"]/counter >0]\">\n" " <h3>View <xsl:value-of select=\"@name\"/></h3>\n" @@ -513,6 +622,7 @@ static char xslmsg[] = " graphs.push({\n" " 'title': \"Query Types for zone <xsl:value-of select=\"@name\"/>\",\n" " 'target': 'chart_qtype_<xsl:value-of select=\"../../@name\"/>_<xsl:value-of select=\"@name\"/>',\n" + " 'style': 'barchart',\n" " 'data': [['Type','Counter'],<xsl:for-each select=\"counters[@type="qtype"]/counter[.>0 and @name != "QryAuthAns"]\">['<xsl:value-of select=\"@name\"/>',<xsl:value-of select=\".\"/>],</xsl:for-each>]\n" " });\n" "\n" @@ -520,7 +630,7 @@ static char xslmsg[] = " <xsl:variable name=\"target\">\n" " <xsl:value-of select=\"@name\"/>\n" " </xsl:variable>\n" - " <div class=\"pie\" id=\"chart_qtype_{$thisview2}_{$target}\"/>\n" + " <div class=\"pie\" id=\"chart_qtype_{$thisview2}_{$target}\">[no data to display]</div>\n" " </xsl:if>\n" " <table class=\"counters\">\n" " <xsl:for-each select=\"counters[@type="qtype"]/counter\">\n" @@ -544,8 +654,10 @@ static char xslmsg[] = " </xsl:if>\n" " </xsl:for-each>\n" " </xsl:for-each>\n" + " </xsl:if>\n" + " <xsl:if test=\"socketmgr/sockets/socket\">\n" " <h2>Network Status</h2>\n" - " <table class=\"counters\">\n" + " <table class=\"netstat\">\n" " <tr>\n" " <th>ID</th>\n" " <th>Name</th>\n" @@ -591,6 +703,8 @@ static char xslmsg[] = " </xsl:for-each>\n" " </table>\n" " <br/>\n" + " </xsl:if>\n" + " <xsl:if test=\"taskmgr/thread-model/type\">\n" " <h2>Task Manager Configuration</h2>\n" " <table class=\"counters\">\n" " <tr>\n" @@ -619,8 +733,10 @@ static char xslmsg[] = " </tr>\n" " </table>\n" " <br/>\n" + " </xsl:if>\n" + " <xsl:if test=\"taskmgr/tasks/task\">\n" " <h2>Tasks</h2>\n" - " <table class=\"counters\">\n" + " <table class=\"tasks\">\n" " <tr>\n" " <th>ID</th>\n" " <th>Name</th>\n" @@ -656,6 +772,8 @@ static char xslmsg[] = " </xsl:for-each>\n" " </table>\n" " <br/>\n" + " </xsl:if>\n" + " <xsl:if test=\"memory/summary\">\n" " <h2>Memory Usage Summary</h2>\n" " <table class=\"counters\">\n" " <xsl:for-each select=\"memory/summary/*\">\n" @@ -676,8 +794,10 @@ static char xslmsg[] = " </xsl:for-each>\n" " </table>\n" " <br/>\n" + " </xsl:if>\n" + " <xsl:if test=\"memory/contexts/context\">\n" " <h2>Memory Contexts</h2>\n" - " <table class=\"counters\">\n" + " <table class=\"mctx\">\n" " <tr>\n" " <th>ID</th>\n" " <th>Name</th>\n" @@ -732,6 +852,7 @@ static char xslmsg[] = " </tr>\n" " </xsl:for-each>\n" " </table>\n" + " </xsl:if>\n" " <hr/>\n" " <p class=\"footer\">Internet Systems Consortium Inc.<br/><a href=\"http://www.isc.org\">http://www.isc.org</a></p>\n" " </body>\n" diff --git a/bin/named/builtin.c b/bin/named/builtin.c index d6d7538a..e55e9542 100644 --- a/bin/named/builtin.c +++ b/bin/named/builtin.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004, 2005, 2007, 2009-2013 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004, 2005, 2007, 2009-2014 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2001-2003 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -117,7 +117,7 @@ dns64_rdata(unsigned char *v, size_t start, unsigned char *rdata) { rdata[j++] = decimal[c]; } } - memcpy(&rdata[j], "\07in-addr\04arpa", 14); + memmove(&rdata[j], "\07in-addr\04arpa", 14); return (j + 14); } @@ -320,7 +320,7 @@ put_txt(dns_sdblookup_t *lookup, const char *text) { if (len > 255) len = 255; /* Silently truncate */ buf[0] = len; - memcpy(&buf[1], text, len); + memmove(&buf[1], text, len); return (dns_sdb_putrdata(lookup, dns_rdatatype_txt, 0, buf, len + 1)); } @@ -502,11 +502,11 @@ builtin_create(const char *zone, int argc, char **argv, isc_mem_put(ns_g_mctx, empty, sizeof (*empty)); } else { if (strcmp(argv[0], "empty") == 0) - memcpy(empty, &empty_builtin, - sizeof (empty_builtin)); + memmove(empty, &empty_builtin, + sizeof (empty_builtin)); else - memcpy(empty, &dns64_builtin, - sizeof (empty_builtin)); + memmove(empty, &dns64_builtin, + sizeof (empty_builtin)); empty->server = server; empty->contact = contact; *dbdata = empty; diff --git a/bin/named/config.c b/bin/named/config.c index 92cf7bf7..27827208 100644 --- a/bin/named/config.c +++ b/bin/named/config.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2013 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2014 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2001-2003 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -573,7 +573,7 @@ ns_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list, if (new == NULL) goto cleanup; if (listcount != 0) { - memcpy(new, lists, oldsize); + memmove(new, lists, oldsize); isc_mem_put(mctx, lists, oldsize); } lists = new; @@ -608,7 +608,7 @@ ns_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list, if (new == NULL) goto cleanup; if (stackcount != 0) { - memcpy(new, stack, oldsize); + memmove(new, stack, oldsize); isc_mem_put(mctx, stack, oldsize); } stack = new; @@ -635,7 +635,7 @@ ns_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list, if (new == NULL) goto cleanup; if (addrcount != 0) { - memcpy(new, addrs, oldsize); + memmove(new, addrs, oldsize); isc_mem_put(mctx, addrs, oldsize); } addrs = new; @@ -647,7 +647,7 @@ ns_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list, if (new == NULL) goto cleanup; if (keycount != 0) { - memcpy(new, keys, oldsize); + memmove(new, keys, oldsize); isc_mem_put(mctx, keys, oldsize); } keys = new; @@ -695,7 +695,7 @@ ns_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list, new = isc_mem_get(mctx, newsize); if (new == NULL) goto cleanup; - memcpy(new, addrs, newsize); + memmove(new, addrs, newsize); } else new = NULL; isc_mem_put(mctx, addrs, oldsize); @@ -708,7 +708,7 @@ ns_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list, new = isc_mem_get(mctx, newsize); if (new == NULL) goto cleanup; - memcpy(new, keys, newsize); + memmove(new, keys, newsize); } else new = NULL; isc_mem_put(mctx, keys, oldsize); diff --git a/bin/named/controlconf.c b/bin/named/controlconf.c index c46a6e15..509a113b 100644 --- a/bin/named/controlconf.c +++ b/bin/named/controlconf.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2008, 2011-2013 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2008, 2011-2014 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2001-2003 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -367,7 +367,7 @@ control_recvmessage(isc_task_t *task, isc_event_t *event) { secret.rstart = isc_mem_get(listener->mctx, key->secret.length); if (secret.rstart == NULL) goto cleanup; - memcpy(secret.rstart, key->secret.base, key->secret.length); + memmove(secret.rstart, key->secret.base, key->secret.length); secret.rend = secret.rstart + key->secret.length; result = isccc_cc_fromwire(&ccregion, &request, &secret); if (result == ISC_R_SUCCESS) @@ -784,8 +784,8 @@ register_keys(const cfg_obj_t *control, const cfg_obj_t *keylist, free_controlkey(keyid, mctx); break; } - memcpy(keyid->secret.base, isc_buffer_base(&b), - keyid->secret.length); + memmove(keyid->secret.base, isc_buffer_base(&b), + keyid->secret.length); } } } @@ -864,8 +864,8 @@ get_rndckey(isc_mem_t *mctx, controlkeylist_t *keyids) { "out of memory", keyid->keyname); CHECK(ISC_R_NOMEMORY); } - memcpy(keyid->secret.base, isc_buffer_base(&b), - keyid->secret.length); + memmove(keyid->secret.base, isc_buffer_base(&b), + keyid->secret.length); ISC_LIST_APPEND(*keyids, keyid, link); keyid = NULL; result = ISC_R_SUCCESS; diff --git a/bin/named/lwaddr.c b/bin/named/lwaddr.c index ed7880ac..aecccce2 100644 --- a/bin/named/lwaddr.c +++ b/bin/named/lwaddr.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004, 2005, 2007, 2008 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004, 2005, 2007, 2008, 2014 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2000, 2001 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -41,11 +41,11 @@ lwaddr_netaddr_fromlwresaddr(isc_netaddr_t *na, lwres_addr_t *la) { if (la->family == LWRES_ADDRTYPE_V4) { struct in_addr ina; - memcpy(&ina.s_addr, la->address, 4); + memmove(&ina.s_addr, la->address, 4); isc_netaddr_fromin(na, &ina); } else { struct in6_addr ina6; - memcpy(&ina6.s6_addr, la->address, 16); + memmove(&ina6.s6_addr, la->address, 16); isc_netaddr_fromin6(na, &ina6); } return (ISC_R_SUCCESS); @@ -77,11 +77,11 @@ lwaddr_lwresaddr_fromnetaddr(lwres_addr_t *la, isc_netaddr_t *na) { if (na->family == AF_INET) { la->family = LWRES_ADDRTYPE_V4; la->length = 4; - memcpy(la->address, &na->type.in, 4); + memmove(la->address, &na->type.in, 4); } else { la->family = LWRES_ADDRTYPE_V6; la->length = 16; - memcpy(la->address, &na->type.in6, 16); + memmove(la->address, &na->type.in6, 16); } return (ISC_R_SUCCESS); } diff --git a/bin/named/lwdgnba.c b/bin/named/lwdgnba.c index dfc2ad65..2de5287d 100644 --- a/bin/named/lwdgnba.c +++ b/bin/named/lwdgnba.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004, 2005, 2007, 2008 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004, 2005, 2007, 2008, 2014 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2000-2002 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -226,12 +226,12 @@ ns_lwdclient_processgnba(ns_lwdclient_t *client, lwres_buffer_t *b) { client->na.family = AF_INET; if (req->addr.length != 4) goto out; - memcpy(&client->na.type.in, req->addr.address, 4); + memmove(&client->na.type.in, req->addr.address, 4); } else if (req->addr.family == LWRES_ADDRTYPE_V6) { client->na.family = AF_INET6; if (req->addr.length != 16) goto out; - memcpy(&client->na.type.in6, req->addr.address, 16); + memmove(&client->na.type.in6, req->addr.address, 16); } else { goto out; } diff --git a/bin/named/lwdgrbn.c b/bin/named/lwdgrbn.c index bbb4fbc5..3e7b15bb 100644 --- a/bin/named/lwdgrbn.c +++ b/bin/named/lwdgrbn.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2007, 2009, 2013 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2007, 2009, 2013, 2014 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2000, 2001, 2003 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -124,8 +124,8 @@ iterate_node(lwres_grbnresponse_t *grbn, dns_db_t *db, dns_dbnode_t *node, lens = isc_mem_get(mctx, size * sizeof(*lens)); if (lens == NULL) goto out; - memcpy(rdatas, oldrdatas, used * sizeof(*rdatas)); - memcpy(lens, oldlens, used * sizeof(*lens)); + memmove(rdatas, oldrdatas, used * sizeof(*rdatas)); + memmove(lens, oldlens, used * sizeof(*lens)); isc_mem_put(mctx, oldrdatas, oldsize * sizeof(*oldrdatas)); isc_mem_put(mctx, oldlens, oldsize * sizeof(*oldlens)); @@ -158,8 +158,8 @@ iterate_node(lwres_grbnresponse_t *grbn, dns_db_t *db, dns_dbnode_t *node, newlens = isc_mem_get(mctx, used * sizeof(*lens)); if (newlens == NULL) goto out; - memcpy(newrdatas, rdatas, used * sizeof(*rdatas)); - memcpy(newlens, lens, used * sizeof(*lens)); + memmove(newrdatas, rdatas, used * sizeof(*rdatas)); + memmove(newlens, lens, used * sizeof(*lens)); isc_mem_put(mctx, rdatas, size * sizeof(*rdatas)); isc_mem_put(mctx, lens, size * sizeof(*lens)); grbn->rdatas = newrdatas; diff --git a/bin/named/named.conf.5 b/bin/named/named.conf.5 index 26edc4a6..0f5662c3 100644 --- a/bin/named/named.conf.5 +++ b/bin/named/named.conf.5 @@ -1,4 +1,4 @@ -.\" Copyright (C) 2004-2011, 2013 Internet Systems Consortium, Inc. ("ISC") +.\" Copyright (C) 2004-2011, 2013, 2014 Internet Systems Consortium, Inc. ("ISC") .\" .\" Permission to use, copy, modify, and/or distribute this software for any .\" purpose with or without fee is hereby granted, provided that the above @@ -323,7 +323,7 @@ options { zone\-statistics \fIboolean\fR; key\-directory \fIquoted_string\fR; managed\-keys\-directory \fIquoted_string\fR; - auto\-dnssec \fBallow\fR|\fBmaintain\fR|\fBcreate\fR|\fBoff\fR; + auto\-dnssec \fBallow\fR|\fBmaintain\fR|\fBoff\fR; try\-tcp\-refresh \fIboolean\fR; zero\-no\-soa\-ttl \fIboolean\fR; zero\-no\-soa\-ttl\-cache \fIboolean\fR; @@ -596,5 +596,5 @@ zone \fIstring\fR \fIoptional_class\fR { \fBrndc\fR(8), BIND 9 Administrator Reference Manual. .SH "COPYRIGHT" -Copyright \(co 2004\-2011, 2013 Internet Systems Consortium, Inc. ("ISC") +Copyright \(co 2004\-2011, 2013, 2014 Internet Systems Consortium, Inc. ("ISC") .br diff --git a/bin/named/named.conf.docbook b/bin/named/named.conf.docbook index 35cd6276..b4d0c38e 100644 --- a/bin/named/named.conf.docbook +++ b/bin/named/named.conf.docbook @@ -2,7 +2,7 @@ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [<!ENTITY mdash "—">]> <!-- - - Copyright (C) 2004-2011, 2013 Internet Systems Consortium, Inc. ("ISC") + - Copyright (C) 2004-2011, 2013, 2014 Internet Systems Consortium, Inc. ("ISC") - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above @@ -45,6 +45,7 @@ <year>2010</year> <year>2011</year> <year>2013</year> + <year>2014</year> <holder>Internet Systems Consortium, Inc. ("ISC")</holder> </copyright> </docinfo> @@ -366,7 +367,7 @@ options { zone-statistics <replaceable>boolean</replaceable>; key-directory <replaceable>quoted_string</replaceable>; managed-keys-directory <replaceable>quoted_string</replaceable>; - auto-dnssec <constant>allow</constant>|<constant>maintain</constant>|<constant>create</constant>|<constant>off</constant>; + auto-dnssec <constant>allow</constant>|<constant>maintain</constant>|<constant>off</constant>; try-tcp-refresh <replaceable>boolean</replaceable>; zero-no-soa-ttl <replaceable>boolean</replaceable>; zero-no-soa-ttl-cache <replaceable>boolean</replaceable>; diff --git a/bin/named/named.conf.html b/bin/named/named.conf.html index b8b1247b..58474667 100644 --- a/bin/named/named.conf.html +++ b/bin/named/named.conf.html @@ -1,5 +1,5 @@ <!-- - - Copyright (C) 2004-2011, 2013 Internet Systems Consortium, Inc. ("ISC") + - Copyright (C) 2004-2011, 2013, 2014 Internet Systems Consortium, Inc. ("ISC") - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above @@ -31,7 +31,7 @@ <div class="cmdsynopsis"><p><code class="command">named.conf</code> </p></div> </div> <div class="refsect1" lang="en"> -<a name="id2543357"></a><h2>DESCRIPTION</h2> +<a name="id2543361"></a><h2>DESCRIPTION</h2> <p><code class="filename">named.conf</code> is the configuration file for <span><strong class="command">named</strong></span>. Statements are enclosed @@ -50,14 +50,14 @@ </p> </div> <div class="refsect1" lang="en"> -<a name="id2543385"></a><h2>ACL</h2> +<a name="id2543388"></a><h2>ACL</h2> <div class="literallayout"><p><br> acl <em class="replaceable"><code>string</code></em> { <em class="replaceable"><code>address_match_element</code></em>; ... };<br> <br> </p></div> </div> <div class="refsect1" lang="en"> -<a name="id2543401"></a><h2>KEY</h2> +<a name="id2543404"></a><h2>KEY</h2> <div class="literallayout"><p><br> key <em class="replaceable"><code>domain_name</code></em> {<br> algorithm <em class="replaceable"><code>string</code></em>;<br> @@ -66,7 +66,7 @@ key <em class="replaceable"><code>domain_name</code></em> {<br> </p></div> </div> <div class="refsect1" lang="en"> -<a name="id2543420"></a><h2>MASTERS</h2> +<a name="id2543424"></a><h2>MASTERS</h2> <div class="literallayout"><p><br> masters <em class="replaceable"><code>string</code></em> [<span class="optional"> port <em class="replaceable"><code>integer</code></em> </span>] {<br> ( <em class="replaceable"><code>masters</code></em> | <em class="replaceable"><code>ipv4_address</code></em> [<span class="optional">port <em class="replaceable"><code>integer</code></em></span>] |<br> @@ -75,7 +75,7 @@ masters <em class="replaceable"><code>string</code></em> [<span class="optional" </p></div> </div> <div class="refsect1" lang="en"> -<a name="id2543466"></a><h2>SERVER</h2> +<a name="id2543469"></a><h2>SERVER</h2> <div class="literallayout"><p><br> server ( <em class="replaceable"><code>ipv4_address[<span class="optional">/prefixlen</span>]</code></em> | <em class="replaceable"><code>ipv6_address[<span class="optional">/prefixlen</span>]</code></em> ) {<br> bogus <em class="replaceable"><code>boolean</code></em>;<br> @@ -97,7 +97,7 @@ server ( <em class="replaceable"><code>ipv4_address[<span class="optional">/pref </p></div> </div> <div class="refsect1" lang="en"> -<a name="id2543534"></a><h2>TRUSTED-KEYS</h2> +<a name="id2543538"></a><h2>TRUSTED-KEYS</h2> <div class="literallayout"><p><br> trusted-keys {<br> <em class="replaceable"><code>domain_name</code></em> <em class="replaceable"><code>flags</code></em> <em class="replaceable"><code>protocol</code></em> <em class="replaceable"><code>algorithm</code></em> <em class="replaceable"><code>key</code></em>; ... <br> @@ -105,7 +105,7 @@ trusted-keys {<br> </p></div> </div> <div class="refsect1" lang="en"> -<a name="id2543560"></a><h2>MANAGED-KEYS</h2> +<a name="id2543563"></a><h2>MANAGED-KEYS</h2> <div class="literallayout"><p><br> managed-keys {<br> <em class="replaceable"><code>domain_name</code></em> <code class="constant">initial-key</code> <em class="replaceable"><code>flags</code></em> <em class="replaceable"><code>protocol</code></em> <em class="replaceable"><code>algorithm</code></em> <em class="replaceable"><code>key</code></em>; ... <br> @@ -113,7 +113,7 @@ managed-keys {<br> </p></div> </div> <div class="refsect1" lang="en"> -<a name="id2543589"></a><h2>CONTROLS</h2> +<a name="id2543592"></a><h2>CONTROLS</h2> <div class="literallayout"><p><br> controls {<br> inet ( <em class="replaceable"><code>ipv4_address</code></em> | <em class="replaceable"><code>ipv6_address</code></em> | * )<br> @@ -125,7 +125,7 @@ controls {<br> </p></div> </div> <div class="refsect1" lang="en"> -<a name="id2543624"></a><h2>LOGGING</h2> +<a name="id2543627"></a><h2>LOGGING</h2> <div class="literallayout"><p><br> logging {<br> channel <em class="replaceable"><code>string</code></em> {<br> @@ -143,7 +143,7 @@ logging {<br> </p></div> </div> <div class="refsect1" lang="en"> -<a name="id2543662"></a><h2>LWRES</h2> +<a name="id2543666"></a><h2>LWRES</h2> <div class="literallayout"><p><br> lwres {<br> listen-on [<span class="optional"> port <em class="replaceable"><code>integer</code></em> </span>] {<br> @@ -156,7 +156,7 @@ lwres {<br> </p></div> </div> <div class="refsect1" lang="en"> -<a name="id2543704"></a><h2>OPTIONS</h2> +<a name="id2543707"></a><h2>OPTIONS</h2> <div class="literallayout"><p><br> options {<br> avoid-v4-udp-ports { <em class="replaceable"><code>port</code></em>; ... };<br> @@ -331,7 +331,7 @@ options {<br> zone-statistics <em class="replaceable"><code>boolean</code></em>;<br> key-directory <em class="replaceable"><code>quoted_string</code></em>;<br> managed-keys-directory <em class="replaceable"><code>quoted_string</code></em>;<br> - auto-dnssec <code class="constant">allow</code>|<code class="constant">maintain</code>|<code class="constant">create</code>|<code class="constant">off</code>;<br> + auto-dnssec <code class="constant">allow</code>|<code class="constant">maintain</code>|<code class="constant">off</code>;<br> try-tcp-refresh <em class="replaceable"><code>boolean</code></em>;<br> zero-no-soa-ttl <em class="replaceable"><code>boolean</code></em>;<br> zero-no-soa-ttl-cache <em class="replaceable"><code>boolean</code></em>;<br> diff --git a/bin/named/query.c b/bin/named/query.c index cf215755..c357f83e 100644 --- a/bin/named/query.c +++ b/bin/named/query.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2013 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2014 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1999-2003 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -4983,12 +4983,12 @@ rdata_tonetaddr(const dns_rdata_t *rdata, isc_netaddr_t *netaddr) { switch (rdata->type) { case dns_rdatatype_a: INSIST(rdata->length == 4); - memcpy(&ina.s_addr, rdata->data, 4); + memmove(&ina.s_addr, rdata->data, 4); isc_netaddr_fromin(netaddr, &ina); return (ISC_R_SUCCESS); case dns_rdatatype_aaaa: INSIST(rdata->length == 16); - memcpy(in6a.s6_addr, rdata->data, 16); + memmove(in6a.s6_addr, rdata->data, 16); isc_netaddr_fromin6(netaddr, &in6a); return (ISC_R_SUCCESS); default: @@ -5261,8 +5261,7 @@ query_findclosestnsec3(dns_name_t *qname, dns_db_t *db, dns_fixedname_t fixed; dns_hash_t hash; dns_name_t name; - int order; - unsigned int count; + unsigned int skip = 0, labels; dns_rdata_nsec3_t nsec3; dns_rdata_t rdata = DNS_RDATA_INIT; isc_boolean_t optout; @@ -5277,6 +5276,7 @@ query_findclosestnsec3(dns_name_t *qname, dns_db_t *db, dns_name_init(&name, NULL); dns_name_clone(qname, &name); + labels = dns_name_countlabels(&name); dns_clientinfomethods_init(&cm, ns_client_sourceip); dns_clientinfo_init(&ci, client); @@ -5310,13 +5310,14 @@ query_findclosestnsec3(dns_name_t *qname, dns_db_t *db, dns_rdata_reset(&rdata); optout = ISC_TF((nsec3.flags & DNS_NSEC3FLAG_OPTOUT) != 0); if (found != NULL && optout && - dns_name_fullcompare(&name, dns_db_origin(db), &order, - &count) == dns_namereln_subdomain) { + dns_name_issubdomain(&name, dns_db_origin(db))) + { dns_rdataset_disassociate(rdataset); if (dns_rdataset_isassociated(sigrdataset)) dns_rdataset_disassociate(sigrdataset); - count = dns_name_countlabels(&name) - 1; - dns_name_getlabelsequence(&name, 1, count, &name); + skip++; + dns_name_getlabelsequence(qname, skip, labels - skip, + &name); ns_client_log(client, DNS_LOGCATEGORY_DNSSEC, NS_LOGMODULE_QUERY, ISC_LOG_DEBUG(3), "looking for closest provable encloser"); @@ -5334,7 +5335,11 @@ query_findclosestnsec3(dns_name_t *qname, dns_db_t *db, ns_client_log(client, DNS_LOGCATEGORY_DNSSEC, NS_LOGMODULE_QUERY, ISC_LOG_WARNING, "expected covering NSEC3, got an exact match"); - if (found != NULL) + if (found == qname) { + if (skip != 0U) + dns_name_getlabelsequence(qname, skip, labels - skip, + found); + } else if (found != NULL) dns_name_copy(&name, found, NULL); return; } diff --git a/bin/named/server.c b/bin/named/server.c index e6c6ca6d..057dac1b 100644 --- a/bin/named/server.c +++ b/bin/named/server.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2013 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2014 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1999-2003 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -8609,7 +8609,7 @@ ns_server_signing(ns_server_t *server, char *args, isc_buffer_t *text) { ptr = next_token(&args, " \t"); if (ptr == NULL) return (ISC_R_UNEXPECTEDEND); - memcpy(keystr, ptr, sizeof(keystr)); + memmove(keystr, ptr, sizeof(keystr)); } else if (strcasecmp(ptr, "-nsec3param") == 0) { const char *hashstr, *flagstr, *iterstr; char nbuf[512]; diff --git a/bin/named/statschannel.c b/bin/named/statschannel.c index 37e98a8e..8ec08d7b 100644 --- a/bin/named/statschannel.c +++ b/bin/named/statschannel.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2013 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2008-2014 Internet Systems Consortium, Inc. ("ISC") * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -27,6 +27,7 @@ #include <isc/print.h> #include <isc/socket.h> #include <isc/stats.h> +#include <isc/string.h> #include <isc/task.h> #include <dns/cache.h> @@ -1057,7 +1058,7 @@ generatexml(ns_server_t *server, int *buflen, xmlChar **buf) { ISC_XMLCHAR "type=\"text/xsl\" href=\"/bind9.ver3.xsl\"")); TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "statistics")); TRY0(xmlTextWriterWriteAttribute(writer, ISC_XMLCHAR "version", - ISC_XMLCHAR "3.0")); + ISC_XMLCHAR "3.3")); /* Set common fields for statistics dump */ dumparg.type = statsformat_xml; @@ -1093,9 +1094,9 @@ generatexml(ns_server_t *server, int *buflen, xmlChar **buf) { if (dumparg.result != ISC_R_SUCCESS) goto error; } +else fprintf(stderr, "WTF WHERE'S RESQUERYRSTATS\n"); TRY0(xmlTextWriterEndElement(writer)); - /* <resstats> */ TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "counters")); TRY0(xmlTextWriterWriteAttribute(writer, ISC_XMLCHAR "type", ISC_XMLCHAR "resstats")); @@ -1109,7 +1110,7 @@ generatexml(ns_server_t *server, int *buflen, xmlChar **buf) { if (result != ISC_R_SUCCESS) goto error; } - TRY0(xmlTextWriterEndElement(writer)); /* </resstats> */ + TRY0(xmlTextWriterEndElement(writer)); cacherrstats = dns_db_getrrsetstats(view->cachedb); if (cacherrstats != NULL) { @@ -1156,7 +1157,7 @@ generatexml(ns_server_t *server, int *buflen, xmlChar **buf) { ISC_XMLCHAR "opcode")); dns_opcodestats_dump(server->opcodestats, opcodestat_dump, &dumparg, - 0); + ISC_STATSDUMP_VERBOSE); if (dumparg.result != ISC_R_SUCCESS) goto error; @@ -1370,10 +1371,10 @@ generatexml(ns_server_t *server, int *buflen, xmlChar **buf) { TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "server")); TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "boot-time")); TRY0(xmlTextWriterWriteString(writer, ISC_XMLCHAR boottime)); - TRY0(xmlTextWriterEndElement(writer)); + TRY0(xmlTextWriterEndElement(writer)); /* boot-time */ TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "current-time")); TRY0(xmlTextWriterWriteString(writer, ISC_XMLCHAR nowstr)); - TRY0(xmlTextWriterEndElement(writer)); + TRY0(xmlTextWriterEndElement(writer)); /* current-time */ TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "requests")); dumparg.result = ISC_R_SUCCESS; @@ -1461,7 +1462,8 @@ wrap_xmlfree(isc_buffer_t *buffer, void *arg) { } static isc_result_t -render_index(const char *url, const char *querystring, void *arg, +render_index(const char *url, isc_httpdurl_t *urlinfo, + const char *querystring, const char *headers, void *arg, unsigned int *retcode, const char **retmsg, const char **mimetype, isc_buffer_t *b, isc_httpdfree_t **freecb, void **freecb_args) @@ -1472,7 +1474,9 @@ render_index(const char *url, const char *querystring, void *arg, isc_result_t result; UNUSED(url); + UNUSED(urlinfo); UNUSED(querystring); + UNUSED(headers); result = generatexml(server, &msglen, &msg); @@ -1495,22 +1499,56 @@ render_index(const char *url, const char *querystring, void *arg, #endif /* HAVE_LIBXML2 */ static isc_result_t -render_xsl(const char *url, const char *querystring, void *args, - unsigned int *retcode, const char **retmsg, const char **mimetype, - isc_buffer_t *b, isc_httpdfree_t **freecb, - void **freecb_args) +render_xsl(const char *url, isc_httpdurl_t *urlinfo, + const char *querystring, const char *headers, + void *args, unsigned int *retcode, const char **retmsg, + const char **mimetype, isc_buffer_t *b, + isc_httpdfree_t **freecb, void **freecb_args) { + isc_result_t result; + UNUSED(url); UNUSED(querystring); UNUSED(args); + *freecb = NULL; + *freecb_args = NULL; + *mimetype = "text/xslt+xml"; + + if (urlinfo->isstatic) { + isc_time_t when; + char *p = strcasestr(headers, "If-Modified-Since: "); + + if (p != NULL) { + time_t t1, t2; + p += strlen("If-Modified-Since: "); + result = isc_time_parsehttptimestamp(p, &when); + if (result != ISC_R_SUCCESS) + goto send; + + result = isc_time_secondsastimet(&when, &t1); + if (result != ISC_R_SUCCESS) + goto send; + + result = isc_time_secondsastimet(&urlinfo->loadtime, + &t2); + if (result != ISC_R_SUCCESS) + goto send; + + if (t1 < t2) + goto send; + + *retcode = 304; + *retmsg = "Not modified"; + return (ISC_R_SUCCESS); + } + } + + send: *retcode = 200; *retmsg = "OK"; - *mimetype = "text/xslt+xml"; isc_buffer_reinit(b, xslmsg, strlen(xslmsg)); isc_buffer_add(b, strlen(xslmsg)); - *freecb = NULL; - *freecb_args = NULL; return (ISC_R_SUCCESS); } @@ -1647,11 +1685,11 @@ add_listener(ns_server_t *server, ns_statschannel_t **listenerp, #endif /* NEWSTATS */ #endif #ifdef NEWSTATS - isc_httpdmgr_addurl(listener->httpdmgr, "/bind9.ver3.xsl", render_xsl, - server); + isc_httpdmgr_addurl2(listener->httpdmgr, "/bind9.ver3.xsl", ISC_TRUE, + render_xsl, server); #else /* OLDSTATS */ - isc_httpdmgr_addurl(listener->httpdmgr, "/bind9.xsl", render_xsl, - server); + isc_httpdmgr_addurl2(listener->httpdmgr, "/bind9.xsl", ISC_TRUE, + render_xsl, server); #endif /* NEWSTATS */ *listenerp = listener; isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, diff --git a/bin/named/zoneconf.c b/bin/named/zoneconf.c index 7f36b143..3369c42d 100644 --- a/bin/named/zoneconf.c +++ b/bin/named/zoneconf.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2013 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2014 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1999-2003 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -462,7 +462,7 @@ configure_staticstub_serveraddrs(const cfg_obj_t *zconfig, dns_zone_t *zone, if (rdata == NULL) return (ISC_R_NOMEMORY); region.base = (unsigned char *)(rdata + 1); - memcpy(region.base, &na.type, region.length); + memmove(region.base, &na.type, region.length); dns_rdata_init(rdata); dns_rdata_fromregion(rdata, dns_zone_getclass(zone), rdatalist->type, ®ion); @@ -490,7 +490,7 @@ configure_staticstub_serveraddrs(const cfg_obj_t *zconfig, dns_zone_t *zone, } region.length = sregion.length; region.base = (unsigned char *)(rdata + 1); - memcpy(region.base, sregion.base, region.length); + memmove(region.base, sregion.base, region.length); dns_rdata_init(rdata); dns_rdata_fromregion(rdata, dns_zone_getclass(zone), dns_rdatatype_ns, ®ion); @@ -554,7 +554,7 @@ configure_staticstub_servernames(const cfg_obj_t *zconfig, dns_zone_t *zone, return (ISC_R_NOMEMORY); region.length = sregion.length; region.base = (unsigned char *)(rdata + 1); - memcpy(region.base, sregion.base, region.length); + memmove(region.base, sregion.base, region.length); dns_rdata_init(rdata); dns_rdata_fromregion(rdata, dns_zone_getclass(zone), dns_rdatatype_ns, ®ion); diff --git a/bin/nsupdate/nsupdate.c b/bin/nsupdate/nsupdate.c index 0a5cc508..9923f891 100644 --- a/bin/nsupdate/nsupdate.c +++ b/bin/nsupdate/nsupdate.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2013 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2014 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2000-2003 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -840,13 +840,16 @@ setup_system(void) { if (servers == NULL) fatal("out of memory"); for (i = 0; i < ns_total; i++) { - if (lwconf->nameservers[i].family == LWRES_ADDRTYPE_V4) { + if (lwconf->nameservers[i].family == LWRES_ADDRTYPE_V4) + { struct in_addr in4; - memcpy(&in4, lwconf->nameservers[i].address, 4); + memmove(&in4, + lwconf->nameservers[i].address, 4); isc_sockaddr_fromin(&servers[i], &in4, dnsport); } else { struct in6_addr in6; - memcpy(&in6, lwconf->nameservers[i].address, 16); + memmove(&in6, + lwconf->nameservers[i].address, 16); isc_sockaddr_fromin6(&servers[i], &in6, dnsport); } @@ -2580,7 +2583,7 @@ start_gssrequest(dns_name_t *master) { if (userserver == NULL) get_address(namestr, dnsport, kserver); else - (void)memcpy(kserver, userserver, sizeof(isc_sockaddr_t)); + (void)memmove(kserver, userserver, sizeof(isc_sockaddr_t)); dns_fixedname_init(&fname); servname = dns_fixedname_name(&fname); diff --git a/bin/pkcs11/openssl-1.0.0k-patch b/bin/pkcs11/openssl-1.0.0l-patch index 7a6a1fa7..0d6aeefa 100644 --- a/bin/pkcs11/openssl-1.0.0k-patch +++ b/bin/pkcs11/openssl-1.0.0l-patch @@ -1,7 +1,7 @@ Index: openssl/Configure -diff -u openssl/Configure:1.9.2.1.2.1.4.1 openssl/Configure:1.11.2.1 ---- openssl/Configure:1.9.2.1.2.1.4.1 Tue May 14 15:37:45 2013 -+++ openssl/Configure Tue May 14 15:49:01 2013 +diff -u openssl/Configure:1.9.2.1.2.1.4.1.2.1 openssl/Configure:1.11.2.2 +--- openssl/Configure:1.9.2.1.2.1.4.1.2.1 Tue Jan 7 09:25:41 2014 ++++ openssl/Configure Tue Jan 7 09:28:47 2014 @@ -10,7 +10,7 @@ # see INSTALL for instructions. @@ -150,7 +150,7 @@ diff -u openssl/Makefile.org:1.5.2.1.2.1 openssl/Makefile.org:1.6 Index: openssl/README.pkcs11 diff -u /dev/null openssl/README.pkcs11:1.7.4.1 ---- /dev/null Fri Oct 4 14:35:09 2013 +--- /dev/null Tue Jan 7 11:13:25 2014 +++ openssl/README.pkcs11 Fri Oct 4 14:33:56 2013 @@ -0,0 +1,266 @@ +ISC modified @@ -610,7 +610,7 @@ diff -u openssl/crypto/engine/Makefile:1.8.2.1 openssl/crypto/engine/Makefile:1. tb_asnmth.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h Index: openssl/crypto/engine/cryptoki.h diff -u /dev/null openssl/crypto/engine/cryptoki.h:1.4 ---- /dev/null Fri Oct 4 14:35:09 2013 +--- /dev/null Tue Jan 7 11:13:26 2014 +++ openssl/crypto/engine/cryptoki.h Thu Dec 18 00:14:12 2008 @@ -0,0 +1,103 @@ +/* @@ -754,7 +754,7 @@ diff -u openssl/crypto/engine/engine.h:1.5.2.1 openssl/crypto/engine/engine.h:1. #endif Index: openssl/crypto/engine/hw_pk11.c diff -u /dev/null openssl/crypto/engine/hw_pk11.c:1.30.4.2 ---- /dev/null Fri Oct 4 14:35:09 2013 +--- /dev/null Tue Jan 7 11:13:26 2014 +++ openssl/crypto/engine/hw_pk11.c Fri Oct 4 14:33:56 2013 @@ -0,0 +1,4116 @@ +/* @@ -4875,7 +4875,7 @@ diff -u /dev/null openssl/crypto/engine/hw_pk11.c:1.30.4.2 +#endif /* OPENSSL_NO_HW */ Index: openssl/crypto/engine/hw_pk11_err.c diff -u /dev/null openssl/crypto/engine/hw_pk11_err.c:1.5 ---- /dev/null Fri Oct 4 14:35:09 2013 +--- /dev/null Tue Jan 7 11:13:26 2014 +++ openssl/crypto/engine/hw_pk11_err.c Tue Jun 14 00:43:26 2011 @@ -0,0 +1,288 @@ +/* @@ -5168,7 +5168,7 @@ diff -u /dev/null openssl/crypto/engine/hw_pk11_err.c:1.5 +} Index: openssl/crypto/engine/hw_pk11_err.h diff -u /dev/null openssl/crypto/engine/hw_pk11_err.h:1.12.4.1 ---- /dev/null Fri Oct 4 14:35:09 2013 +--- /dev/null Tue Jan 7 11:13:26 2014 +++ openssl/crypto/engine/hw_pk11_err.h Fri Oct 4 14:33:56 2013 @@ -0,0 +1,440 @@ +/* @@ -5613,7 +5613,7 @@ diff -u /dev/null openssl/crypto/engine/hw_pk11_err.h:1.12.4.1 +#endif /* HW_PK11_ERR_H */ Index: openssl/crypto/engine/hw_pk11_pub.c diff -u /dev/null openssl/crypto/engine/hw_pk11_pub.c:1.38.2.3 ---- /dev/null Fri Oct 4 14:35:09 2013 +--- /dev/null Tue Jan 7 11:13:26 2014 +++ openssl/crypto/engine/hw_pk11_pub.c Fri Oct 4 14:33:56 2013 @@ -0,0 +1,3556 @@ +/* @@ -9174,7 +9174,7 @@ diff -u /dev/null openssl/crypto/engine/hw_pk11_pub.c:1.38.2.3 +#endif /* OPENSSL_NO_HW */ Index: openssl/crypto/engine/hw_pk11ca.h diff -u /dev/null openssl/crypto/engine/hw_pk11ca.h:1.4 ---- /dev/null Fri Oct 4 14:35:10 2013 +--- /dev/null Tue Jan 7 11:13:26 2014 +++ openssl/crypto/engine/hw_pk11ca.h Wed Jun 15 21:12:20 2011 @@ -0,0 +1,32 @@ +/* Redefine all pk11/PK11 external symbols to pk11ca/PK11CA */ @@ -9211,7 +9211,7 @@ diff -u /dev/null openssl/crypto/engine/hw_pk11ca.h:1.4 +#define ENGINE_load_pk11 ENGINE_load_pk11ca Index: openssl/crypto/engine/hw_pk11so.c diff -u /dev/null openssl/crypto/engine/hw_pk11so.c:1.7.4.1 ---- /dev/null Fri Oct 4 14:35:10 2013 +--- /dev/null Tue Jan 7 11:13:26 2014 +++ openssl/crypto/engine/hw_pk11so.c Fri Oct 4 14:33:56 2013 @@ -0,0 +1,1775 @@ +/* @@ -10991,7 +10991,7 @@ diff -u /dev/null openssl/crypto/engine/hw_pk11so.c:1.7.4.1 +#endif /* OPENSSL_NO_HW */ Index: openssl/crypto/engine/hw_pk11so.h diff -u /dev/null openssl/crypto/engine/hw_pk11so.h:1.4 ---- /dev/null Fri Oct 4 14:35:10 2013 +--- /dev/null Tue Jan 7 11:13:26 2014 +++ openssl/crypto/engine/hw_pk11so.h Wed Jun 15 21:12:20 2011 @@ -0,0 +1,32 @@ +/* Redefine all pk11/PK11 external symbols to pk11so/PK11SO */ @@ -11028,7 +11028,7 @@ diff -u /dev/null openssl/crypto/engine/hw_pk11so.h:1.4 +#define ENGINE_load_pk11 ENGINE_load_pk11so Index: openssl/crypto/engine/hw_pk11so_pub.c diff -u /dev/null openssl/crypto/engine/hw_pk11so_pub.c:1.8.2.2 ---- /dev/null Fri Oct 4 14:35:10 2013 +--- /dev/null Tue Jan 7 11:13:26 2014 +++ openssl/crypto/engine/hw_pk11so_pub.c Fri Oct 4 14:33:56 2013 @@ -0,0 +1,1642 @@ +/* @@ -12675,11 +12675,11 @@ diff -u /dev/null openssl/crypto/engine/hw_pk11so_pub.c:1.8.2.2 +#endif /* OPENSSL_NO_HW */ Index: openssl/crypto/engine/pkcs11.h diff -u /dev/null openssl/crypto/engine/pkcs11.h:1.1.1.1 ---- /dev/null Fri Oct 4 14:35:10 2013 +--- /dev/null Tue Jan 7 11:13:26 2014 +++ openssl/crypto/engine/pkcs11.h Wed Oct 24 23:27:09 2007 @@ -0,0 +1,299 @@ +/* pkcs11.h include file for PKCS #11. */ -+/* $Revision$ */ ++/* $Revision: 1.1.1.1 $ */ + +/* License to copy and use this software is granted provided that it is + * identified as "RSA Security Inc. PKCS #11 Cryptographic Token Interface @@ -12979,11 +12979,11 @@ diff -u /dev/null openssl/crypto/engine/pkcs11.h:1.1.1.1 +#endif Index: openssl/crypto/engine/pkcs11f.h diff -u /dev/null openssl/crypto/engine/pkcs11f.h:1.1.1.1 ---- /dev/null Fri Oct 4 14:35:10 2013 +--- /dev/null Tue Jan 7 11:13:26 2014 +++ openssl/crypto/engine/pkcs11f.h Wed Oct 24 23:27:09 2007 @@ -0,0 +1,912 @@ +/* pkcs11f.h include file for PKCS #11. */ -+/* $Revision$ */ ++/* $Revision: 1.1.1.1 $ */ + +/* License to copy and use this software is granted provided that it is + * identified as "RSA Security Inc. PKCS #11 Cryptographic Token Interface @@ -13896,11 +13896,11 @@ diff -u /dev/null openssl/crypto/engine/pkcs11f.h:1.1.1.1 +#endif Index: openssl/crypto/engine/pkcs11t.h diff -u /dev/null openssl/crypto/engine/pkcs11t.h:1.2 ---- /dev/null Fri Oct 4 14:35:10 2013 +--- /dev/null Tue Jan 7 11:13:26 2014 +++ openssl/crypto/engine/pkcs11t.h Sat Aug 30 11:58:07 2008 @@ -0,0 +1,1885 @@ +/* pkcs11t.h include file for PKCS #11. */ -+/* $Revision$ */ ++/* $Revision: 1.2 $ */ + +/* License to copy and use this software is granted provided that it is + * identified as "RSA Security Inc. PKCS #11 Cryptographic Token Interface diff --git a/bin/pkcs11/openssl-1.0.1e-patch b/bin/pkcs11/openssl-1.0.1f-patch index 3b8b29c3..f492a11a 100644 --- a/bin/pkcs11/openssl-1.0.1e-patch +++ b/bin/pkcs11/openssl-1.0.1f-patch @@ -1,7 +1,7 @@ Index: openssl/Configure -diff -u openssl/Configure:1.9.2.1.2.1.2.1.2.1 openssl/Configure:1.13 ---- openssl/Configure:1.9.2.1.2.1.2.1.2.1 Wed May 15 11:46:59 2013 -+++ openssl/Configure Wed May 15 11:57:36 2013 +diff -u openssl/Configure:1.9.2.1.2.1.2.1.2.1.2.1 openssl/Configure:1.14 +--- openssl/Configure:1.9.2.1.2.1.2.1.2.1.2.1 Tue Jan 7 09:44:50 2014 ++++ openssl/Configure Tue Jan 7 09:46:34 2014 @@ -10,7 +10,7 @@ # see INSTALL for instructions. @@ -135,9 +135,9 @@ diff -u openssl/Configure:1.9.2.1.2.1.2.1.2.1 openssl/Configure:1.13 s/^SHLIB_VERSION_HISTORY=.*/SHLIB_VERSION_HISTORY=$shlib_version_history/; s/^SHLIB_MAJOR=.*/SHLIB_MAJOR=$shlib_major/; Index: openssl/Makefile.org -diff -u openssl/Makefile.org:1.5.2.1.2.1.2.1.2.1 openssl/Makefile.org:1.8 ---- openssl/Makefile.org:1.5.2.1.2.1.2.1.2.1 Wed May 15 11:46:59 2013 -+++ openssl/Makefile.org Wed May 15 11:57:36 2013 +diff -u openssl/Makefile.org:1.5.2.1.2.1.2.1.2.1.2.1 openssl/Makefile.org:1.9 +--- openssl/Makefile.org:1.5.2.1.2.1.2.1.2.1.2.1 Tue Jan 7 09:44:51 2014 ++++ openssl/Makefile.org Tue Jan 7 09:46:34 2014 @@ -26,6 +26,9 @@ INSTALL_PREFIX= INSTALLTOP=/usr/local/ssl @@ -150,7 +150,7 @@ diff -u openssl/Makefile.org:1.5.2.1.2.1.2.1.2.1 openssl/Makefile.org:1.8 Index: openssl/README.pkcs11 diff -u /dev/null openssl/README.pkcs11:1.8 ---- /dev/null Fri Oct 4 14:27:29 2013 +--- /dev/null Tue Jan 7 11:14:50 2014 +++ openssl/README.pkcs11 Fri Oct 4 14:16:43 2013 @@ -0,0 +1,266 @@ +ISC modified @@ -611,7 +611,7 @@ diff -u openssl/crypto/engine/Makefile:1.8.2.1.4.1 openssl/crypto/engine/Makefil tb_asnmth.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h Index: openssl/crypto/engine/cryptoki.h diff -u /dev/null openssl/crypto/engine/cryptoki.h:1.4 ---- /dev/null Fri Oct 4 14:27:30 2013 +--- /dev/null Tue Jan 7 11:14:51 2014 +++ openssl/crypto/engine/cryptoki.h Thu Dec 18 00:14:12 2008 @@ -0,0 +1,103 @@ +/* @@ -755,7 +755,7 @@ diff -u openssl/crypto/engine/engine.h:1.5.2.1.4.1 openssl/crypto/engine/engine. #endif Index: openssl/crypto/engine/hw_pk11.c diff -u /dev/null openssl/crypto/engine/hw_pk11.c:1.33 ---- /dev/null Fri Oct 4 14:27:30 2013 +--- /dev/null Tue Jan 7 11:14:51 2014 +++ openssl/crypto/engine/hw_pk11.c Fri Oct 4 14:07:41 2013 @@ -0,0 +1,4010 @@ +/* @@ -4770,7 +4770,7 @@ diff -u /dev/null openssl/crypto/engine/hw_pk11.c:1.33 +#endif /* OPENSSL_NO_HW */ Index: openssl/crypto/engine/hw_pk11_err.c diff -u /dev/null openssl/crypto/engine/hw_pk11_err.c:1.5 ---- /dev/null Fri Oct 4 14:27:30 2013 +--- /dev/null Tue Jan 7 11:14:51 2014 +++ openssl/crypto/engine/hw_pk11_err.c Tue Jun 14 00:43:26 2011 @@ -0,0 +1,288 @@ +/* @@ -5063,7 +5063,7 @@ diff -u /dev/null openssl/crypto/engine/hw_pk11_err.c:1.5 +} Index: openssl/crypto/engine/hw_pk11_err.h diff -u /dev/null openssl/crypto/engine/hw_pk11_err.h:1.13 ---- /dev/null Fri Oct 4 14:27:30 2013 +--- /dev/null Tue Jan 7 11:14:51 2014 +++ openssl/crypto/engine/hw_pk11_err.h Fri Oct 4 14:04:20 2013 @@ -0,0 +1,440 @@ +/* @@ -5508,7 +5508,7 @@ diff -u /dev/null openssl/crypto/engine/hw_pk11_err.h:1.13 +#endif /* HW_PK11_ERR_H */ Index: openssl/crypto/engine/hw_pk11_pub.c diff -u /dev/null openssl/crypto/engine/hw_pk11_pub.c:1.42 ---- /dev/null Fri Oct 4 14:27:30 2013 +--- /dev/null Tue Jan 7 11:14:51 2014 +++ openssl/crypto/engine/hw_pk11_pub.c Fri Oct 4 14:27:06 2013 @@ -0,0 +1,3556 @@ +/* @@ -9069,7 +9069,7 @@ diff -u /dev/null openssl/crypto/engine/hw_pk11_pub.c:1.42 +#endif /* OPENSSL_NO_HW */ Index: openssl/crypto/engine/hw_pk11ca.h diff -u /dev/null openssl/crypto/engine/hw_pk11ca.h:1.4 ---- /dev/null Fri Oct 4 14:27:30 2013 +--- /dev/null Tue Jan 7 11:14:51 2014 +++ openssl/crypto/engine/hw_pk11ca.h Wed Jun 15 21:12:20 2011 @@ -0,0 +1,32 @@ +/* Redefine all pk11/PK11 external symbols to pk11ca/PK11CA */ @@ -9106,7 +9106,7 @@ diff -u /dev/null openssl/crypto/engine/hw_pk11ca.h:1.4 +#define ENGINE_load_pk11 ENGINE_load_pk11ca Index: openssl/crypto/engine/hw_pk11so.c diff -u /dev/null openssl/crypto/engine/hw_pk11so.c:1.8 ---- /dev/null Fri Oct 4 14:27:30 2013 +--- /dev/null Tue Jan 7 11:14:51 2014 +++ openssl/crypto/engine/hw_pk11so.c Fri Oct 4 14:05:16 2013 @@ -0,0 +1,1775 @@ +/* @@ -10886,7 +10886,7 @@ diff -u /dev/null openssl/crypto/engine/hw_pk11so.c:1.8 +#endif /* OPENSSL_NO_HW */ Index: openssl/crypto/engine/hw_pk11so.h diff -u /dev/null openssl/crypto/engine/hw_pk11so.h:1.4 ---- /dev/null Fri Oct 4 14:27:30 2013 +--- /dev/null Tue Jan 7 11:14:51 2014 +++ openssl/crypto/engine/hw_pk11so.h Wed Jun 15 21:12:20 2011 @@ -0,0 +1,32 @@ +/* Redefine all pk11/PK11 external symbols to pk11so/PK11SO */ @@ -10923,7 +10923,7 @@ diff -u /dev/null openssl/crypto/engine/hw_pk11so.h:1.4 +#define ENGINE_load_pk11 ENGINE_load_pk11so Index: openssl/crypto/engine/hw_pk11so_pub.c diff -u /dev/null openssl/crypto/engine/hw_pk11so_pub.c:1.10 ---- /dev/null Fri Oct 4 14:27:30 2013 +--- /dev/null Tue Jan 7 11:14:51 2014 +++ openssl/crypto/engine/hw_pk11so_pub.c Fri Oct 4 14:05:38 2013 @@ -0,0 +1,1642 @@ +/* @@ -12570,11 +12570,11 @@ diff -u /dev/null openssl/crypto/engine/hw_pk11so_pub.c:1.10 +#endif /* OPENSSL_NO_HW */ Index: openssl/crypto/engine/pkcs11.h diff -u /dev/null openssl/crypto/engine/pkcs11.h:1.1.1.1 ---- /dev/null Fri Oct 4 14:27:30 2013 +--- /dev/null Tue Jan 7 11:14:51 2014 +++ openssl/crypto/engine/pkcs11.h Wed Oct 24 23:27:09 2007 @@ -0,0 +1,299 @@ +/* pkcs11.h include file for PKCS #11. */ -+/* $Revision$ */ ++/* $Revision: 1.1.1.1 $ */ + +/* License to copy and use this software is granted provided that it is + * identified as "RSA Security Inc. PKCS #11 Cryptographic Token Interface @@ -12874,11 +12874,11 @@ diff -u /dev/null openssl/crypto/engine/pkcs11.h:1.1.1.1 +#endif Index: openssl/crypto/engine/pkcs11f.h diff -u /dev/null openssl/crypto/engine/pkcs11f.h:1.1.1.1 ---- /dev/null Fri Oct 4 14:27:30 2013 +--- /dev/null Tue Jan 7 11:14:51 2014 +++ openssl/crypto/engine/pkcs11f.h Wed Oct 24 23:27:09 2007 @@ -0,0 +1,912 @@ +/* pkcs11f.h include file for PKCS #11. */ -+/* $Revision$ */ ++/* $Revision: 1.1.1.1 $ */ + +/* License to copy and use this software is granted provided that it is + * identified as "RSA Security Inc. PKCS #11 Cryptographic Token Interface @@ -13791,11 +13791,11 @@ diff -u /dev/null openssl/crypto/engine/pkcs11f.h:1.1.1.1 +#endif Index: openssl/crypto/engine/pkcs11t.h diff -u /dev/null openssl/crypto/engine/pkcs11t.h:1.2 ---- /dev/null Fri Oct 4 14:27:30 2013 +--- /dev/null Tue Jan 7 11:14:51 2014 +++ openssl/crypto/engine/pkcs11t.h Sat Aug 30 11:58:07 2008 @@ -0,0 +1,1885 @@ +/* pkcs11t.h include file for PKCS #11. */ -+/* $Revision$ */ ++/* $Revision: 1.2 $ */ + +/* License to copy and use this software is granted provided that it is + * identified as "RSA Security Inc. PKCS #11 Cryptographic Token Interface diff --git a/bin/rndc/rndc.c b/bin/rndc/rndc.c index ba2c3f6d..33802db2 100644 --- a/bin/rndc/rndc.c +++ b/bin/rndc/rndc.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2013 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2014 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2000-2003 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -725,7 +725,7 @@ main(int argc, char **argv) { result = isc_file_progname(*argv, program, sizeof(program)); if (result != ISC_R_SUCCESS) - memcpy(program, "rndc", 5); + memmove(program, "rndc", 5); progname = program; admin_conffile = RNDC_CONFFILE; @@ -857,7 +857,7 @@ main(int argc, char **argv) { p = args; for (i = 0; i < argc; i++) { size_t len = strlen(argv[i]); - memcpy(p, argv[i], len); + memmove(p, argv[i], len); p += len; *p++ = ' '; } diff --git a/bin/tests/hash_test.c b/bin/tests/hash_test.c index 73d397b0..2b9165c6 100644 --- a/bin/tests/hash_test.c +++ b/bin/tests/hash_test.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2007, 2014 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2000, 2001 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -66,35 +66,35 @@ main(int argc, char **argv) { s = "abc"; isc_sha1_init(&sha1); - memcpy(buffer, s, strlen(s)); + memmove(buffer, s, strlen(s)); isc_sha1_update(&sha1, buffer, strlen(s)); isc_sha1_final(&sha1, digest); print_digest(s, "sha1", digest, ISC_SHA1_DIGESTLENGTH/4); s = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"; isc_sha1_init(&sha1); - memcpy(buffer, s, strlen(s)); + memmove(buffer, s, strlen(s)); isc_sha1_update(&sha1, buffer, strlen(s)); isc_sha1_final(&sha1, digest); print_digest(s, "sha1", digest, ISC_SHA1_DIGESTLENGTH/4); s = "abc"; isc_sha224_init(&sha224); - memcpy(buffer, s, strlen(s)); + memmove(buffer, s, strlen(s)); isc_sha224_update(&sha224, buffer, strlen(s)); isc_sha224_final(digest, &sha224); print_digest(s, "sha224", digest, ISC_SHA224_DIGESTLENGTH/4); s = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"; isc_sha224_init(&sha224); - memcpy(buffer, s, strlen(s)); + memmove(buffer, s, strlen(s)); isc_sha224_update(&sha224, buffer, strlen(s)); isc_sha224_final(digest, &sha224); print_digest(s, "sha224", digest, ISC_SHA224_DIGESTLENGTH/4); s = "abc"; isc_md5_init(&md5); - memcpy(buffer, s, strlen(s)); + memmove(buffer, s, strlen(s)); isc_md5_update(&md5, buffer, strlen(s)); isc_md5_final(&md5, digest); print_digest(s, "md5", digest, 4); @@ -105,7 +105,7 @@ main(int argc, char **argv) { s = "Hi There"; memset(key, 0x0b, 16); isc_hmacmd5_init(&hmacmd5, key, 16); - memcpy(buffer, s, strlen(s)); + memmove(buffer, s, strlen(s)); isc_hmacmd5_update(&hmacmd5, buffer, strlen(s)); isc_hmacmd5_sign(&hmacmd5, digest); print_digest(s, "hmacmd5", digest, 4); @@ -113,7 +113,7 @@ main(int argc, char **argv) { s = "what do ya want for nothing?"; strcpy((char *)key, "Jefe"); isc_hmacmd5_init(&hmacmd5, key, 4); - memcpy(buffer, s, strlen(s)); + memmove(buffer, s, strlen(s)); isc_hmacmd5_update(&hmacmd5, buffer, strlen(s)); isc_hmacmd5_sign(&hmacmd5, digest); print_digest(s, "hmacmd5", digest, 4); @@ -125,7 +125,7 @@ main(int argc, char **argv) { "\335\335\335\335\335\335\335\335\335\335"; memset(key, 0xaa, 16); isc_hmacmd5_init(&hmacmd5, key, 16); - memcpy(buffer, s, strlen(s)); + memmove(buffer, s, strlen(s)); isc_hmacmd5_update(&hmacmd5, buffer, strlen(s)); isc_hmacmd5_sign(&hmacmd5, digest); print_digest(s, "hmacmd5", digest, 4); @@ -136,7 +136,7 @@ main(int argc, char **argv) { s = "Hi There"; memset(key, 0x0b, 20); isc_hmacsha1_init(&hmacsha1, key, 20); - memcpy(buffer, s, strlen(s)); + memmove(buffer, s, strlen(s)); isc_hmacsha1_update(&hmacsha1, buffer, strlen(s)); isc_hmacsha1_sign(&hmacsha1, digest, ISC_SHA1_DIGESTLENGTH); print_digest(s, "hmacsha1", digest, ISC_SHA1_DIGESTLENGTH/4); @@ -144,7 +144,7 @@ main(int argc, char **argv) { s = "what do ya want for nothing?"; strcpy((char *)key, "Jefe"); isc_hmacsha1_init(&hmacsha1, key, 4); - memcpy(buffer, s, strlen(s)); + memmove(buffer, s, strlen(s)); isc_hmacsha1_update(&hmacsha1, buffer, strlen(s)); isc_hmacsha1_sign(&hmacsha1, digest, ISC_SHA1_DIGESTLENGTH); print_digest(s, "hmacsha1", digest, ISC_SHA1_DIGESTLENGTH/4); @@ -156,7 +156,7 @@ main(int argc, char **argv) { "\335\335\335\335\335\335\335\335\335\335"; memset(key, 0xaa, 20); isc_hmacsha1_init(&hmacsha1, key, 20); - memcpy(buffer, s, strlen(s)); + memmove(buffer, s, strlen(s)); isc_hmacsha1_update(&hmacsha1, buffer, strlen(s)); isc_hmacsha1_sign(&hmacsha1, digest, ISC_SHA1_DIGESTLENGTH); print_digest(s, "hmacsha1", digest, ISC_SHA1_DIGESTLENGTH/4); @@ -167,7 +167,7 @@ main(int argc, char **argv) { s = "Hi There"; memset(key, 0x0b, 20); isc_hmacsha224_init(&hmacsha224, key, 20); - memcpy(buffer, s, strlen(s)); + memmove(buffer, s, strlen(s)); isc_hmacsha224_update(&hmacsha224, buffer, strlen(s)); isc_hmacsha224_sign(&hmacsha224, digest, ISC_SHA224_DIGESTLENGTH); print_digest(s, "hmacsha224", digest, ISC_SHA224_DIGESTLENGTH/4); @@ -175,7 +175,7 @@ main(int argc, char **argv) { s = "what do ya want for nothing?"; strcpy((char *)key, "Jefe"); isc_hmacsha224_init(&hmacsha224, key, 4); - memcpy(buffer, s, strlen(s)); + memmove(buffer, s, strlen(s)); isc_hmacsha224_update(&hmacsha224, buffer, strlen(s)); isc_hmacsha224_sign(&hmacsha224, digest, ISC_SHA224_DIGESTLENGTH); print_digest(s, "hmacsha224", digest, ISC_SHA224_DIGESTLENGTH/4); @@ -187,7 +187,7 @@ main(int argc, char **argv) { "\335\335\335\335\335\335\335\335\335\335"; memset(key, 0xaa, 20); isc_hmacsha224_init(&hmacsha224, key, 20); - memcpy(buffer, s, strlen(s)); + memmove(buffer, s, strlen(s)); isc_hmacsha224_update(&hmacsha224, buffer, strlen(s)); isc_hmacsha224_sign(&hmacsha224, digest, ISC_SHA224_DIGESTLENGTH); print_digest(s, "hmacsha224", digest, ISC_SHA224_DIGESTLENGTH/4); @@ -198,7 +198,7 @@ main(int argc, char **argv) { s = "Hi There"; memset(key, 0x0b, 20); isc_hmacsha256_init(&hmacsha256, key, 20); - memcpy(buffer, s, strlen(s)); + memmove(buffer, s, strlen(s)); isc_hmacsha256_update(&hmacsha256, buffer, strlen(s)); isc_hmacsha256_sign(&hmacsha256, digest, ISC_SHA256_DIGESTLENGTH); print_digest(s, "hmacsha256", digest, ISC_SHA256_DIGESTLENGTH/4); @@ -206,7 +206,7 @@ main(int argc, char **argv) { s = "what do ya want for nothing?"; strcpy((char *)key, "Jefe"); isc_hmacsha256_init(&hmacsha256, key, 4); - memcpy(buffer, s, strlen(s)); + memmove(buffer, s, strlen(s)); isc_hmacsha256_update(&hmacsha256, buffer, strlen(s)); isc_hmacsha256_sign(&hmacsha256, digest, ISC_SHA256_DIGESTLENGTH); print_digest(s, "hmacsha256", digest, ISC_SHA256_DIGESTLENGTH/4); @@ -218,7 +218,7 @@ main(int argc, char **argv) { "\335\335\335\335\335\335\335\335\335\335"; memset(key, 0xaa, 20); isc_hmacsha256_init(&hmacsha256, key, 20); - memcpy(buffer, s, strlen(s)); + memmove(buffer, s, strlen(s)); isc_hmacsha256_update(&hmacsha256, buffer, strlen(s)); isc_hmacsha256_sign(&hmacsha256, digest, ISC_SHA256_DIGESTLENGTH); print_digest(s, "hmacsha256", digest, ISC_SHA256_DIGESTLENGTH/4); @@ -229,7 +229,7 @@ main(int argc, char **argv) { s = "Hi There"; memset(key, 0x0b, 20); isc_hmacsha384_init(&hmacsha384, key, 20); - memcpy(buffer, s, strlen(s)); + memmove(buffer, s, strlen(s)); isc_hmacsha384_update(&hmacsha384, buffer, strlen(s)); isc_hmacsha384_sign(&hmacsha384, digest, ISC_SHA384_DIGESTLENGTH); print_digest(s, "hmacsha384", digest, ISC_SHA384_DIGESTLENGTH/4); @@ -237,7 +237,7 @@ main(int argc, char **argv) { s = "what do ya want for nothing?"; strcpy((char *)key, "Jefe"); isc_hmacsha384_init(&hmacsha384, key, 4); - memcpy(buffer, s, strlen(s)); + memmove(buffer, s, strlen(s)); isc_hmacsha384_update(&hmacsha384, buffer, strlen(s)); isc_hmacsha384_sign(&hmacsha384, digest, ISC_SHA384_DIGESTLENGTH); print_digest(s, "hmacsha384", digest, ISC_SHA384_DIGESTLENGTH/4); @@ -249,7 +249,7 @@ main(int argc, char **argv) { "\335\335\335\335\335\335\335\335\335\335"; memset(key, 0xaa, 20); isc_hmacsha384_init(&hmacsha384, key, 20); - memcpy(buffer, s, strlen(s)); + memmove(buffer, s, strlen(s)); isc_hmacsha384_update(&hmacsha384, buffer, strlen(s)); isc_hmacsha384_sign(&hmacsha384, digest, ISC_SHA384_DIGESTLENGTH); print_digest(s, "hmacsha384", digest, ISC_SHA384_DIGESTLENGTH/4); @@ -260,7 +260,7 @@ main(int argc, char **argv) { s = "Hi There"; memset(key, 0x0b, 20); isc_hmacsha512_init(&hmacsha512, key, 20); - memcpy(buffer, s, strlen(s)); + memmove(buffer, s, strlen(s)); isc_hmacsha512_update(&hmacsha512, buffer, strlen(s)); isc_hmacsha512_sign(&hmacsha512, digest, ISC_SHA512_DIGESTLENGTH); print_digest(s, "hmacsha512", digest, ISC_SHA512_DIGESTLENGTH/4); @@ -268,7 +268,7 @@ main(int argc, char **argv) { s = "what do ya want for nothing?"; strcpy((char *)key, "Jefe"); isc_hmacsha512_init(&hmacsha512, key, 4); - memcpy(buffer, s, strlen(s)); + memmove(buffer, s, strlen(s)); isc_hmacsha512_update(&hmacsha512, buffer, strlen(s)); isc_hmacsha512_sign(&hmacsha512, digest, ISC_SHA512_DIGESTLENGTH); print_digest(s, "hmacsha512", digest, ISC_SHA512_DIGESTLENGTH/4); @@ -280,7 +280,7 @@ main(int argc, char **argv) { "\335\335\335\335\335\335\335\335\335\335"; memset(key, 0xaa, 20); isc_hmacsha512_init(&hmacsha512, key, 20); - memcpy(buffer, s, strlen(s)); + memmove(buffer, s, strlen(s)); isc_hmacsha512_update(&hmacsha512, buffer, strlen(s)); isc_hmacsha512_sign(&hmacsha512, digest, ISC_SHA512_DIGESTLENGTH); print_digest(s, "hmacsha512", digest, ISC_SHA512_DIGESTLENGTH/4); diff --git a/bin/tests/names/t_names.c b/bin/tests/names/t_names.c index 4b710e67..1982e5ec 100644 --- a/bin/tests/names/t_names.c +++ b/bin/tests/names/t_names.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2009, 2011-2013 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2009, 2011-2014 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1998-2003 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -296,7 +296,7 @@ hname_to_tname(char *src, char *target, size_t len) { */ if (srclen >= len) return (1); - memcpy(target, src, srclen + 1); + memmove(target, src, srclen + 1); return (0); } diff --git a/bin/tests/rdata_test.c b/bin/tests/rdata_test.c index 51cc406a..21352905 100644 --- a/bin/tests/rdata_test.c +++ b/bin/tests/rdata_test.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2007, 2011, 2012 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2007, 2011, 2012, 2014 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1998-2003 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -1193,7 +1193,7 @@ main(int argc, char *argv[]) { dns_rdata_init(&last); region.base = malloc(region.length = rdata.length); if (region.base) { - memcpy(region.base, rdata.data, rdata.length); + memmove(region.base, rdata.data, rdata.length); dns_rdata_fromregion(&last, class, type, ®ion); lasttype = type; first = 0; diff --git a/bin/tests/system/checkconf/clean.sh b/bin/tests/system/checkconf/clean.sh index 94f09d9b..dde87131 100644 --- a/bin/tests/system/checkconf/clean.sh +++ b/bin/tests/system/checkconf/clean.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (C) 2011, 2012 Internet Systems Consortium, Inc. ("ISC") +# Copyright (C) 2011-2013 Internet Systems Consortium, Inc. ("ISC") # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -17,3 +17,4 @@ # $Id: clean.sh,v 1.2 2011/05/07 05:55:17 each Exp $ rm -f good.conf.in good.conf.out badzero.conf +rm -rf test.keydir diff --git a/bin/tests/system/checkconf/good.conf b/bin/tests/system/checkconf/good.conf index 5444fdde..defbab47 100644 --- a/bin/tests/system/checkconf/good.conf +++ b/bin/tests/system/checkconf/good.conf @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005, 2007, 2010-2013 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2005, 2007, 2010-2014 Internet Systems Consortium, Inc. ("ISC") * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -104,3 +104,7 @@ view "second" { dnssec-validation auto; zone-statistics full; }; +key "mykey" { + algorithm "hmac-md5"; + secret "qwertyuiopasdfgh"; +}; diff --git a/bin/tests/system/checkconf/tests.sh b/bin/tests/system/checkconf/tests.sh index 2f945bf8..d47addee 100644 --- a/bin/tests/system/checkconf/tests.sh +++ b/bin/tests/system/checkconf/tests.sh @@ -1,4 +1,4 @@ -# Copyright (C) 2005, 2007, 2010-2013 Internet Systems Consortium, Inc. ("ISC") +# Copyright (C) 2005, 2007, 2010-2014 Internet Systems Consortium, Inc. ("ISC") # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -34,6 +34,16 @@ cmp good.conf.in good.conf.out || ret=1 if [ $ret != 0 ]; then echo "I:failed"; fi status=`expr $status + $ret` +echo "I: checking that named-checkconf -x removes secrets" +ret=0 +# ensure there is a secret and that it is not the check string. +grep 'secret "' good.conf.in > /dev/null || ret=1 +grep 'secret "????????????????"' good.conf.in > /dev/null 2>&1 && ret=1 +$CHECKCONF -p -x good.conf.in | grep -v '^good.conf.in:' > good.conf.out 2>&1 || ret=1 +grep 'secret "????????????????"' good.conf.out > /dev/null 2>&1 || ret=1 +if [ $ret != 0 ]; then echo "I:failed"; fi +status=`expr $status + $ret` + for bad in bad*.conf do ret=0 @@ -120,5 +130,21 @@ n=`$CHECKCONF inline-bad.conf 2>&1 | grep "missing 'file' entry" | wc -l` if [ $ret != 0 ]; then echo "I:failed"; fi status=`expr $status + $ret` +echo "I: checking for missing key directory warning" +ret=0 +rm -rf test.keydir +n=`$CHECKCONF warn-keydir.conf 2>&1 | grep "'test.keydir' does not exist" | wc -l` +[ $n -eq 1 ] || ret=1 +touch test.keydir +n=`$CHECKCONF warn-keydir.conf 2>&1 | grep "'test.keydir' is not a directory" | wc -l` +[ $n -eq 1 ] || ret=1 +rm -f test.keydir +mkdir test.keydir +n=`$CHECKCONF warn-keydir.conf 2>&1 | grep "key-directory" | wc -l` +[ $n -eq 0 ] || ret=1 +rm -rf test.keydir +if [ $ret != 0 ]; then echo "I:failed"; fi +status=`expr $status + $ret` + echo "I:exit status: $status" exit $status diff --git a/bin/tests/system/checkconf/warn-keydir.conf b/bin/tests/system/checkconf/warn-keydir.conf new file mode 100644 index 00000000..c537a3a2 --- /dev/null +++ b/bin/tests/system/checkconf/warn-keydir.conf @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2013 Internet Systems Consortium, Inc. ("ISC") + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH + * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, + * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 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. + */ + +/* + * key-directory defined but doesn't exist. + */ +options { + directory "."; +}; + +zone dummy { + type master; + file "xxxx"; + key-directory "test.keydir"; +}; diff --git a/bin/tests/system/dlvauto/tests.sh b/bin/tests/system/dlvauto/tests.sh index 25bb8e30..a6866980 100644 --- a/bin/tests/system/dlvauto/tests.sh +++ b/bin/tests/system/dlvauto/tests.sh @@ -1,4 +1,4 @@ -# Copyright (C) 2011, 2012 Internet Systems Consortium, Inc. ("ISC") +# Copyright (C) 2011, 2012, 2014 Internet Systems Consortium, Inc. ("ISC") # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -31,7 +31,7 @@ then ret=0 $PERL $SYSTEMTESTTOP/stop.pl . ns2 || ret=1 sleep 1 - (cd ns2; $NAMED -f -d 100 -c named.conf >> named.run 2>&1 & ) + (cd ns2; $NAMED -g -d 100 -c named.conf >> named.run 2>&1 & ) sleep 2 $DIG $DIGOPTS soa . @10.53.0.2 > dig.out.ns2.test$n || ret=1 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1 diff --git a/bin/tests/system/dnssec/ns2/example.db.in b/bin/tests/system/dnssec/ns2/example.db.in index 7be10442..db66cc66 100644 --- a/bin/tests/system/dnssec/ns2/example.db.in +++ b/bin/tests/system/dnssec/ns2/example.db.in @@ -1,4 +1,4 @@ -; Copyright (C) 2004, 2007-2012 Internet Systems Consortium, Inc. ("ISC") +; Copyright (C) 2004, 2007-2013 Internet Systems Consortium, Inc. ("ISC") ; Copyright (C) 2000-2002 Internet Software Consortium. ; ; Permission to use, copy, modify, and/or distribute this software for any @@ -54,8 +54,8 @@ dname2 DNAME dname2-target foo.dname2-target TXT "testing dname" ; A secure subdomain -secure NS ns.secure -ns.secure A 10.53.0.3 +secure NS ns3.secure +ns3.secure A 10.53.0.3 ; An insecure subdomain insecure NS ns.insecure diff --git a/bin/tests/system/dnssec/ns2/insecure.secure.example.db b/bin/tests/system/dnssec/ns2/insecure.secure.example.db index f16a2cf8..b25af847 100644 --- a/bin/tests/system/dnssec/ns2/insecure.secure.example.db +++ b/bin/tests/system/dnssec/ns2/insecure.secure.example.db @@ -1,4 +1,4 @@ -; Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC") +; Copyright (C) 2004, 2007, 2013 Internet Systems Consortium, Inc. ("ISC") ; Copyright (C) 2000, 2001 Internet Software Consortium. ; ; Permission to use, copy, modify, and/or distribute this software for any @@ -13,8 +13,6 @@ ; OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ; PERFORMANCE OF THIS SOFTWARE. -; $Id: insecure.secure.example.db,v 1.9 2007/06/19 23:47:02 tbox Exp $ - $TTL 300 ; 5 minutes @ IN SOA mname1. . ( 2000042407 ; serial @@ -23,8 +21,8 @@ $TTL 300 ; 5 minutes 1814400 ; expire (3 weeks) 3600 ; minimum (1 hour) ) - NS ns -ns A 10.53.0.3 + NS ns2 +ns2 A 10.53.0.2 a A 10.0.0.1 b A 10.0.0.2 diff --git a/bin/tests/system/dnssec/ns3/secure.example.db.in b/bin/tests/system/dnssec/ns3/secure.example.db.in index c9de3e5b..0d2fa4f4 100644 --- a/bin/tests/system/dnssec/ns3/secure.example.db.in +++ b/bin/tests/system/dnssec/ns3/secure.example.db.in @@ -1,4 +1,4 @@ -; Copyright (C) 2004, 2007, 2008, 2010, 2012 Internet Systems Consortium, Inc. ("ISC") +; Copyright (C) 2004, 2007, 2008, 2010, 2012, 2013 Internet Systems Consortium, Inc. ("ISC") ; Copyright (C) 2000, 2001 Internet Software Consortium. ; ; Permission to use, copy, modify, and/or distribute this software for any @@ -13,8 +13,6 @@ ; OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR ; PERFORMANCE OF THIS SOFTWARE. -; $Id: secure.example.db.in,v 1.16 2010/07/15 01:17:45 jinmei Exp $ - $TTL 300 ; 5 minutes @ IN SOA mname1. . ( 2000042407 ; serial @@ -23,8 +21,8 @@ $TTL 300 ; 5 minutes 1814400 ; expire (3 weeks) 3600 ; minimum (1 hour) ) - NS ns -ns A 10.53.0.3 + NS ns3 +ns3 A 10.53.0.3 a A 10.0.0.1 b A 10.0.0.2 @@ -36,8 +34,8 @@ x CNAME a private NS ns.private ns.private A 10.53.0.2 -insecure NS ns.insecure -ns.insecure A 10.53.0.2 +insecure NS ns2.insecure +ns2.insecure A 10.53.0.2 nosoa NS ns.nosoa ns.nosoa A 10.53.0.7 diff --git a/bin/tests/system/dnssec/ns4/named4.conf b/bin/tests/system/dnssec/ns4/named4.conf new file mode 100644 index 00000000..1afde2d6 --- /dev/null +++ b/bin/tests/system/dnssec/ns4/named4.conf @@ -0,0 +1,83 @@ +/* + * Copyright (C) 2013 Internet Systems Consortium, Inc. ("ISC") + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH + * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, + * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 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. + */ + +// NS4 + +controls { /* empty */ }; + +options { + query-source address 10.53.0.4; + notify-source 10.53.0.4; + transfer-source 10.53.0.4; + port 5300; + pid-file "named.pid"; + listen-on { 10.53.0.4; }; + listen-on-v6 { none; }; +}; + +key rndc_key { + secret "1234abcd8765"; + algorithm hmac-sha256; +}; + +controls { + inet 10.53.0.4 port 9953 allow { any; } keys { rndc_key; }; +}; + +key auth { + secret "1234abcd8765"; + algorithm hmac-sha256; +}; + +include "trusted.conf"; + +view rec { + match-recursive-only yes; + recursion yes; + acache-enable yes; + dnssec-validation yes; + dnssec-accept-expired yes; + + zone "." { + type hint; + file "../../common/root.hint"; + }; + + zone secure.example { + type static-stub; + server-addresses { 10.53.0.4; }; + }; + + zone insecure.secure.example { + type static-stub; + server-addresses { 10.53.0.4; }; + }; +}; + +view auth { + recursion no; + allow-recursion { none; }; + + zone secure.example { + type slave; + masters { 10.53.0.3; }; + }; + + zone insecure.secure.example { + type slave; + masters { 10.53.0.2; }; + }; +}; diff --git a/bin/tests/system/dnssec/tests.sh b/bin/tests/system/dnssec/tests.sh index f6499a43..4a012af3 100644 --- a/bin/tests/system/dnssec/tests.sh +++ b/bin/tests/system/dnssec/tests.sh @@ -2336,5 +2336,21 @@ n=`expr $n + 1` if test "$before" = "$after" ; then echo "I:failed"; ret=1; fi status=`expr $status + $ret` +cp ns4/named4.conf ns4/named.conf +$RNDC -c ../common/rndc.conf -s 10.53.0.4 -p 9953 reconfig 2>&1 | sed 's/^/I:ns4 /' +sleep 3 + +echo "I:check insecure delegation between static-stub zones ($n)" +ret=0 +$DIG $DIGOPTS ns insecure.secure.example \ + @10.53.0.4 > dig.out.ns4.1.test$n || ret=1 +grep "SERVFAIL" dig.out.ns4.1.test$n > /dev/null && ret=1 +$DIG $DIGOPTS ns secure.example \ + @10.53.0.4 > dig.out.ns4.2.test$n || ret=1 +grep "SERVFAIL" dig.out.ns4.2.test$n > /dev/null && ret=1 +n=`expr $n + 1` +if [ $ret != 0 ]; then echo "I:failed"; fi +status=`expr $status + $ret` + echo "I:exit status: $status" exit $status diff --git a/bin/tests/system/ixfr/clean.sh b/bin/tests/system/ixfr/clean.sh index a4457453..ac5b8279 100644 --- a/bin/tests/system/ixfr/clean.sh +++ b/bin/tests/system/ixfr/clean.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (C) 2004, 2007, 2011, 2012 Internet Systems Consortium, Inc. ("ISC") +# Copyright (C) 2004, 2007, 2011, 2012, 2014 Internet Systems Consortium, Inc. ("ISC") # Copyright (C) 2001 Internet Software Consortium. # # Permission to use, copy, modify, and/or distribute this software for any @@ -22,3 +22,4 @@ rm -f ns3/*.jnl ns3/mytest.db ns3/subtest.db rm -f ns4/*.jnl ns4/*.db rm -f */named.memstats rm -f dig.out +rm -f ns3/large.db diff --git a/bin/tests/system/ixfr/ns3/named.conf b/bin/tests/system/ixfr/ns3/named.conf index c01ce546..52a5719f 100644 --- a/bin/tests/system/ixfr/ns3/named.conf +++ b/bin/tests/system/ixfr/ns3/named.conf @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2011, 2014 Internet Systems Consortium, Inc. ("ISC") * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -17,37 +17,41 @@ /* $Id: named.conf,v 1.3 2011/09/07 23:46:27 tbox Exp $ */ options { - query-source address 10.53.0.3; - notify-source 10.53.0.3; - transfer-source 10.53.0.3; + query-source address 10.53.0.3; + notify-source 10.53.0.3; + transfer-source 10.53.0.3; allow-transfer { any; }; - port 5300; - pid-file "named.pid"; - listen-on { 10.53.0.3; }; - listen-on-v6 { none; }; - recursion no; - notify yes; + port 5300; + pid-file "named.pid"; + listen-on { 10.53.0.3; }; + listen-on-v6 { none; }; + recursion no; + notify yes; }; key rndc_key { - secret "1234abcd8765"; - algorithm hmac-md5; + secret "1234abcd8765"; + algorithm hmac-md5; }; controls { - inet 10.53.0.3 port 9953 allow { any; } keys { rndc_key; }; + inet 10.53.0.3 port 9953 allow { any; } keys { rndc_key; }; }; view "primary" { - ixfr-from-differences yes; + ixfr-from-differences yes; request-ixfr yes; - zone "test" IN { - type master; - file "mytest.db"; - }; + zone "test" IN { + type master; + file "mytest.db"; + }; zone "sub.test" IN { - type master; - file "subtest.db"; - request-ixfr no; - }; + type master; + file "subtest.db"; + request-ixfr no; + }; + zone "large" IN { + type master; + file "large.db"; + }; }; diff --git a/bin/tests/system/ixfr/setup.sh b/bin/tests/system/ixfr/setup.sh index 7e68ebcc..d8155c12 100644 --- a/bin/tests/system/ixfr/setup.sh +++ b/bin/tests/system/ixfr/setup.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (C) 2004, 2007, 2011, 2012 Internet Systems Consortium, Inc. ("ISC") +# Copyright (C) 2004, 2007, 2011, 2012, 2014 Internet Systems Consortium, Inc. ("ISC") # Copyright (C) 2001 Internet Software Consortium. # # Permission to use, copy, modify, and/or distribute this software for any @@ -45,3 +45,5 @@ EOF # Setup initial db files for ns3 cp ns3/mytest0.db ns3/mytest.db cp ns3/subtest0.db ns3/subtest.db +sh ../genzone.sh 3 > ns3/large.db +awk 'END { for (i = 0; i < 10000; i++) printf("record%d 10 IN TXT this is record %d\n", i, i) }' < /dev/null >> ns3/large.db diff --git a/bin/tests/system/ixfr/tests.sh b/bin/tests/system/ixfr/tests.sh index 4bccd763..c6049ad5 100644 --- a/bin/tests/system/ixfr/tests.sh +++ b/bin/tests/system/ixfr/tests.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (C) 2004, 2007, 2011, 2012 Internet Systems Consortium, Inc. ("ISC") +# Copyright (C) 2004, 2007, 2011, 2012, 2014 Internet Systems Consortium, Inc. ("ISC") # Copyright (C) 2001 Internet Software Consortium. # # Permission to use, copy, modify, and/or distribute this software for any @@ -237,6 +237,17 @@ else echo "I: success: IXFR it was" fi +echo "I:testing DiG's handling of a multi message AXFR style IXFR response" +( +(sleep 10 && kill $$) 2>/dev/null & +sub=$! +$DIG ixfr=0 large -p 5300 @10.53.0.3 > dig.out +kill $sub +) +lines=`grep hostmaster.large dig.out | wc -l` +test ${lines:-0} -eq 2 || { echo "I:failed"; status=1; } +messages=`sed -n 's/^;;.*messages \([0-9]*\),.*/\1/p' dig.out` +test ${messages:-0} -gt 1 || { echo "I:failed"; status=1; } echo "I:exit status: $status" exit $status diff --git a/bin/tests/system/resolver/clean.sh b/bin/tests/system/resolver/clean.sh index c5bd75ed..108a49df 100644 --- a/bin/tests/system/resolver/clean.sh +++ b/bin/tests/system/resolver/clean.sh @@ -29,6 +29,6 @@ rm -f ns6/K* rm -f ns6/example.net.db.signed ns6/example.net.db rm -f ns6/dsset-example.net. ns6/example.net.db.signed.jnl rm -f ns6/to-be-removed.tld.db ns6/to-be-removed.tld.db.jnl -rm -f ns7/server.db ns7/server.db.jnl +rm -f ns7/server.db ns7/server.db.jnl ns7/named.conf rm -f random.data rm -f sample.out diff --git a/bin/tests/system/resolver/ns7/named.conf b/bin/tests/system/resolver/ns7/named1.conf index a41afd0e..a40a14a6 100644 --- a/bin/tests/system/resolver/ns7/named.conf +++ b/bin/tests/system/resolver/ns7/named1.conf @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010, 2011 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2010, 2011, 2013 Internet Systems Consortium, Inc. ("ISC") * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -14,8 +14,6 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: named.conf,v 1.5 2011/07/28 03:18:17 each Exp $ */ - // NS4 controls { /* empty */ }; @@ -33,6 +31,15 @@ options { disable-empty-zone 20.172.in-addr.arpa; }; +key rndc_key { + secret "1234abcd8765"; + algorithm hmac-md5; +}; + +controls { + inet 10.53.0.7 port 9953 allow { any; } keys { rndc_key; }; +}; + zone "." { type hint; file "root.hint"; diff --git a/bin/tests/system/resolver/ns7/named2.conf b/bin/tests/system/resolver/ns7/named2.conf new file mode 100644 index 00000000..47622e32 --- /dev/null +++ b/bin/tests/system/resolver/ns7/named2.conf @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2013 Internet Systems Consortium, Inc. ("ISC") + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH + * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, + * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 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. + */ + +// NS4 + +controls { /* empty */ }; + +options { + query-source address 10.53.0.7 port 5300; + notify-source 10.53.0.7; + transfer-source 10.53.0.7; + port 5300; + pid-file "named.pid"; + listen-on { 10.53.0.7; }; + listen-on-v6 { none; }; + recursion yes; + empty-zones-enable yes; + disable-empty-zone 20.172.in-addr.arpa; +}; + +key rndc_key { + secret "1234abcd8765"; + algorithm hmac-md5; +}; + +controls { + inet 10.53.0.7 port 9953 allow { any; } keys { rndc_key; }; +}; + +zone "." { + type hint; + file "root.hint"; +}; diff --git a/bin/tests/system/resolver/setup.sh b/bin/tests/system/resolver/setup.sh index 5567d359..fc124f1d 100644 --- a/bin/tests/system/resolver/setup.sh +++ b/bin/tests/system/resolver/setup.sh @@ -1,6 +1,6 @@ #!/bin/sh -e # -# Copyright (C) 2010-2012 Internet Systems Consortium, Inc. ("ISC") +# Copyright (C) 2010-2013 Internet Systems Consortium, Inc. ("ISC") # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -21,4 +21,5 @@ cp ns4/tld1.db ns4/tld.db cp ns6/to-be-removed.tld.db.in ns6/to-be-removed.tld.db cp ns7/server.db.in ns7/server.db +cp ns7/named1.conf ns7/named.conf (cd ns6 && sh keygen.sh) diff --git a/bin/tests/system/resolver/tests.sh b/bin/tests/system/resolver/tests.sh index 9323f255..4dd98545 100755 --- a/bin/tests/system/resolver/tests.sh +++ b/bin/tests/system/resolver/tests.sh @@ -379,13 +379,27 @@ done [ $ret = 0 ] && ret=$foo; if [ $ret != 0 ]; then echo "I:failed"; status=1; fi -echo "I:check for improved error message with SOA mismatch" +n=`expr $n + 1` +echo "I:check for improved error message with SOA mismatch ($n)" ret=0 $DIG @10.53.0.1 -p 5300 www.sub.broken aaaa > dig.out.${n} || ret=1 grep "not subdomain of zone" ns1/named.run > /dev/null || ret=1 if [ $ret != 0 ]; then echo "I:failed"; fi status=`expr $status + $ret` -echo "I:exit status: $status" +#HERE <<< +cp ns7/named2.conf ns7/named.conf +$RNDC -c ../common/rndc.conf -s 10.53.0.7 -p 9953 reconfig 2>&1 | sed 's/^/I:ns7 /' +n=`expr $n + 1` +echo "I:check resolution on the listening port ($n)" +ret=0 +$DIG +tcp +tries=2 +time=5 mx example.net @10.53.0.7 -p 5300 > dig.ns7.out.${n} || ret=2 +grep "status: NOERROR" dig.ns7.out.${n} > /dev/null || ret=1 +grep "ANSWER: 1" dig.ns7.out.${n} > /dev/null || ret=1 +if [ $ret != 0 ]; then echo "I:failed"; ret=1; fi +status=`expr $status + $ret` +#HERE >>> + +echo "I:exit status: $status" exit $status |
