]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Disable IDN from environment as documented
authorPetr Menšík <pemensik@redhat.com>
Tue, 25 Sep 2018 16:08:46 +0000 (18:08 +0200)
committerOndřej Surý <ondrej@isc.org>
Fri, 5 Oct 2018 09:58:33 +0000 (05:58 -0400)
Manual page of host contained instructions to disable IDN processing
when it was built with libidn2. When refactoring IDN support however,
support for disabling IDN in host and nslookup was lost. Use also
environment variable and document it for nslookup, host and dig.

bin/dig/dig.docbook
bin/dig/dighost.c
bin/dig/host.docbook
bin/dig/nslookup.docbook

index 22ba7f2ed106a8b053285d13fd25e27db69097db..f177ca713e8e24d43d4a0298d86dfba653983d0f 100644 (file)
@@ -1330,7 +1330,9 @@ dig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr
       reply from the server.
       If you'd like to turn off the IDN support for some reason, use
       parameters <parameter>+noidnin</parameter> and
-      <parameter>+noidnout</parameter>.
+      <parameter>+noidnout</parameter> or define
+      the <envar>IDN_DISABLE</envar> environment variable.
+
     </para>
   </refsection>
 
index 2903bb020c05a13c86350dac66596a2ea8a07a20..522c5761f448e19b1df1a1d7002216ae9374b08d 100644 (file)
@@ -628,8 +628,8 @@ make_empty_lookup(void) {
        looknew->ttlunits = false;
        looknew->qr = false;
 #ifdef HAVE_LIBIDN2
-       looknew->idnin = true;
-       looknew->idnout = true;
+       looknew->idnin = (getenv("IDN_DISABLE") == NULL);
+       looknew->idnout = looknew->idnin;
 #else
        looknew->idnin = false;
        looknew->idnout = false;
index 36fcf51de4a4ce4c6cb99f1868101bde74e4c400..1db8798d30f94a348d76b8a4e17c24d9e10ff42f 100644 (file)
       <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
+      If you'd like to turn off the IDN support for some reason, define
       the <envar>IDN_DISABLE</envar> environment variable.
       The IDN support is disabled if the variable is set when
       <command>host</command> runs.
index 3aff4e984dd22390f2552d07cce33a90c8dac3d9..86a09c658e2d550ba97941cc126ae7559f7312fb 100644 (file)
@@ -478,6 +478,21 @@ nslookup -query=hinfo  -timeout=10
     </para>
   </refsection>
 
+  <refsection><info><title>IDN SUPPORT</title></info>
+
+    <para>
+      If <command>nslookup</command> has been built with IDN (internationalized
+      domain name) support, it can accept and display non-ASCII domain names.
+      <command>nslookup</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, define
+      the <envar>IDN_DISABLE</envar> environment variable.
+      The IDN support is disabled if the variable is set when
+      <command>nslookup</command> runs.
+    </para>
+  </refsection>
+
   <refsection><info><title>FILES</title></info>
 
     <para><filename>/etc/resolv.conf</filename>