[comp.sys.ncr] rsh vs remsh -- how does one handle the name conflict?

roe@sobeco.com (r.peterson) (02/06/90)

From article <1229@anasaz.UUCP>, by duane@anasaz.UUCP (Duane Morse):
> Our Release 3 of Unix for System V on the Tower 32/600 doesn't come with a
> TCP/IP 'rsh' -- NCR already used the name for their restricted shell. Instead,
> the remote shell is called remsh. [...]
> Will renaming remsh on the Tower and getting rid of the existing rsh or
> renaming it be likely to work)?

Yes - this works.

In fact, you can just remove /bin/rsh and mv remsh to rsh.

This presumes you don't need the restricted shell.

Remember that rsh is just a link to /bin/sh - the shell decides whether
it is restricted or not based on its' callname (argv[0]).

If you need a restricted shell, there are a couple of things you can
try out.  Some versions of /bin/sh only check the first character of
their callname - if it is 'r', the shell is restricted.  So, as a first
attempt, try linking /bin/sh to /bin/rrsh (or any name that starts with
'r'), and test the resulting shell to see if it's restricted.

If that fails, things become more complex: adb /bin/sh, find the
section of code that checks argv[0] for "rsh", change the comparison
string to something else (like zsh - it will have to be three chars
or less), link this /bin/sh to /bin/zsh, and good luck :-).

This works, but is a bit of a kludge.
-- 
One makes strong assumptions delving	       Roe Peterson
into the beginning of the universe...	       {uunet,mcgill-vision}!sobeco!roe
	- Stephen Hawking, Cambridge