summaryrefslogtreecommitdiff
path: root/contrib/idn/mdnkit/doc/en/spec/runmdn.html
blob: 33ee04033655d6d97bfa2421a255704ba8ae1738 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
<!doctype html public "-//IETF//DTD HTML 2.0//EN">
<!-- $Id: runmdn.html,v 1.1 2001/03/05 12:58:03 tale Exp $ -->
<html>

<head>
<title>runmdn specification</title>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
</head>

<body>

<h1>runmdn</h1>

<p>&nbsp;<p>

<h2><a name="overview">Tv</a></h2>
<h2><a name="overview">Overview</a></h2>

<p><b>runmdn</b>  BIND-4 邢 BIND-8 x[XƂ
]oCuƒNCAgA
ăRpCȂɑhC悤ɂ邽߂̃R}hłB
<p>The <b>runmdn</b> command allows clients that use a BIND-4 or BIND-8 based resolver library to support multilingual domain names without re-compiling.
<p>

<h2><a name="invoke">N</a></h2>
<h2><a name="invoke">Invoke</a></h2>

<blockquote>
<pre>
% runmdn <i>R}h</i> [<i>...</i>]
</pre>
</blockquote>
<blockquote>
<pre>
% runmdn <i>Command</i> [<i>Argument...</i>]
</pre>
</blockquote>

<p><tt>telnet</tt> R}hőhC߂ɂ
̂悤ɂ܂B
<p>For example, multilingual domain names can be supported using a <tt>telnet</tt> command as follows.
<blockquote>
<pre>
% runmdn telnet OC.ǂ̉.jp
</pre>
</blockquote>
<blockquote>
<pre>
% runmdn telnet OC.ǂ̉.jp
</pre>
</blockquote>

<h2><a name="invoke"></a></h2>
<h2><a name="invoke">Implementation</a></h2>

<p><b>runmdn</b> ͋LCũv[h@\pāAW
]oCuɊ܂܂֐̈ꕔAhC̏@\
ʂ̃o[WɓIɒu邱ƂŁANCAgł̑hC
܂B
<p><b>runmdn</b> implements processing of multilingual domain names by the client using the pre-load mechanism of the common library, and dynamically replaces a part of function included in the standard resolver library with another version that has a multilingual domain name processing function.

<p>̃VXeł͋LCũv[h͊‹ϐ
<em>LD_PRELOAD</em> pĎĂ܂B̊‹ϐɃv[h
LCut@C̃pXw肷ƁANCAg̎sɁA
AvP[VɕW̋LCuNO
w肵CuN܂BɂĕW̃Cu֐
u邱Ƃł܂B
<p>In many systems, pre-loading of the common library is implemented using an environmental variable <em>LD_PRELOAD</em>. By specifying the path name of the common library file to pre-load in this environmental variable, when the client executes, the specified library is linked before the standard common library of the application is linked. Because of this, the standard library function can be replaced.

<p>āA<b>runmdn</b> ̎̂́Å‹ϐݒ肵A
w肳ꂽR}hN邾̃VFXNvgłAۂ
hC̏ŝ̓AvP[VɃN
LCu <b>libmdnresolv</b> łB
<p>Therefore, in reality <b>runmdn</b> is a shell script that sets this environmental variable and invokes the commands specified by arguments, and actual multilingual domain name processing is performed by the shared library <b>libmdnresolv</b> linked to the application.

<p><b>libmdnresolv</b> N邱ƂɂABIND4 邢 BIND8 x[X
]oCuŗpĂ鎟̊֐u܂B
<p>By linking <b>libmdnresolv</b>, the following functions used by BIND4 or BIND8 based resolver library are replaced.
<blockquote>
<pre>
dn_comp
dn_expand
res_hnok
res_ownok
res_mailok
res_dnok
</pre>
</blockquote>

<p>ꂼ̕ύX_ȒPɋLq܂B
<p>Changes in each function are briefly explained below.
<dl>
<dt>dn_comp<dd>
w肳ꂽhC DNS vgRŗphCf[^ɕϊOɁA
[JR[hZbg DNS vgRŗpGR[fBOւ
ϊѐKA(KvȂ) ZLD̕ts܂B
<br>Before the specified domain name is converted to the domain data for the DNS protocol, conversion from local encoding to the code set used by the DNS protocol and normanization, and addition of ZLD (if necessary) are performed.
<dt>dn_expand<dd>
DNS vgRŗphCf[^hCɕϊA
(KvȂ) ZLD 폜A[JR[hZbgւ̕ϊs܂B
܂ʏ킱̊֐̓hCɊ܂܂ ASCII ȊO̕
obNXbVGXP[v鏈܂A}܂B
<br>After the domain data used in DNS protocol is converted to the domain name text string, deletion of ZLD (if necessary) and conversion to local code set are performed.
Usually, this function applies backslash escape to non-ASCII characters but this processing is suppressed.
<dt>res_hnok<dd>
ǂȕłȕłƔf悤ɂ܂B
<br>All characters are determined to be valid.
<dt>res_ownok<dd>
ǂȕłȕłƔf悤ɂ܂B
<br>All characters are determined to be valid.
<dt>res_mailok<dd>
ǂȕłȕłƔf悤ɂ܂B
<br>All characters are determined to be valid.
<dt>res_dnok<dd>
ǂȕłȕłƔf悤ɂ܂B
<br>All characters are determined to be valid.
</dl>

<p>GR[fBOϊ␳KAZLD ׂ̏͂
<a href="library.html">MDN Cu</a> (libmdn) 
<a href="library.html#res">res W[</a>gpĂ܂B
<p>For all processing such as encoding conversion, normalization and ZLD, <a href="library.html#res">res module</a> of <a href="library.html">MDN library</a> (libmdn) is used.
<blockquote>
݂̎ł <b>libmdnresolv</b>  MDN Cu (libmdn) 
Ăяôł͂ȂAlibmdn ̂ɕނ悤Ȍ`ԂɂȂĂ܂A
͒PȂ̓s炻ȂĂ邾ŁA_Iɂ MDN
Cű@\ĂяoĂƂĂ悢ł傤B
<br>In the current implementation, <b>libmdnresolv</b> does not call the MDN library (libmdn) but holds libmdn itself internally. This is for convenience in implementation, but logically, the MDN library function is being called.
</blockquote>

<p>܂gpGR[fBO␳K̐ݒ
<a href="clientconfig.html">NCAgݒt@C</a>̐ݒ
p܂B
<p>Also, use "setup"in <a href="clientconfig.html">client configuration file</a>for encoding or normalization setup.

<h2><a name="invoke"></a></h2>
<h2><a name="invoke">Restrictions</a></h2>

<p><b>runmdn</b> ɂ͂‚̐AǂȃVXełg킯ł
܂B
<p>There are certain restrictions on <b>runmdn</b> and it cannot be used in every system.
<ul>
<li>runmdn ͋LCu̓IN@\pĂ̂ŁA
LCugpłVXełȂ΂Ȃ܂B
<li>Since runmdn uses the dynamic link mechanism of the shared library, the system must be able to use the shared library.
<li>܂‹ϐ <em>LD_PRELOAD</em> ܂͗ގ̋@\ɂ
Cũv[h@\ƒVXełȂ΂Ȃ܂B
<li>Also, the system must have a library pre-load function using the <em>LD_PRELOAD</em> environmental variable or similar mechanism.
<li>runmdn ̑ΏۂƂȂR}h̓]oCuX^eBbNN
ĂĂ͂Ȃ܂B
<li>The target commands of runmdn must not statically link the resolver library.
<li>VXẽCu iconv() ֐񋟂ĂȂꍇAO
Cup邱ƂɂȂ܂ÃCuLCu
Ȃ΂Ȃ܂B
<li>When the system's library does not provide an iconv() function, an external library is used. This library must be a shared library.
<li>VXẽ]oCu BIND4 邢 BIND8 x[X̂̂łȂ
Ȃ܂B
<li>System's resolver library must be BIND4 or BIND8 based. 
<li>ZLeB̗Rʂ setuid ꂽR}h̓v[h@\
gȂ悤ɂȂĂ̂ŁAsetuid ꂽR}hłĂ͂Ȃ܂B
<li>For security reasons, generally speaking setuid commands cannot use a pre-load function, therefore, the command must not be setuid.
</ul>

</body>
</html>