Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!columbia!rutgers!hal9000!root From: whm@arizona.edu (Bill Mitchell) Newsgroups: comp.bugs.4bsd Subject: 4.3 rcp dies if /usr/ucb is not in path Message-ID: <1125@hal9000.UUCP> Date: Mon, 4-May-87 14:39:56 EDT Article-I.D.: hal9000.1125 Posted: Mon May 4 14:39:56 1987 Date-Received: Tue, 5-May-87 04:44:45 EDT Sender: root@hal9000.UUCP Lines: 19 Under certain circumstances, rcp executes rsh. If /usr/ucb is not in the search path, you'll get the diagnostic "sh: rsh: not found", which can be pretty mysterious. You can reproduce this by (in sh): PATH=. /bin/rcp h:/a h:/b This bug was discovered when trying to run rcp via cron. The problem is that rsh is being located using path search rather than being named explicitly. There might be a good reason to use the path search, but I can't think of one. If you want rcp to always run /usr/ucb/rsh, just change the two occurrences of "rsh" to "/usr/ucb/rsh" in rcp.c. Incidentally, there's a setuid() to change back to the user's uid before rsh is fired up, so the path search doesn't present a security hole. Bill Mitchell whm@arizona.edu {allegra,cmcl2,ihnp4,noao}!arizona!whm