Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!gatech!hao!noao!arizona!whm From: whm@arizona.edu (Bill Mitchell) Newsgroups: comp.bugs.4bsd Subject: 4.3 rcp dies if /usr/ucb is not in path Message-ID: <1679@megaron.arizona.edu> Date: Fri, 1-May-87 16:24:13 EDT Article-I.D.: megaron.1679 Posted: Fri May 1 16:24:13 1987 Date-Received: Sun, 3-May-87 03:25:44 EDT Organization: U of Arizona CS Dept, Tucson 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