3rd party copies don't work in 4.2 rcp

rws%mit-bold at sri-unix.UUCP rws%mit-bold at sri-unix.UUCP
Tue Jan 3 07:11:00 AEST 1984


From:  Robert W. Scheifler <rws at mit-bold>

Description:
	rcp (version 4.8) doesn't work for 3rd party copies.
	In forking rsh it uses -L instead of -l, and uses the wrong
	user name at the destination.

	Even with this fix, I don't think this form of copy has the
	right semantics in terms of who must be equivalent to whom.
	I would have thought that if I could do
		rcp host1.name1:foo /tmp/foo
		rcp /tmp/foo host2.name2:foo
	then I should be able to do
		rcp host1.name1:foo host2.name2:foo
	but that isn't the case.  The current implementation requires
	that name1 at host1 (not me) be in the .rhosts of name2 at host2.
Repeat-By:
	Try doing one.
Fix:
	Here is a 'diff old new'
	105c105
	< 		(void) sprintf(buf, "rsh %s -L %s -n %s %s '%s:%s'",
	---
	> 		(void) sprintf(buf, "rsh %s -l %s -n %s %s '%s.%s:%s'",
	107c107
	< 					    src, argv[argc - 1], targ);
	---
	> 					    src, argv[argc - 1], tuser, targ);
	109c109
	< 		(void) sprintf(buf, "rsh %s -n %s %s '%s:%s'",
	---
	> 		(void) sprintf(buf, "rsh %s -n %s %s '%s.%s:%s'",
	111c111
	< 					    src, argv[argc - 1], targ);
	---
	> 					    src, argv[argc - 1], tuser, targ);



More information about the Comp.unix.wizards mailing list