/[packages]/cauldron/bind/current/SOURCES/bind-9.11-host-idn-disable.patch
ViewVC logotype

Contents of /cauldron/bind/current/SOURCES/bind-9.11-host-idn-disable.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1345740 - (show annotations) (download)
Fri Dec 28 17:50:01 2018 UTC (2 years ago) by guillomovitch
File size: 3713 byte(s)
- split shared libraries in subpackages
- sync with fedora setup:
 - use /var/named/chroot and /var/named/chroot_sdb as chroot roots
 - ship chroot files and systemd units in distinct subpackages
 - use fedora setup-named-chroot script

1 From ed26f0f0eb4242706d2012e4abe0152071bb305b Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <pemensik@redhat.com>
3 Date: Tue, 25 Sep 2018 18:08:46 +0200
4 Subject: [PATCH] Disable IDN from environment as documented
5
6 Manual page of host contained instructions to disable IDN processing
7 when it was built with libidn2. When refactoring IDN support however,
8 support for disabling IDN in host and nslookup was lost. Use also
9 environment variable and document it for nslookup, host and dig.
10
11 Support variable CHARSET=ASCII to disable IDN, supported in downstream
12 RH patch since RHEL 5.
13 ---
14 bin/dig/dig.docbook | 4 +++-
15 bin/dig/dighost.c | 9 +++++++--
16 bin/dig/host.docbook | 2 +-
17 bin/dig/nslookup.docbook | 15 +++++++++++++++
18 4 files changed, 26 insertions(+), 4 deletions(-)
19
20 diff --git a/bin/dig/dig.docbook b/bin/dig/dig.docbook
21 index bd7510e..5cc696f 100644
22 --- a/bin/dig/dig.docbook
23 +++ b/bin/dig/dig.docbook
24 @@ -1288,7 +1288,9 @@ dig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr
25 reply from the server.
26 If you'd like to turn off the IDN support for some reason, use
27 parameters <parameter>+noidnin</parameter> and
28 - <parameter>+noidnout</parameter>.
29 + <parameter>+noidnout</parameter> or define
30 + the <envar>IDN_DISABLE</envar> environment variable.
31 +
32 </para>
33 </refsection>
34
35 diff --git a/bin/dig/dighost.c b/bin/dig/dighost.c
36 index 341ed80..bb8702c 100644
37 --- a/bin/dig/dighost.c
38 +++ b/bin/dig/dighost.c
39 @@ -825,12 +825,17 @@ make_empty_lookup(void) {
40 looknew->seenbadcookie = false;
41 looknew->badcookie = true;
42 #ifdef WITH_IDN_SUPPORT
43 - looknew->idnin = true;
44 + looknew->idnin = (getenv("IDN_DISABLE") == NULL);
45 + if (looknew->idnin) {
46 + const char *charset = getenv("CHARSET");
47 + if (charset && !strcmp(charset, "ASCII"))
48 + looknew->idnin = false;
49 + }
50 #else
51 looknew->idnin = false;
52 #endif
53 #ifdef WITH_IDN_OUT_SUPPORT
54 - looknew->idnout = true;
55 + looknew->idnout = looknew->idnin;
56 #else
57 looknew->idnout = false;
58 #endif
59 diff --git a/bin/dig/host.docbook b/bin/dig/host.docbook
60 index 9c3aeaa..42cbbf9 100644
61 --- a/bin/dig/host.docbook
62 +++ b/bin/dig/host.docbook
63 @@ -378,7 +378,7 @@
64 <command>host</command> appropriately converts character encoding of
65 domain name before sending a request to DNS server or displaying a
66 reply from the server.
67 - If you'd like to turn off the IDN support for some reason, defines
68 + If you'd like to turn off the IDN support for some reason, define
69 the <envar>IDN_DISABLE</envar> environment variable.
70 The IDN support is disabled if the variable is set when
71 <command>host</command> runs.
72 diff --git a/bin/dig/nslookup.docbook b/bin/dig/nslookup.docbook
73 index 3aff4e9..86a09c6 100644
74 --- a/bin/dig/nslookup.docbook
75 +++ b/bin/dig/nslookup.docbook
76 @@ -478,6 +478,21 @@ nslookup -query=hinfo -timeout=10
77 </para>
78 </refsection>
79
80 + <refsection><info><title>IDN SUPPORT</title></info>
81 +
82 + <para>
83 + If <command>nslookup</command> has been built with IDN (internationalized
84 + domain name) support, it can accept and display non-ASCII domain names.
85 + <command>nslookup</command> appropriately converts character encoding of
86 + domain name before sending a request to DNS server or displaying a
87 + reply from the server.
88 + If you'd like to turn off the IDN support for some reason, define
89 + the <envar>IDN_DISABLE</envar> environment variable.
90 + The IDN support is disabled if the variable is set when
91 + <command>nslookup</command> runs.
92 + </para>
93 + </refsection>
94 +
95 <refsection><info><title>FILES</title></info>
96
97 <para><filename>/etc/resolv.conf</filename>
98 --
99 2.14.4
100

  ViewVC Help
Powered by ViewVC 1.1.28