Date: Sun, 17 Sep 2000 01:25:42 +0900 (JST) From: Hajimu UMEMOTO <ume@mahoroba.org> To: kris@FreeBSD.org Cc: will@physics.purdue.edu, arch@FreeBSD.org Subject: Re: Rsh/Rlogin/Rcmd & friends Message-ID: <20000917.012542.78700152.ume@mahoroba.org> In-Reply-To: <Pine.BSF.4.21.0009151418130.69737-100000@freefall.freebsd.org> References: <20000916055225C.ume@mahoroba.org> <Pine.BSF.4.21.0009151418130.69737-100000@freefall.freebsd.org>
index | next in thread | previous in thread | raw e-mail
>>>>> On Fri, 15 Sep 2000 14:18:55 -0700 (PDT)
>>>>> Kris Kennaway <kris@FreeBSD.org> 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
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000917.012542.78700152.ume>
