FreeBSD QandA 750
Q. FreeBSD 2.2.7-RELEASE の machine に ~/.rhosts を設定して、
その設定をした別の machine から以下を実行すると、
% rsh host ls
次のようなメッセージがでて
Broken pipe
実行できません。~/.rhosts の記述は正しく行っていると思うのですが、
なぜでしょうか?
また、正しく動作させるには、どうしたらいいのでしょうか?
A. FreeBSD 2.2.7-RELEASE の /usr/libexec/rshd には、Bug があります。
ERRATA.TXT (revision 1.1.2.5)に、次のように書かれています。
--------------< ERRATA.TXT revision 1.1.2.5 の一部 >-----------------------
o rshd was broken during -Wall cleanup, as noted in PR#7500
Fix: This was fixed in the 2.2-stable branch as of 1998/07/24 04:32:21
in revision 1.9.2.9 of /usr/src/libexec/rshd/rshd.c. Obtain the
fixed version via CVSup (see instructions in handbook or simply
``pkg_add ftp://ftp.freebsd.org/pub/FreeBSD/CVSup/cvsupit.tgz''
and follow the instructions) or get it from FTP at:
ftp://ftp.freebsd.org/pub/FreeBSD/FreeBSD-stable/src/libexec/rshd/rshd.c
--------------< ERRATA.TXT revision 1.1.2.5 の一部 >-----------------------
正しく動作させるようにするには、上に書かれているように source file を
とってきて、 rshd を作り直して、差し換えましょう。なお、上記ファイルは
ftp.jp.FreeBSD.org 等のミラーサイトにもあります。
source file が /usr/src の下に展開されている場合、次のような手順で差し換える
ことができます。
ここでは、ftp で /tmp に rshd.c (revision 1.9.2.9) をとってきているとします。
# cd /usr/src/libexec/rshd
# cp rshd.c rshd.c.orig
# cp /tmp/rshd.c rshd.c
# make
# make install
これで、/usr/libexec/rshd の差し換えができていますので、~/.rhosts 等を設定して
rsh の動作を確認してみてください。
間違い・追加情報を見付けた場合は、
修正案の投稿のしかた を読んだ上で、
QandA@jp.FreeBSD.org まで
お知らせください。