Re: Bash prompt

2001-03-11 Thread Yotam Rubin
Hello Ariel, Apparently, telnetd _DOES_ set the REMOTEHOST variable. It appears that my login program does the same thing. Did anyone check his login? In addition to this, telnetd passes on the address of its client via login's -h argument and enables the -p argument, which orders login to prese

Re: Bash prompt

2001-03-11 Thread Ariel Biener
On Mon, 12 Mar 2001, Yotam Rubin wrote: That is not my understanding of the protocol. Not too long ago, it was possible to pass via the telnet client a variable that would point towards a certain shared library (hacked), and the telnetd actually used it, and enabled to gain remote elevated privi

Re: Bash prompt

2001-03-11 Thread Yotam Rubin
Hello Yaron, Telnet does no such thing, it merely execs some arbitrary program, which in our case is login. True, telnetd passes on to login the value of the remote host name but it does not set the environment variable independently. Regards, Yotam Rubin On Sun, Mar 11, 2001 at 09:04

Re: Bash prompt

2001-03-11 Thread Yaron Zabary
On Sun, 11 Mar 2001, Boaz Rymland wrote: > Besides, AFAIK, enviroment variables are all shell dependant as they > are created by the shell. Some might be completely standard, like > TERM, but they are all to the mercy of the shell. (Ofcourse, I would > love to be corrected or better rephrased :-)

Re: Bash prompt

2001-03-11 Thread Yotam Rubin
Hello Boaz, Are you implying that environment variables cannot be created by a program other than a shell? Environment variables are not shell specific. Sure, shells usually set common variables, but in no way is the environment shell dependent, just man 7 environ. As for the REMOTEHOST issue,

Re: Bash prompt

2001-03-11 Thread Boaz Rymland
Yotam Rubin wrote: > > Hello, > > The environment variable $REMOTEHOST is not shell Dependant. > This variable is added by the program 'login'. The shell should not even > know that it's being ran remotely. A sane telnetd should fork login, so > you can rely on the $REMOTEHOST variable to exist.

Re: Bash prompt

2001-03-11 Thread Yotam Rubin
Hello, The environment variable $REMOTEHOST is not shell Dependant. This variable is added by the program 'login'. The shell should not even know that it's being ran remotely. A sane telnetd should fork login, so you can rely on the $REMOTEHOST variable to exist. Regards, Yotam Rubin O