From: Petr Menšík Date: Tue, 25 Sep 2018 16:08:46 +0000 (+0200) Subject: Disable IDN from environment as documented X-Git-Tag: v9.13.4~121^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec1d9b80f5c95f25d56f10b2cbbc1731f53fe195;p=thirdparty%2Fbind9.git Disable IDN from environment as documented 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. --- diff --git a/bin/dig/dig.docbook b/bin/dig/dig.docbook index 22ba7f2ed10..f177ca713e8 100644 --- a/bin/dig/dig.docbook +++ b/bin/dig/dig.docbook @@ -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 +noidnin and - +noidnout. + +noidnout or define + the IDN_DISABLE environment variable. + diff --git a/bin/dig/dighost.c b/bin/dig/dighost.c index 2903bb020c0..522c5761f44 100644 --- a/bin/dig/dighost.c +++ b/bin/dig/dighost.c @@ -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; diff --git a/bin/dig/host.docbook b/bin/dig/host.docbook index 36fcf51de4a..1db8798d30f 100644 --- a/bin/dig/host.docbook +++ b/bin/dig/host.docbook @@ -389,7 +389,7 @@ host 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 IDN_DISABLE environment variable. The IDN support is disabled if the variable is set when host runs. diff --git a/bin/dig/nslookup.docbook b/bin/dig/nslookup.docbook index 3aff4e984dd..86a09c658e2 100644 --- a/bin/dig/nslookup.docbook +++ b/bin/dig/nslookup.docbook @@ -478,6 +478,21 @@ nslookup -query=hinfo -timeout=10 + IDN SUPPORT + + + If nslookup has been built with IDN (internationalized + domain name) support, it can accept and display non-ASCII domain names. + nslookup 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 IDN_DISABLE environment variable. + The IDN support is disabled if the variable is set when + nslookup runs. + + + FILES /etc/resolv.conf