summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcvs2git2006-05-17 19:53:39 (GMT)
committercvs2git2012-06-24 12:13:13 (GMT)
commitf3e04c180058ce517ec0db6639228c388e34ba26 (patch)
treec97d1c02abeb0102f21ed55385e86492ac2f5648
parente624f4c5c2c90eedd372b1f7434fd82bd9c98036 (diff)
downloadbind-f3e04c180058ce517ec0db6639228c388e34ba26.zip
bind-f3e04c180058ce517ec0db6639228c388e34ba26.tar.gz
This commit was manufactured by cvs2git to create tag 'auto-ac-bind-auto/ac/bind-9_2_6-6
9_2_6-6'. Sprout from master 2004-12-18 22:57:36 UTC hawk <hawk@pld-linux.org> '- patch for bind 9.2.4 to make it working when its used with IPv6 only' Cherrypick from AC-branch 2005-12-24 22:36:53 UTC hawk <hawk@pld-linux.org> '- updated for 9.2.6': bind-idn.patch -> 1.3.4.1 Cherrypick from unlabeled-1.198.2 2006-05-17 19:53:39 UTC Elan Ruusamäe <glen@pld-linux.org> '- vserver safe device nodes; rel 6': bind.spec -> 1.198.2.14 Cherrypick from unlabeled-1.3.2 2005-03-23 22:32:45 UTC hawk <hawk@pld-linux.org> '- updated for 9.2.5': bind-pmake.patch -> 1.3.2.1 Delete: bind-chroot-ndc.patch bind-fds.patch bind-host.patch bind-mkdep.patch bind-noinet6.patch bind-nonlist.patch bind-pidfile.patch bind-probe_ipv6.patch bind-pselect.patch bind-res_randomid.patch bind9-openssl.patch host_991529+.diff named-chroot.init named.conf resolver.5 utils-holelogd-linux.patch
-rw-r--r--bind-chroot-ndc.patch79
-rw-r--r--bind-fds.patch43
-rw-r--r--bind-host.patch10
-rw-r--r--bind-idn.patch1367
-rw-r--r--bind-mkdep.patch120
-rw-r--r--bind-noinet6.patch132
-rw-r--r--bind-nonlist.patch15
-rw-r--r--bind-pidfile.patch15
-rw-r--r--bind-pmake.patch64
-rw-r--r--bind-probe_ipv6.patch12
-rw-r--r--bind-pselect.patch15
-rw-r--r--bind-res_randomid.patch10
-rw-r--r--bind.spec127
-rw-r--r--bind9-openssl.patch30
-rw-r--r--host_991529+.diff206
-rw-r--r--named-chroot.init92
-rw-r--r--named.conf54
-rw-r--r--resolver.5224
-rw-r--r--utils-holelogd-linux.patch39
19 files changed, 653 insertions, 2001 deletions
diff --git a/bind-chroot-ndc.patch b/bind-chroot-ndc.patch
deleted file mode 100644
index 46eb5bf..0000000
--- a/bind-chroot-ndc.patch
+++ /dev/null
@@ -1,79 +0,0 @@
---- bind-8.2.3/src/bin/ndc/pathnames.h Mon Jan 29 19:39:52 2001
-+++ bind-8.2.3-p/src/bin/ndc/pathnames.h Mon Jan 29 19:36:34 2001
-@@ -21,58 +21,62 @@
-
- #include <paths.h>
-
-+#ifndef _CHROOTDIR
-+#define _CHROOTDIR "/var/lib/named/chroot"
-+#endif
-+
- #ifndef _PATH_CONF
--#define _PATH_CONF "/etc/named.conf"
-+#define _PATH_CONF _CHROOTDIR "/etc/named.conf"
- #endif
-
- #ifndef _PATH_DEBUG
--#define _PATH_DEBUG "named.run"
-+#define _PATH_DEBUG _CHROOTDIR "/var/tmp/named.run"
- #endif
-
- #ifndef _PATH_DUMPFILE
--#define _PATH_DUMPFILE "named_dump.db"
-+#define _PATH_DUMPFILE _CHROOTDIR "/var/tmp/named_dump.db"
- #endif
-
- #ifndef _PATH_NAMED
--#define _PATH_NAMED "/usr/sbin/named"
-+#define _PATH_NAMED _CHROOTDIR "/usr/sbin/named"
- #endif
-
- #ifndef _PATH_PIDFILE
--#define _PATH_PIDFILE "/var/run/named.pid"
-+#define _PATH_PIDFILE _CHROOTDIR "/var/run/named.pid"
- #endif
-
- #ifndef _PATH_NDCSOCK
- #ifdef NEED_SECURE_DIRECTORY
--#define _PATH_NDCSOCK "/var/run/ndc.d/ndc"
-+#define _PATH_NDCSOCK _CHROOTDIR "/var/run/ndc.d/ndc"
- #else
--#define _PATH_NDCSOCK "/var/run/ndc"
-+#define _PATH_NDCSOCK _CHROOTDIR "/var/run/ndc"
- #endif
- #endif
-
- #ifndef _PATH_STATS
--#define _PATH_STATS "named.stats"
-+#define _PATH_STATS _CHROOTDIR "/var/tmp/named.stats"
- #endif
-
- #ifndef _PATH_MEMSTATS
--#define _PATH_MEMSTATS "named.memstats"
-+#define _PATH_MEMSTATS _CHROOTDIR "/var/tmp/named.memstats"
- #endif
-
- #ifndef _PATH_TMPXFER
--#define _PATH_TMPXFER "xfer.ddt.XXXXXX"
-+#define _PATH_TMPXFER _CHROOTDIR "/var/tmp/xfer.ddt.XXXXXX"
- #endif
-
- #ifndef _PATH_XFER
--#define _PATH_XFER "/usr/sbin/named-xfer"
-+#define _PATH_XFER _CHROOTDIR "/usr/sbin/named-xfer"
- #endif
-
- #ifndef _PATH_XFERTRACE
--#define _PATH_XFERTRACE "xfer.trace"
-+#define _PATH_XFERTRACE _CHROOTDIR "/var/tmp/xfer.trace"
- #endif
-
- #ifndef _PATH_XFERDDT
--#define _PATH_XFERDDT "xfer.ddt"
-+#define _PATH_XFERDDT _CHROOTDIR "/var/tmp/xfer.ddt"
- #endif
-
- #ifndef _PATH_DEVNULL
--#define _PATH_DEVNULL "/dev/null"
-+#define _PATH_DEVNULL _CHROOTDIR "/dev/null"
- #endif
diff --git a/bind-fds.patch b/bind-fds.patch
deleted file mode 100644
index 54a3404..0000000
--- a/bind-fds.patch
+++ /dev/null
@@ -1,43 +0,0 @@
---- bind-8.1.2/src/lib/isc/eventlib.c~ Fri Mar 20 18:26:24 1998
-+++ bind-8.1.2/src/lib/isc/eventlib.c Wed Jan 6 17:44:03 1999
-@@ -290,9 +290,9 @@
- evPrintf(ctx, 4,
- "pselect(%d, 0x%lx, 0x%lx, 0x%lx, %d.%09ld)\n",
- ctx->fdMax+1,
-- (u_long)ctx->rdLast.fds_bits[0],
-- (u_long)ctx->wrLast.fds_bits[0],
-- (u_long)ctx->exLast.fds_bits[0],
-+ __FDS_BITS(&ctx->rdLast)[0],
-+ __FDS_BITS(&ctx->wrLast)[0],
-+ __FDS_BITS(&ctx->exLast)[0],
- tp ? tp->tv_sec : -1,
- tp ? tp->tv_nsec : -1);
-
---- bind-8.1.2/src/lib/isc/ev_files.c~ Thu Feb 5 20:53:52 1998
-+++ bind-8.1.2/src/lib/isc/ev_files.c Wed Jan 6 17:46:18 1999
-@@ -139,9 +139,9 @@
- evPrintf(ctx, 5,
- "evSelectFD(fd %d, mask 0x%x): new masks: 0x%lx 0x%lx 0x%lx\n",
- fd, eventmask,
-- (u_long)ctx->rdNext.fds_bits[0],
-- (u_long)ctx->wrNext.fds_bits[0],
-- (u_long)ctx->exNext.fds_bits[0]);
-+ __FDS_BITS(&ctx->rdNext)[0],
-+ __FDS_BITS(&ctx->wrNext)[0],
-+ __FDS_BITS(&ctx->exNext)[0]);
-
- return (0);
- }
-@@ -250,9 +250,9 @@
- evPrintf(ctx, 5,
- "evDeselectFD(fd %d, mask 0x%x): new masks: 0x%lx 0x%lx 0x%lx\n",
- del->fd, eventmask,
-- (u_long)ctx->rdNext.fds_bits[0],
-- (u_long)ctx->wrNext.fds_bits[0],
-- (u_long)ctx->exNext.fds_bits[0]);
-+ __FDS_BITS(&ctx->rdNext)[0],
-+ __FDS_BITS(&ctx->wrNext)[0],
-+ __FDS_BITS(&ctx->exNext)[0]);
-
- /* Couldn't free it before now since we were using fields out of it. */
- FREE(del);
diff --git a/bind-host.patch b/bind-host.patch
deleted file mode 100644
index f4de8e5..0000000
--- a/bind-host.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- bind-8.2/src/bin/host/host.c.host Mon Jan 11 16:15:38 1999
-+++ bind-8.2/src/bin/host/host.c Wed Mar 31 10:51:54 1999
-@@ -1310,6 +1310,7 @@
-
- amtToRead = len;
- cp = buf.qb2;
-+ if (amtToRead > NS_PACKETSZ) amtToRead=NS_PACKETSZ;
- while (amtToRead > 0 &&
- (numRead = read(sockFD, cp, amtToRead)) > 0) {
- cp += numRead;
diff --git a/bind-idn.patch b/bind-idn.patch
index 12dc898..59efbe1 100644
--- a/bind-idn.patch
+++ b/bind-idn.patch
@@ -1,199 +1,399 @@
-IDN patch for bind-9.3.0
-========================
-
-
-This is a patch file for ISC BIND 9.3.0 to make it work with
-internationalized domain names. With this patch you'll get IDN-aware
-dig/host/nslookup.
-
-To apply this patch, you should go to the top directory of the BIND
-distribution (where you see `README' file), then invoke `patch'
-command like this:
-
- % patch -p0 < this-file
-
-Then follow the instructions described in `README.idnkit' to compile
-and install.
-
-
-Index: README.idnkit
---- /dev/null Wed Sep 1 17:46:18 2004
-+++ README.idnkit Wed Sep 1 17:36:14 2004
-@@ -0,0 +1,113 @@
-+
-+ BIND-9 IDN patch
-+
-+ Japan Network Information Center (JPNIC)
-+
-+
-+* What is this patch for?
-+
-+This patch adds internationalized domain name (IDN) support to BIND-9.
-+You'll get internationalized version of dig/host/nslookup commands.
-+
-+ + internationalized dig/host/nslookup
-+ dig/host/nslookup accepts non-ASCII domain names in the local
-+ codeset (such as Shift JIS, Big5 or ISO8859-1) determined by
-+ the locale information. The domain names are normalized and
-+ converted to the encoding on the DNS protocol, and sent to DNS
-+ servers. The replies are converted back to the local codeset
-+ and displayed.
-+
-+
-+* Compilation & installation
+diff -urN bind-9.2.3.org/bin/dig/dig.1 bind-9.2.3/bin/dig/dig.1
+--- bind-9.2.3.org/bin/dig/dig.1 2003-10-24 23:31:26.000000000 +0200
++++ bind-9.2.3/bin/dig/dig.1 2003-10-24 23:46:54.000000000 +0200
+@@ -353,6 +353,17 @@
+ \fI+noqr\fR which means that \fBdig\fR
+ will not print the initial query when it looks up the NS records for
+ isc.org.
++.SH "IDN SUPPORT"
++.PP
++If \fBdig\fR has been built with IDN (internationalized
++domain name) support, it can accept and display non-ASCII domain names.
++\fBdig\fR appropriately converts character encoding of
++domain name before sending a request to DNS server or displaying a
++reply from the server.
++If you'd like to turn off the IDN support for some reason, defines
++the \fBIDN_DISABLE\fR environment variable.
++The IDN support is disabled if the the variable is set when
++\fBdig\fR runs.
+ .SH "FILES"
+ .PP
+ \fI/etc/resolv.conf\fR
+diff -urN bind-9.2.3.org/bin/dig/dig.docbook bind-9.2.3/bin/dig/dig.docbook
+--- bind-9.2.3.org/bin/dig/dig.docbook 2003-10-24 23:31:26.000000000 +0200
++++ bind-9.2.3/bin/dig/dig.docbook 2003-10-24 23:46:54.000000000 +0200
+@@ -529,6 +529,21 @@
+ </refsect1>
+
+ <refsect1>
++<title>IDN SUPPORT</title>
++<para>
++If <command>dig</command> has been built with IDN (internationalized
++domain name) support, it can accept and display non-ASCII domain names.
++<command>dig</command> appropriately converts character encoding of
++domain name before sending a request to DNS server or displaying a
++reply from the server.
++If you'd like to turn off the IDN support for some reason, defines
++the <envar>IDN_DISABLE</envar> environment variable.
++The IDN support is disabled if the the variable is set when
++<command>dig</command> runs.
++</para>
++</refsect1>
+
-+0. Prerequisite
++<refsect1>
+ <title>FILES</title>
+ <para>
+ <filename>/etc/resolv.conf</filename>
+diff -urN bind-9.2.3.org/bin/dig/dighost.c bind-9.2.3/bin/dig/dighost.c
+--- bind-9.2.3.org/bin/dig/dighost.c 2003-10-24 23:31:26.000000000 +0200
++++ bind-9.2.3/bin/dig/dighost.c 2003-10-24 23:46:54.000000000 +0200
+@@ -32,6 +32,17 @@
+ #include <string.h>
+ #include <limits.h>
+
++#ifdef HAVE_LOCALE_H
++#include <locale.h>
++#endif
+
-+You have to build and install idnkit before building this patched version
-+of bind-9.
++#ifdef WITH_IDN
++#include <idn/result.h>
++#include <idn/log.h>
++#include <idn/resconf.h>
++#include <idn/api.h>
++#endif
+
-+1. Running configure script
+ #include <dns/byaddr.h>
+ #include <dns/fixedname.h>
+ #include <dns/message.h>
+@@ -131,6 +142,18 @@
+ isc_mutex_t lookup_lock;
+ dig_lookup_t *current_lookup = NULL;
+
++#ifdef WITH_IDN
++static void initialize_idn(void);
++static isc_result_t output_filter(isc_buffer_t *buffer,
++ unsigned int used_org,
++ isc_boolean_t absolute);
++static idn_result_t append_textname(char *name, const char *origin,
++ size_t namesize);
++static void idn_check_result(idn_result_t r, const char *msg);
+
-+Run `configure' in the top directory. See `README' for the
-+configuration options.
++#define MAXDLEN 256
++#endif
+
-+This patch adds the following 4 options to `configure'. You should
-+at least specify `--with-idn' option to enable IDN support.
+ /*
+ * Apply and clear locks at the event level in global task.
+ * Can I get rid of these using shutdown events? XXX
+@@ -682,6 +705,10 @@
+ ISC_LIST_APPEND(server_list, srv, link);
+ }
+
++#ifdef WITH_IDN
++ initialize_idn();
++#endif
+
-+ --with-idn[=IDN_PREFIX]
-+ To enable IDN support, you have to specify `--with-idn' option.
-+ The argument IDN_PREFIX is the install prefix of idnkit. If
-+ IDN_PREFIX is omitted, PREFIX (derived from `--prefix=PREFIX')
-+ is assumed.
+ if (keyfile[0] != 0)
+ setup_file_key();
+ else if (keysecret[0] != 0)
+@@ -1202,6 +1229,14 @@
+ isc_buffer_t b;
+ dns_compress_t cctx;
+ char store[MXNAME];
++#ifdef WITH_IDN
++ idn_result_t mr;
++ char utf8_textname[MXNAME], utf8_origin[MXNAME], idn_textname[MXNAME];
++#endif
+
-+ --with-libiconv[=LIBICONV_PREFIX]
-+ Specify this option if idnkit you have installed links GNU
-+ libiconv. The argument LIBICONV_PREFIX is install prefix of
-+ GNU libiconv. If the argument is omitted, PREFIX (derived
-+ from `--prefix=PREFIX') is assumed.
++#ifdef WITH_IDN
++ dns_name_settotextfilter(output_filter);
++#endif
+
+ REQUIRE(lookup != NULL);
+ INSIST(!free_now);
+@@ -1230,6 +1265,17 @@
+ isc_buffer_init(&lookup->onamebuf, lookup->onamespace,
+ sizeof(lookup->onamespace));
+
++#ifdef WITH_IDN
++ /*
++ * We cannot convert `textname' and `origin' separately.
++ * `textname' doesn't contain TLD, but local mapping needs
++ * TLD.
++ */
++ mr = idn_encodename(IDN_LOCALCONV | IDN_DELIMMAP, lookup->textname,
++ utf8_textname, sizeof(utf8_textname));
++ idn_check_result(mr, "convert textname to UTF-8");
++#endif
+
-+ `--with-libiconv' is shorthand option for GNU libiconv.
+ /*
+ * If the name has too many dots, force the origin to be NULL
+ * (which produces an absolute lookup). Otherwise, take the origin
+@@ -1238,12 +1284,41 @@
+ * is TRUE or we got a domain line in the resolv.conf file.
+ */
+ /* XXX New search here? */
++#ifdef WITH_IDN
++ if ((count_dots(utf8_textname) >= ndots) || !usesearch)
++ lookup->origin = NULL; /* Force abs lookup */
++ else if (lookup->origin == NULL && lookup->new_search && usesearch) {
++ lookup->origin = ISC_LIST_HEAD(search_list);
++ }
++#else
+ if ((count_dots(lookup->textname) >= ndots) || !usesearch)
+ lookup->origin = NULL; /* Force abs lookup */
+ else if (lookup->origin == NULL && lookup->new_search && usesearch) {
+ lookup->origin = ISC_LIST_HEAD(search_list);
+ }
++#endif
+
-+ --with-libiconv=/usr/local
++#ifdef WITH_IDN
+ if (lookup->origin != NULL) {
++ mr = idn_encodename(IDN_LOCALCONV | IDN_DELIMMAP,
++ lookup->origin->origin, utf8_origin,
++ sizeof(utf8_origin));
++ idn_check_result(mr, "convert origin to UTF-8");
++ mr = append_textname(utf8_textname, utf8_origin,
++ sizeof(utf8_textname));
++ idn_check_result(mr, "append origin to textname");
++ }
++ mr = idn_encodename(IDN_LOCALMAP | IDN_NAMEPREP |
++ IDN_IDNCONV | IDN_LENCHECK, utf8_textname,
++ idn_textname, sizeof(idn_textname));
++ idn_check_result(mr, "convert UTF-8 textname to IDN encoding");
++#endif
+
-+ This is equivalent to:
++#ifdef WITH_IDN
++ if (0) {
++#else
++ if (lookup->origin != NULL) {
++#endif
+ debug("trying origin %s", lookup->origin->origin);
+ result = dns_message_gettempname(lookup->sendmsg,
+ &lookup->oname);
+@@ -1288,6 +1363,15 @@
+ if (lookup->trace && lookup->trace_root)
+ dns_name_clone(dns_rootname, lookup->name);
+ else {
++#ifdef WITH_IDN
++ len = strlen(idn_textname);
++ isc_buffer_init(&b, idn_textname, len);
++ isc_buffer_add(&b, len);
++ result = dns_name_fromtext(lookup->name, &b,
++ dns_rootname,
++ ISC_FALSE,
++ &lookup->namebuf);
++#else
+ len = strlen(lookup->textname);
+ isc_buffer_init(&b, lookup->textname, len);
+ isc_buffer_add(&b, len);
+@@ -1295,6 +1379,7 @@
+ dns_rootname,
+ ISC_FALSE,
+ &lookup->namebuf);
++#endif
+ }
+ if (result != ISC_R_SUCCESS) {
+ dns_message_puttempname(lookup->sendmsg,
+@@ -2723,3 +2808,101 @@
+ if (mctx != NULL)
+ isc_mem_destroy(&mctx);
+ }
+
-+ --with-iconv='-L/usr/local/lib -R/usr/local/lib -liconv'
++#ifdef WITH_IDN
++static void
++initialize_idn(void) {
++ idn_result_t r;
+
-+ `--with-libiconv' assumes that your C compiler has `-R'
-+ option, and that the option adds the specified run-time path
-+ to an exacutable binary. If `-R' option of your compiler has
-+ different meaning, or your compiler lacks the option, you
-+ should use `--with-iconv' option instead. Binary command
-+ without run-time path information might be unexecutable.
-+ In that case, you would see an error message like:
++#ifdef HAVE_SETLOCALE
++ /* Set locale */
++ (void)setlocale(LC_ALL, "");
++#endif
++ /* Create configuration context. */
++ r = idn_nameinit(1);
++ if (r != idn_success)
++ fatal("idn api initialization failed: %s",
++ idn_result_tostring(r));
+
-+ error in loading shared libraries: libiconv.so.2: cannot
-+ open shared object file
++ /* Set domain name -> text post-conversion filter. */
++ dns_name_settotextfilter(output_filter);
++}
+
-+ If both `--with-libiconv' and `--with-iconv' options are
-+ specified, `--with-iconv' is prior to `--with-libiconv'.
++static isc_result_t
++output_filter(isc_buffer_t *buffer, unsigned int used_org,
++ isc_boolean_t absolute)
++{
++ char tmp1[MAXDLEN], tmp2[MAXDLEN];
++ size_t fromlen, tolen;
++ isc_boolean_t end_with_dot;
+
-+ --with-iconv=ICONV_LIBSPEC
-+ If your libc doens't provide iconv(), you need to specify the
-+ library containing iconv() with this option. `ICONV_LIBSPEC'
-+ is the argument(s) to `cc' or `ld' to link the library, for
-+ example, `--with-iconv="-L/usr/local/lib -liconv"'.
-+ You don't need to specify the header file directory for "iconv.h"
-+ to the compiler, as it isn't included directly by bind-9 with
-+ this patch.
++ /*
++ * Copy contents of 'buffer' to 'tmp1', supply trailing dot
++ * if 'absolute' is true, and terminate with NUL.
++ */
++ fromlen = isc_buffer_usedlength(buffer) - used_org;
++ if (fromlen >= MAXDLEN)
++ return (ISC_R_SUCCESS);
++ memcpy(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++;
++ if (fromlen >= MAXDLEN)
++ return (ISC_R_SUCCESS);
++ tmp1[fromlen - 1] = '.';
++ }
++ tmp1[fromlen] = '\0';
+
-+ --with-idnlib=IDN_LIBSPEC
-+ With this option, you can explicitly specify the argument(s)
-+ to `cc' or `ld' to link the idnkit's library, `libidnkit'. If
-+ this option is not specified, `-L${PREFIX}/lib -lidnkit' is
-+ assumed, where ${PREFIX} is the installation prefix specified
-+ with `--with-idn' option above. You may need to use this
-+ option to specify extra argments, for example,
-+ `--with-idnlib="-L/usr/local/lib -R/usr/local/lib -lidnkit"'.
++ /*
++ * Convert contents of 'tmp1' to local encoding.
++ */
++ if (idn_decodename(IDN_DECODE_APP, tmp1, tmp2, MAXDLEN) != idn_success)
++ return (ISC_R_SUCCESS);
++ strcpy(tmp1, tmp2);
+
-+Please consult `README' for other configuration options.
++ /*
++ * Copy the converted contents in 'tmp1' back to 'buffer'.
++ * If we have appended trailing dot, remove it.
++ */
++ tolen = strlen(tmp1);
++ if (absolute && !end_with_dot && tmp1[tolen - 1] == '.')
++ tolen--;
+
-+Note that if you want to specify some extra header file directories,
-+you should use the environment variable STD_CINCLUDES instead of
-+CFLAGS, as described in README.
++ if (isc_buffer_length(buffer) < used_org + tolen)
++ return (ISC_R_NOSPACE);
+
-+2. Compilation and installation
++ isc_buffer_subtract(buffer, isc_buffer_usedlength(buffer) - used_org);
++ memcpy(isc_buffer_used(buffer), tmp1, tolen);
++ isc_buffer_add(buffer, tolen);
+
-+After running "configure", just do
++ return (ISC_R_SUCCESS);
++}
+
-+ make
-+ make install
++static idn_result_t
++append_textname(char *name, const char *origin, size_t namesize) {
++ size_t namelen = strlen(name);
++ size_t originlen = strlen(origin);
+
-+for compiling and installing.
++ /* Already absolute? */
++ if (namelen > 0 && name[namelen - 1] == '.')
++ return idn_success;
+
++ /* Append dot and origin */
+
-+* Contact information
++ if (namelen + 1 + originlen >= namesize)
++ return idn_buffer_overflow;
+
-+Please see http//www.nic.ad.jp/en/idn/ for the latest news
-+about idnkit and this patch.
++ name[namelen++] = '.';
++ (void)strcpy(name + namelen, origin);
++ return idn_success;
++}
+
-+Bug reports and comments on this kit should be sent to
-+mdnkit-bugs@nic.ad.jp and idn-cmt@nic.ad.jp, respectively.
++static void
++idn_check_result(idn_result_t r, const char *msg) {
++ if (r != idn_success) {
++ exitcode = 1;
++ fatal("%s: %s", msg, idn_result_tostring(r));
++ }
++}
+
++#endif /* WITH_IDN */
+diff -urN bind-9.2.3.org/bin/dig/host.1 bind-9.2.3/bin/dig/host.1
+--- bind-9.2.3.org/bin/dig/host.1 2003-10-24 23:31:26.000000000 +0200
++++ bind-9.2.3/bin/dig/host.1 2003-10-24 23:46:54.000000000 +0200
+@@ -164,6 +164,17 @@
+ option is used,
+ \fBhost\fR
+ will effectively wait forever for a reply. The time to wait for a response will be set to the number of seconds given by the hardware's maximum value for an integer quantity.
++.SH "IDN SUPPORT"
++.PP
++If
++\fBhost\fR
++has been built with IDN (internationalized domain name) support, it can accept and display non-ASCII domain names.
++\fBhost\fR
++appropriately converts character encoding of domain name before sending a request to DNS server or displaying a reply from the server. If you'd like to turn off the IDN support for some reason, defines the
++\fBIDN_DISABLE\fR
++environment variable. The IDN support is disabled if the the variable is set when
++\fBhost\fR
++runs.
+ .SH "FILES"
+ .PP
+ \fI/etc/resolv.conf\fR
+diff -urN bind-9.2.3.org/bin/dig/host.docbook bind-9.2.3/bin/dig/host.docbook
+--- bind-9.2.3.org/bin/dig/host.docbook 2003-10-24 23:31:26.000000000 +0200
++++ bind-9.2.3/bin/dig/host.docbook 2003-10-24 23:46:54.000000000 +0200
+@@ -181,6 +181,21 @@
+ </refsect1>
+
+ <refsect1>
++<title>IDN SUPPORT</title>
++<para>
++If <command>host</command> has been built with IDN (internationalized
++domain name) support, it can accept and display non-ASCII domain names.
++<command>host</command> appropriately converts character encoding of
++domain name before sending a request to DNS server or displaying a
++reply from the server.
++If you'd like to turn off the IDN support for some reason, defines
++the <envar>IDN_DISABLE</envar> environment variable.
++The IDN support is disabled if the the variable is set when
++<command>host</command> runs.
++</para>
++</refsect1>
+
-+; $Id$
-Index: config.h.in
-===================================================================
-RCS file: /proj/cvs/prod/bind9/config.h.in,v
-retrieving revision 1.47.2.3.2.11
-diff -U2 -r1.47.2.3.2.11 config.h.in
---- config.h.in 1 Sep 2004 07:18:30 -0000 1.47.2.3.2.11
-+++ config.h.in 1 Sep 2004 07:47:48 -0000
-@@ -17,5 +17,5 @@
- */
++<refsect1>
+ <title>FILES</title>
+ <para>
+ <filename>/etc/resolv.conf</filename>
+diff -urN bind-9.2.3.org/bin/dig/Makefile.in bind-9.2.3/bin/dig/Makefile.in
+--- bind-9.2.3.org/bin/dig/Makefile.in 2003-10-24 23:31:26.000000000 +0200
++++ bind-9.2.3/bin/dig/Makefile.in 2003-10-24 23:46:54.000000000 +0200
+@@ -36,7 +36,7 @@
--/* $Id$ */
-+/* $Id$ */
+ DEPLIBS = ${DNSDEPLIBS} ${ISCDEPLIBS}
- /***
-@@ -171,4 +171,7 @@
+-LIBS = ${DNSLIBS} ${ISCLIBS} @LIBS@
++LIBS = ${DNSLIBS} ${ISCLIBS} @IDNLIBS@ @LIBS@
+
+ SUBDIRS =
+
+diff -urN bind-9.2.3.org/config.h.in bind-9.2.3/config.h.in
+--- bind-9.2.3.org/config.h.in 2003-10-24 23:31:27.000000000 +0200
++++ bind-9.2.3/config.h.in 2003-10-24 23:46:54.000000000 +0200
+@@ -136,6 +136,9 @@
+ /* define if you have strerror in the C library. */
+ #undef HAVE_STRERROR
+
++/* Define if you have the setlocale function. */
++#undef HAVE_SETLOCALE
++
+ /* Define to 1 if you have the <dlfcn.h> header file. */
+ #undef HAVE_DLFCN_H
+
+@@ -163,6 +166,9 @@
+ /* Define to 1 if you have the <linux/capability.h> header file. */
#undef HAVE_LINUX_CAPABILITY_H
-+/* Define to 1 if you have the <locale.h> header file. */
++/* Define if you have the <locale.h> header file. */
+#undef HAVE_LOCALE_H
+
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
-@@ -177,4 +180,7 @@
- #undef HAVE_NET_IF6_H
-+/* Define to 1 if you have the `setlocale' function. */
-+#undef HAVE_SETLOCALE
-+
- /* Define to 1 if you have the <stdint.h> header file. */
- #undef HAVE_STDINT_H
-@@ -239,4 +245,7 @@
- /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
- #undef TIME_WITH_SYS_TIME
+@@ -182,6 +188,10 @@
+ #undef HAVE_SYS_PRCTL_H
+
+ /* Define to 1 if you have the <sys/select.h> header file. */
+
+/* define if idnkit support is to be included. */
+#undef WITH_IDN
++
+ #undef HAVE_SYS_SELECT_H
- /* Define to 1 if your processor stores words with the most significant byte
-Index: configure
-===================================================================
-RCS file: /proj/cvs/prod/bind9/configure,v
-retrieving revision 1.284.2.19.2.26
-diff -U2 -r1.284.2.19.2.26 configure
---- configure 1 Sep 2004 07:18:30 -0000 1.284.2.19.2.26
-+++ configure 1 Sep 2004 07:49:43 -0000
-@@ -15,5 +15,5 @@
- # PERFORMANCE OF THIS SOFTWARE.
- #
--# $Id$
-+# $Id$
- #
- # Portions Copyright (C) 1996-2001 Nominum, Inc.
-@@ -496,5 +496,5 @@
- #endif"
-
--ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS subdirs build build_cpu build_vendor build_os host host_cpu host_vendor host_os SET_MAKE RANLIB ac_ct_RANLIB INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA STD_CINCLUDES STD_CDEFINES STD_CWARNINGS CCOPT AR ARFLAGS LN ETAGS PERL CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP ISC_PLATFORM_HAVELONGLONG ISC_PLATFORM_HAVELIFCONF ISC_PLATFORM_NEEDSYSSELECTH LWRES_PLATFORM_NEEDSYSSELECTH USE_OPENSSL DST_OPENSSL_INC USE_GSSAPI DST_GSSAPI_INC DNS_CRYPTO_LIBS ALWAYS_DEFINES ISC_PLATFORM_USETHREADS ISC_THREAD_DIR MKDEPCC MKDEPCFLAGS MKDEPPROG IRIX_DNSSEC_WARNINGS_HACK purify_path PURIFY LN_S ECHO ac_ct_AR STRIP ac_ct_STRIP CXX CXXFLAGS ac_ct_CXX CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL O A SA LIBTOOL_MKDEP_SED LIBTOOL_MODE_COMPILE LIBTOOL_MODE_INSTALL LIBTOOL_MODE_LINK LIBBIND ISC_PLATFORM_HAVEIPV6 LWRES_PLATFORM_HAVEIPV6 ISC_PLATFORM_NEEDNETINETIN6H LWRES_PLATFORM_NEEDNETINETIN6H ISC_PLATFORM_NEEDNETINET6IN6H LWRES_PLATFORM_NEEDNETINET6IN6H ISC_PLATFORM_HAVEINADDR6 LWRES_PLATFORM_HAVEINADDR6 ISC_PLATFORM_NEEDIN6ADDRANY LWRES_PLATFORM_NEEDIN6ADDRANY ISC_PLATFORM_NEEDIN6ADDRLOOPBACK LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK ISC_PLATFORM_HAVEIN6PKTINFO ISC_PLATFORM_FIXIN6ISADDR ISC_IPV6_H ISC_IPV6_O ISC_ISCIPV6_O ISC_IPV6_C LWRES_HAVE_SIN6_SCOPE_ID ISC_PLATFORM_HAVESCOPEID ISC_PLATFORM_HAVEIF_LADDRREQ ISC_PLATFORM_HAVEIF_LADDRCONF ISC_PLATFORM_NEEDNTOP ISC_PLATFORM_NEEDPTON ISC_PLATFORM_NEEDATON ISC_PLATFORM_HAVESALEN LWRES_PLATFORM_HAVESALEN ISC_PLATFORM_MSGHDRFLAVOR ISC_PLATFORM_NEEDPORTT ISC_LWRES_NEEDADDRINFO ISC_LWRES_NEEDRRSETINFO ISC_LWRES_SETHOSTENTINT ISC_LWRES_ENDHOSTENTINT ISC_LWRES_GETNETBYADDRINADDR ISC_LWRES_SETNETENTINT ISC_LWRES_ENDNETENTINT ISC_LWRES_GETHOSTBYADDRVOID ISC_LWRES_NEEDHERRNO ISC_LWRES_GETIPNODEPROTO ISC_LWRES_GETADDRINFOPROTO ISC_LWRES_GETNAMEINFOPROTO ISC_PLATFORM_NEEDSTRSEP ISC_PLATFORM_NEEDMEMMOVE ISC_PLATFORM_NEEDSTRTOUL ISC_PLATFORM_NEEDSTRLCPY ISC_PLATFORM_NEEDSTRLCAT ISC_PLATFORM_NEEDSPRINTF LWRES_PLATFORM_NEEDSPRINTF ISC_PLATFORM_NEEDVSNPRINTF LWRES_PLATFORM_NEEDVSNPRINTF ISC_EXTRA_OBJS ISC_EXTRA_SRCS ISC_PLATFORM_QUADFORMAT ISC_PLATFORM_RLIMITTYPE ISC_PLATFORM_USEDECLSPEC LWRES_PLATFORM_USEDECLSPEC ISC_PLATFORM_BRACEPTHREADONCEINIT ISC_PLATFORM_HAVEIFNAMETOINDEX OPENJADE JADETEX PDFJADETEX SGMLCATALOG HTMLSTYLE PRINTSTYLE XMLDCL DOCBOOK2MANSPEC BIND9_TOP_BUILDDIR BIND9_ISC_BUILDINCLUDE BIND9_ISCCC_BUILDINCLUDE BIND9_ISCCFG_BUILDINCLUDE BIND9_DNS_BUILDINCLUDE BIND9_LWRES_BUILDINCLUDE BIND9_BIND9_BUILDINCLUDE BIND9_VERSION LIBOBJS LTLIBOBJS'
-+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS subdirs build build_cpu build_vendor build_os host host_cpu host_vendor host_os SET_MAKE RANLIB ac_ct_RANLIB INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA STD_CINCLUDES STD_CDEFINES STD_CWARNINGS CCOPT AR ARFLAGS LN ETAGS PERL CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP ISC_PLATFORM_HAVELONGLONG ISC_PLATFORM_HAVELIFCONF ISC_PLATFORM_NEEDSYSSELECTH LWRES_PLATFORM_NEEDSYSSELECTH USE_OPENSSL DST_OPENSSL_INC USE_GSSAPI DST_GSSAPI_INC DNS_CRYPTO_LIBS ALWAYS_DEFINES ISC_PLATFORM_USETHREADS ISC_THREAD_DIR MKDEPCC MKDEPCFLAGS MKDEPPROG IRIX_DNSSEC_WARNINGS_HACK purify_path PURIFY LN_S ECHO ac_ct_AR STRIP ac_ct_STRIP CXX CXXFLAGS ac_ct_CXX CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL O A SA LIBTOOL_MKDEP_SED LIBTOOL_MODE_COMPILE LIBTOOL_MODE_INSTALL LIBTOOL_MODE_LINK LIBBIND ISC_PLATFORM_HAVEIPV6 LWRES_PLATFORM_HAVEIPV6 ISC_PLATFORM_NEEDNETINETIN6H LWRES_PLATFORM_NEEDNETINETIN6H ISC_PLATFORM_NEEDNETINET6IN6H LWRES_PLATFORM_NEEDNETINET6IN6H ISC_PLATFORM_HAVEINADDR6 LWRES_PLATFORM_HAVEINADDR6 ISC_PLATFORM_NEEDIN6ADDRANY LWRES_PLATFORM_NEEDIN6ADDRANY ISC_PLATFORM_NEEDIN6ADDRLOOPBACK LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK ISC_PLATFORM_HAVEIN6PKTINFO ISC_PLATFORM_FIXIN6ISADDR ISC_IPV6_H ISC_IPV6_O ISC_ISCIPV6_O ISC_IPV6_C LWRES_HAVE_SIN6_SCOPE_ID ISC_PLATFORM_HAVESCOPEID ISC_PLATFORM_HAVEIF_LADDRREQ ISC_PLATFORM_HAVEIF_LADDRCONF ISC_PLATFORM_NEEDNTOP ISC_PLATFORM_NEEDPTON ISC_PLATFORM_NEEDATON ISC_PLATFORM_HAVESALEN LWRES_PLATFORM_HAVESALEN ISC_PLATFORM_MSGHDRFLAVOR ISC_PLATFORM_NEEDPORTT ISC_LWRES_NEEDADDRINFO ISC_LWRES_NEEDRRSETINFO ISC_LWRES_SETHOSTENTINT ISC_LWRES_ENDHOSTENTINT ISC_LWRES_GETNETBYADDRINADDR ISC_LWRES_SETNETENTINT ISC_LWRES_ENDNETENTINT ISC_LWRES_GETHOSTBYADDRVOID ISC_LWRES_NEEDHERRNO ISC_LWRES_GETIPNODEPROTO ISC_LWRES_GETADDRINFOPROTO ISC_LWRES_GETNAMEINFOPROTO ISC_PLATFORM_NEEDSTRSEP ISC_PLATFORM_NEEDMEMMOVE ISC_PLATFORM_NEEDSTRTOUL ISC_PLATFORM_NEEDSTRLCPY ISC_PLATFORM_NEEDSTRLCAT ISC_PLATFORM_NEEDSPRINTF LWRES_PLATFORM_NEEDSPRINTF ISC_PLATFORM_NEEDVSNPRINTF LWRES_PLATFORM_NEEDVSNPRINTF ISC_EXTRA_OBJS ISC_EXTRA_SRCS ISC_PLATFORM_QUADFORMAT ISC_PLATFORM_RLIMITTYPE ISC_PLATFORM_USEDECLSPEC LWRES_PLATFORM_USEDECLSPEC ISC_PLATFORM_BRACEPTHREADONCEINIT ISC_PLATFORM_HAVEIFNAMETOINDEX OPENJADE JADETEX PDFJADETEX SGMLCATALOG HTMLSTYLE PRINTSTYLE XMLDCL DOCBOOK2MANSPEC IDNLIBS BIND9_TOP_BUILDDIR BIND9_ISC_BUILDINCLUDE BIND9_ISCCC_BUILDINCLUDE BIND9_ISCCFG_BUILDINCLUDE BIND9_DNS_BUILDINCLUDE BIND9_LWRES_BUILDINCLUDE BIND9_BIND9_BUILDINCLUDE BIND9_VERSION LIBOBJS LTLIBOBJS'
- ac_subst_files='BIND9_MAKE_INCLUDES BIND9_MAKE_RULES LIBISC_API LIBISCCC_API LIBISCCFG_API LIBDNS_API LIBBIND9_API LIBLWRES_API'
-
-@@ -1081,4 +1081,8 @@
- include additional configurations [automatic]
+ /* Define to 1 if you have the <sys/sockio.h> header file. */
+diff -urN bind-9.2.3.org/configure bind-9.2.3/configure
+--- bind-9.2.3.org/configure 2003-10-24 23:31:27.000000000 +0200
++++ bind-9.2.3/configure 2003-10-24 23:46:55.000000000 +0200
+@@ -1007,6 +1007,10 @@
+ --with-gnu-ld assume the C compiler uses GNU ld default=no
+ --with-pic try to use only PIC/non-PIC objects default=use both
--with-kame=PATH use Kame IPv6 default path /usr/local/v6
+ --with-idn=MPREFIX enable IDN support using idnkit default PREFIX
+ --with-libiconv=IPREFIX GNU libiconv are in IPREFIX default PREFIX
@@ -201,183 +401,9 @@ diff -U2 -r1.284.2.19.2.26 configure
+ --with-idnlib=ARG specify libidnkit
Some influential environment variables:
-@@ -7921,5 +7925,5 @@
- *-*-irix6*)
- # Find out which ABI we are using.
-- echo '#line 7923 "configure"' > conftest.$ac_ext
-+ echo '#line 7927 "configure"' > conftest.$ac_ext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
-@@ -8911,5 +8915,5 @@
-
- # Provide some information about the compiler.
--echo "$as_me:8913:" \
-+echo "$as_me:8917:" \
- "checking for Fortran 77 compiler version" >&5
- ac_compiler=`set X $ac_compile; echo $2`
-@@ -9949,9 +9953,9 @@
- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
-- (eval echo "\"\$as_me:9951: $lt_compile\"" >&5)
-+ (eval echo "\"\$as_me:9955: $lt_compile\"" >&5)
- (eval "$lt_compile" 2>conftest.err)
- ac_status=$?
- cat conftest.err >&5
-- echo "$as_me:9955: \$? = $ac_status" >&5
-+ echo "$as_me:9959: \$? = $ac_status" >&5
- if (exit $ac_status) && test -s "$ac_outfile"; then
- # The compiler can only warn and ignore the option if not recognized
-@@ -10182,9 +10186,9 @@
- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
-- (eval echo "\"\$as_me:10184: $lt_compile\"" >&5)
-+ (eval echo "\"\$as_me:10188: $lt_compile\"" >&5)
- (eval "$lt_compile" 2>conftest.err)
- ac_status=$?
- cat conftest.err >&5
-- echo "$as_me:10188: \$? = $ac_status" >&5
-+ echo "$as_me:10192: \$? = $ac_status" >&5
- if (exit $ac_status) && test -s "$ac_outfile"; then
- # The compiler can only warn and ignore the option if not recognized
-@@ -10242,9 +10246,9 @@
- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
-- (eval echo "\"\$as_me:10244: $lt_compile\"" >&5)
-+ (eval echo "\"\$as_me:10248: $lt_compile\"" >&5)
- (eval "$lt_compile" 2>out/conftest.err)
- ac_status=$?
- cat out/conftest.err >&5
-- echo "$as_me:10248: \$? = $ac_status" >&5
-+ echo "$as_me:10252: \$? = $ac_status" >&5
- if (exit $ac_status) && test -s out/conftest2.$ac_objext
- then
-@@ -12426,5 +12430,5 @@
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<EOF
--#line 12428 "configure"
-+#line 12432 "configure"
- #include "confdefs.h"
-
-@@ -12524,5 +12528,5 @@
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<EOF
--#line 12526 "configure"
-+#line 12530 "configure"
- #include "confdefs.h"
-
-@@ -14707,9 +14711,9 @@
- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \