[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Non-login config files



quoth Harald -
...
> Ah.  You hit the problem right on.  Why does it work with an rsh?
> Does your rshd run your command in a login shell?  Mine does not,

For a while, it seemed that this problem was going to come up on a weekly
basis in comp.unix.shell, since ksh is similarly afflicted.  Bash goes to
great lengths to detect this situation - last I looked, I think it was
checking for -c and unit 0 is socket.

> If you know a good way around this problem, I would like to know about
> it.

I don't say this is a good way, but my login shell for use with such shells
is a cover program, that execs the real shell as, e.g., argv[0] = "-es"
(and also fixes the SHELL environment variable.)  The only way that cover
ever gets executed, is by applications that look it up in /etc/passwd,
mainly telnetd, rlogind, rshd and ftpd.

That's effective and makes light work of something that is fairly ugly
if done in the shell, but as long as it isn't standard issue, it doesn't
solve the problem for the es-using masses.

	Donn Cave, University Computing Services, University of Washington
	donn@cac.washington.edu