OSDN Git Service

fd2792edbbb727e5e8a685de7b8f3b2afecb2e64
[linuxjm/LDP_man-pages.git] / draft / man3 / rexec.3
1 .\" Copyright (c) 1983, 1991, 1993
2 .\"     The Regents of the University of California.  All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\"    must display the following acknowledgement:
14 .\"     This product includes software developed by the University of
15 .\"     California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\"    may be used to endorse or promote products derived from this software
18 .\"    without specific prior written permission.
19 .\"
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" SUCH DAMAGE.
31 .\"
32 .\"     @(#)rexec.3     8.1 (Berkeley) 6/4/93
33 .\" $FreeBSD: src/lib/libcompat/4.3/rexec.3,v 1.12 2004/07/02 23:52:14 ru Exp $
34 .\"
35 .\" Taken from FreeBSD 5.4; not checked against Linux reality (mtk)
36 .\"
37 .\" 2007-12-08, mtk, Converted from mdoc to man macros
38 .\"
39 .\" Japanese Version Copyright (c) 2005 Akihiro MOTOKI all rights reserved.
40 .\" Translated 2005-11-20, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
41 .\"
42 .TH REXEC 3 2010-09-10 "Linux" "Linux Programmer's Manual"
43 .\"O .SH NAME
44 .SH 名前
45 .\"O rexec \- return stream to a remote command
46 rexec \- リモートコマンドへのストリームを返す
47 .\"O .SH SYNOPSIS
48 .SH 書式
49 .nf
50 .\"O .BR "#define _BSD_SOURCE" "             /* See feature_test_macros(7) */"
51 .BR "#define _BSD_SOURCE" "             /* feature_test_macros(7) 参照 */"
52 .B #include <netdb.h>
53 .sp
54 .BI "int rexec(char **" ahost ", int " inport ", char *" user ", "
55 .BI "          char *" passwd ", char *" cmd ", int *" fd2p );
56 .fi
57 .\"O .SH DESCRIPTION
58 .SH 説明
59 .\"O This interface is obsoleted by
60 .\"O .BR rcmd (3).
61 このインタフェースは
62 .BR rcmd (3)
63 によって置き換えられた。
64
65 .\"O The
66 .\"O .BR rexec ()
67 .\"O function
68 .\"O looks up the host
69 .\"O .IR *ahost
70 .\"O using
71 .\"O .BR gethostbyname (3),
72 .\"O returning \-1 if the host does not exist.
73 .\"O Otherwise
74 .\"O .IR *ahost
75 .\"O is set to the standard name of the host.
76 .\"O If a username and password are both specified, then these
77 .\"O are used to authenticate to the foreign host; otherwise
78 .\"O the environment and then the user's
79 .\"O .I .netrc
80 .\"O file in his
81 .\"O home directory are searched for appropriate information.
82 .\"O If all this fails, the user is prompted for the information.
83 .BR rexec ()
84 関数は
85 .BR gethostbyname (3)
86 を使ってホスト
87 .I *ahost
88 を探す。ホストが存在しない場合は \-1 を返し、それ以外の場合には
89 .I *ahost
90 にそのホストの標準的な名前を設定する。
91 ユーザ名とパスワードの両方が指定された場合には、これらは
92 接続先のホストへの認証に利用される。そうでない場合には、
93 適切な情報を入手するために、環境変数と、そのユーザの
94 ホームディレクトリの
95 .I .netrc
96 ファイルが検索される。情報が見つからなかった時には、
97 ユーザに対して情報を入力するプロンプトが表示される。
98 .PP
99 .\"O The port
100 .\"O .I inport
101 .\"O specifies which well-known DARPA Internet port to use for
102 .\"O the connection; the call
103 .\"O .I "getservbyname(""exec"", ""tcp"")"
104 .\"O (see
105 .\"O .BR getservent (3))
106 .\"O will return a pointer to a structure, which contains the necessary port.
107 .\"O The protocol for connection is described in detail in
108 .\"O .BR rexecd (8).
109 ポート
110 .I inport
111 には、接続に使用する DARPA Internet の well-known ポートを指定する。
112 .I "getservbyname(""exec"", ""tcp"")"
113 を呼び出すと構造体へのポインタが返され
114 .RB ( getservent (3)
115 参照)、この構造体には必要なポートが入っている。
116 接続に使用されるプロトコルについての詳細は
117 .BR rexecd (8)
118 に書かれている (訳注: 現在のところ存在しない)。
119 .PP
120 .\"O If the connection succeeds,
121 .\"O a socket in the Internet domain of type
122 .\"O .BR SOCK_STREAM
123 .\"O is returned to
124 .\"O the caller, and given to the remote command as
125 .\"O .IR stdin
126 .\"O and
127 .\"O .IR stdout .
128 .\"O If
129 .\"O .I fd2p
130 .\"O is nonzero, then an auxiliary channel to a control
131 .\"O process will be setup, and a descriptor for it will be placed
132 .\"O in
133 .\"O .IR *fd2p .
134 接続に成功すると、インターネットドメインの
135 .B SOCK_STREAM
136 型のソケットが返され、そのソケットはリモートコマンドの
137 標準入力および標準出力となる。
138 .I fd2p
139 が 0 以外の場合、制御プロセスへの補助チャンネルがセットアップされ、
140 補助チャンネルのディスクリプタが
141 .I *fd2p
142 に書かれる。
143 .\"O The control process will return diagnostic
144 .\"O output from the command (unit 2) on this channel, and will also
145 .\"O accept bytes on this channel as being UNIX signal numbers, to be
146 .\"O forwarded to the process group of the command.
147 .\"O The diagnostic
148 .\"O information returned does not include remote authorization failure,
149 .\"O as the secondary connection is set up after authorization has been
150 .\"O verified.
151 制御プロセスはコマンドからの診断メッセージ出力 (ファイルディスクリプタ 2)
152 をこのチャンネルで返す。また、このチャンネル経由で
153 UNIX のシグナル番号を示すバイトを受信する。受信したシグナルは
154 コマンドが属すプロセスグループに転送される。
155 診断情報にはリモートの認証失敗は含まれない。なぜなら、認証の確認が行われた
156 後で補助チャンネルの接続はセットアップされるからである。
157 .\"O If
158 .\"O .I fd2p
159 .\"O is 0, then the
160 .\"O .IR stderr
161 .\"O (unit 2 of the remote
162 .\"O command) will be made the same as the
163 .\"O .IR stdout
164 .\"O and no
165 .\"O provision is made for sending arbitrary signals to the remote process,
166 .\"O although you may be able to get its attention by using out-of-band data.
167 .I fd2p
168 が 0 の場合、標準エラー (リモートコマンドのファイルディスクリプタ 2) は
169 標準出力と同様に扱われ、リモートプロセスに任意のシグナルを送るための
170 手段は提供されない。但し、リモートプロセスに対してトリガをかけるために、
171 帯域外データ (out-of-band data) を使うことはできる。
172 .\"O .SH "CONFORMING TO"
173 .SH 準拠
174 .\"O Not in POSIX.1-2001.
175 .\"O Present on the BSDs, Solaris, and many other systems.
176 POSIX.1-2001 にはない。
177 BSD 系、Solaris や他の多くのシステムに存在する。
178 .\"O The
179 .\"O .BR rexec ()
180 .\"O function appeared in
181 .\"O 4.2BSD.
182 .BR rexec ()
183 関数は 4.2BSD で始めて登場した。
184 .\"O .SH BUGS
185 .SH バグ
186 .\"O The
187 .\"O .BR rexec ()
188 .\"O function sends the unencrypted password across the network.
189 .BR rexec ()
190 関数はネットワークに暗号化されていないパスワードを送信する。
191 .PP
192 .\"O The underlying service is considered a big security hole and therefore
193 .\"O not enabled on many sites, see
194 .\"O .BR rexecd (8)
195 .\"O for explanations.
196 基礎的なサービスにおいては大きなセキュリティホールと考えられるため、
197 多くのサイトで無効になっている。詳細は
198 .BR rexecd (8)
199 を参照。
200 .\"O .SH SEE ALSO
201 .SH 関連項目
202 .BR rcmd (3),
203 .BR rexecd (8)