Bug 811566

Summary: Unable to disable IDN at "dig" out put
Product: Red Hat Enterprise Linux 5 Reporter: Kamal Maiti <kmaiti>
Component: bind97Assignee: Adam Tkac <atkac>
Status: CLOSED ERRATA QA Contact: Branislav Blaškovič <bblaskov>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.8CC: azelinka, bblaskov, ovasik, pyaduvan
Target Milestone: rc   
Target Release: 5.8   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 833868 (view as bug list) Environment:
Red Hat Enterprise Linux 5.8
Last Closed: 2013-01-08 04:06:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 833868, 858990    

Description Kamal Maiti 2012-04-11 12:51:40 UTC
Description of problem:

A. Cu would like to disable idn display. So, he tried to execute following commands :

[root@]# dig axfr . @k.root-servers.net | grep 'xn--'
[root@]# env IDN_DISALBE=t dig axfr . @k.root-servers.net | grep 'xn--'

He is unable to disable.

Version-Release number of selected component (if applicable):

bind97-utils-9.7.0-6.P2.el5_7.4.x86_64

How reproducible:

$ dig axfr . @k.root-servers.net | grep 'xn--'
$ env IDN_DISALBE=t dig axfr . @k.root-servers.net | grep 'xn--'

B. Secondly,  as per manual of "dig" in connection with IDN, cu doesn't get expected result. He would like to modify this document too. 

From manual : 
----snip------
IDN SUPPORT
       If dig has been built with IDN (internationalized domain name) support, it can accept and display non-ASCII domain
       names.  dig 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 IDN_DISABLE
       environment variable. The IDN support is disabled if the variable is set when dig runs.
-----snip-----

Steps to Reproduce:
1.
2.
3.
  
Actual results:

dig out put doesn't show non-IDN domains

Expected results:

dig out put will show non-IDN domains

Additional info:

Following work around solution works fine :

To obtain the xn-- variations the easiest options is simply to run with LANG=ASCII  which forces the conversion regardless.

$ LANG=ASCII dig axfr . @k.root-servers.net | grep '^xn--' | wc -l 
328

$ LANG=ASCII dig axfr . @k.root-servers.net | grep '^xn--' | head
xn--0zwm56d.		172800	IN	NS	a.iana-servers.net.
xn--0zwm56d.		172800	IN	NS	b.iana-servers.net.
xn--0zwm56d.		172800	IN	NS	c.iana-servers.net.
xn--0zwm56d.		86400	IN	DS	56231 8 1 A4F7756C0B5E82D9E31E8649F097B81F4E28F683
xn--0zwm56d.		86400	IN	DS	56231 8 2 D569A173FA0099A428A4B5E0EAF6ED445309C9D76F2D8FB4CE83AEF5 AE79D593
xn--0zwm56d.		86400	IN	RRSIG	DS 8 1 86400 20120329000000 20120321230000 51201 . loklh26PX7NrzAbJTxQqsxTn6HwZGujDeeLxKHtXI88JYBxHEgHkurKr ZgYljw/t1mRgLghldcJ6iNEti2IjfKZgdsK5O6fbp0tFziuCltTg/Hjr 1BX9GMehkZeXaTQgiO7YmPSe1vfzYqnB4Rg395XOByEzUqIZOPejxDod 0Tg=
xn--0zwm56d.		86400	IN	RRSIG	NSEC 8 1 86400 20120329000000 20120321230000 51201 . BUnkUos+NR/iRfS73w3qn+BZcXCsAjP2wandklKrxydxS4LGrPoK7gda 3x1JCFPnJwtJf0PGRZd4AEo3wHomhQPARhtaUWOm+h/qAOEo1IiXlz0h +CmOlBrP+UoFF6/7WMTHKvnX3WzgnvsNHO1AgQN0qtPyHSmRptuIZnOC Um8=
xn--0zwm56d.		86400	IN	NSEC	xn--11b5bs3a9aj6g. NS DS RRSIG NSEC
xn--11b5bs3a9aj6g.	172800	IN	NS	a.iana-servers.net.
xn--11b5bs3a9aj6g.	172800	IN	NS	b.iana-servers.net.

FYI : As currently built, if the code thinks the terminal can handle characters >127 then it will output the domain names in true format.

Comment 1 Adam Tkac 2012-04-12 09:02:07 UTC
The manual page is wrong. IDN support in Red Hat distributions is based on libidn library (instead of idnkit, which is shipped as part of BIND source). The IDN_DISABLE environment variable is idnkit-specific option. The correct libidn environment option is "CHARSET", which is similar to LANG. I.e. you can run

export CHARSET=ASCII
dig axfr . @k.root-servers.net |grep '^xn--'

I will update manual page appropriately, thanks for the report.

Comment 3 RHEL Program Management 2012-04-12 09:16:59 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.

Comment 4 RHEL Program Management 2012-04-17 13:47:25 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.

Comment 11 errata-xmlrpc 2013-01-08 04:06:35 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0043.html