From owner-freebsd-arch Sat Sep 16 9:26:34 2000 Delivered-To: freebsd-arch@freebsd.org Received: from peace.mahoroba.org (peace.calm.imasy.or.jp [202.227.26.34]) by hub.freebsd.org (Postfix) with ESMTP id 2CB1037B422; Sat, 16 Sep 2000 09:26:21 -0700 (PDT) Received: from localhost (localhost [::1]) (authenticated) by peace.mahoroba.org (8.11.0/8.11.0/peace) with ESMTP/inet6 id e8GGPjM01016; Sun, 17 Sep 2000 01:25:45 +0900 (JST) (envelope-from ume@mahoroba.org) Date: Sun, 17 Sep 2000 01:25:42 +0900 (JST) Message-Id: <20000917.012542.78700152.ume@mahoroba.org> To: kris@FreeBSD.org Cc: will@physics.purdue.edu, arch@FreeBSD.org Subject: Re: Rsh/Rlogin/Rcmd & friends From: Hajimu UMEMOTO In-Reply-To: References: <20000916055225C.ume@mahoroba.org> X-Mailer: xcite1.20> Mew version 1.95b38 on Emacs 20.7 / Mule 4.0 =?iso-2022-jp?B?KBskQjJWMWMbKEIp?= X-PGP-Public-Key: http://www.imasy.org/~ume/publickey.asc X-PGP-Fingerprint: 6B 0C 53 FC 5D D0 37 91 05 D0 B3 EF 36 9B 6A BC X-URL: http://www.imasy.org/~ume/ X-OS: FreeBSD 5.0-CURRENT Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >>>>> On Fri, 15 Sep 2000 14:18:55 -0700 (PDT) >>>>> Kris Kennaway said: kris> It would probably be better to check and evironment variable TAR_RSH and kris> use that (like CVS_RSH and others) Yes. I rewrote to use TAR_RSH. Index: gnu/usr.bin/tar/Makefile diff -u gnu/usr.bin/tar/Makefile.orig gnu/usr.bin/tar/Makefile --- gnu/usr.bin/tar/Makefile.orig Tue Sep 22 02:20:08 1998 +++ gnu/usr.bin/tar/Makefile Sun Sep 17 01:03:20 2000 @@ -6,7 +6,7 @@ CFLAGS+= -DHAVE_GETGRGID=1 -DHAVE_GETPWUID=1 -DHAVE_STRING_H=1 CFLAGS+= -DHAVE_LIMITS_H=1 -DHAVE_STRSTR=1 -DHAVE_VALLOC=1 -DHAVE_MKDIR=1 CFLAGS+= -DHAVE_MKNOD=1 -DHAVE_RENAME=1 -DHAVE_FTRUNCATE=1 -DHAVE_GETCWD=1 -CFLAGS+= -DBSD42=1 -DHAVE_VPRINTF=1 -DNEEDPAD -I${.CURDIR} +CFLAGS+= -DBSD42=1 -DHAVE_VPRINTF=1 -DNEEDPAD -DSTDC_HEADERS=1 -I${.CURDIR} CFLAGS+= -DDEF_AR_FILE=\"/dev/rsa0\" -DDEFBLOCKING=20 YFLAGS= NOSHARED?=yes Index: gnu/usr.bin/tar/rtapelib.c diff -u gnu/usr.bin/tar/rtapelib.c.orig gnu/usr.bin/tar/rtapelib.c --- gnu/usr.bin/tar/rtapelib.c.orig Sun Nov 3 23:47:52 1996 +++ gnu/usr.bin/tar/rtapelib.c Sun Sep 17 00:56:22 2000 @@ -276,6 +276,7 @@ char device[CMDBUFSIZE]; /* The remote device name. */ char login[CMDBUFSIZE]; /* The remote user name. */ char *sys, *dev, *user; /* For copying into the above buffers. */ + char *tar_rsh; sys = system; dev = device; @@ -370,19 +371,31 @@ setuid (getuid ()); setgid (getgid ()); + tar_rsh = getenv("TAR_RSH"); + if (*login) { - execl ("/usr/bin/rsh", "rsh", "-l", login, system, - "/etc/rmt", (char *) 0); - execlp ("rsh", "rsh", "-l", login, system, - "/etc/rmt", (char *) 0); + if (tar_rsh) { + execlp (tar_rsh, tar_rsh, "-l", login, system, + "/etc/rmt", (char *) 0); + } else { + execl ("/usr/bin/rsh", "rsh", "-l", login, system, + "/etc/rmt", (char *) 0); + execlp ("rsh", "rsh", "-l", login, system, + "/etc/rmt", (char *) 0); + } } else { - execl ("/usr/bin/rsh", "rsh", system, - "/etc/rmt", (char *) 0); - execlp ("rsh", "rsh", system, - "/etc/rmt", (char *) 0); + if (tar_rsh) { + execlp (tar_rsh, tar_rsh, system, + "/etc/rmt", (char *) 0); + } else { + execl ("/usr/bin/rsh", "rsh", system, + "/etc/rmt", (char *) 0); + execlp ("rsh", "rsh", system, + "/etc/rmt", (char *) 0); + } } /* Bad problems if we get here. */ -- Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan ume@mahoroba.org ume@bisd.hitachi.co.jp ume@FreeBSD.org http://www.imasy.org/~ume/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message