rdump question

Chris Torek chris at umcp-cs.UUCP
Fri Aug 8 21:22:26 AEST 1986


In article <2819 at brl-smoke.ARPA> rgoguen at VAX.BBN.COM (Robert J Goguen) writes:
>How can I use rdump from A --> B with-out having to create a /.rhosts
>on B with A's host name inside it.  I want to rdump to A with-out giving
>B root access.

Those two sentences say very different things; but I gather that
you mean you would like to allow another machine to use your tape
drive for remote dumps, without allowing that same machine root
access to your file system (`... to rdump *from* A'.).

To do this, you may need to modify rdump.  Find the code that says
something like

	rmtape = rcmd(&rmtpeer, sp->s_port, name, rmtpeeruser, "/etc/rmt", 0);
						  -----------

The fourth argument (`underlined' above) is likely a variable that
is always pointing at the string "root", or else the literal string
"root".  This is, of course, the user name by which the dumping
machine must be allowed access to the tape-drive machine.

To match rcp, change the code that converts the host name to an
`rmtpeer' to read something like this:

	char *rmtpeeruser;

	...
		char *p, *rindex();

		if ((p = rindex(host, '.')) != NULL) {
			*p++ = 0;
			rmtpeeruser = p;
		} else
			rmtpeeruser = "root";
		/* followed by old code */

To match the new 4.3 rcp, use instead

		char *p, *index();

		if ((p = index(host, '@')) != NULL) {
			*p++ = 0;
			rmtpeeruser = host;
			host = p;
		} else
			rmtpeeruser = "root";

This seems a better syntax; `rdump f host.some.domain.user' is
rather ugly, compared with `rdump f user at host.some.domain'.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 1516)
UUCP:	seismo!umcp-cs!chris
CSNet:	chris at umcp-cs		ARPA:	chris at mimsy.umd.edu



More information about the Comp.unix.wizards mailing list