Xref: utzoo comp.sys.sgi:7546 comp.unix.internals:1684 Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!news.cs.indiana.edu!ux1.cso.uiuc.edu!news.iastate.edu!IASTATE.EDU!john From: john@IASTATE.EDU (Hascall John Paul) Newsgroups: comp.sys.sgi,comp.unix.internals Subject: Re: Where does TERM get set for Telnet logins (NOT EXACTLY) Message-ID: <1991Jan1.104335@IASTATE.EDU> Date: 1 Jan 91 16:43:35 GMT References: <1990Dec17.034330.27909@ccu1.aukuni.ac.nz> <1990Dec18.041334.7498@ccu1.aukuni.ac.nz> <1990Dec18.074044.13043@Think.COM> <1990Dec19.181235.4193@odin.corp.sgi.com> Sender: news@news.iastate.edu (USENET News System) Reply-To: john@IASTATE.EDU (Hascall John Paul) Distribution: comp Organization: Iowa State University Lines: 29 In article <1990Dec19.181235.4193@odin.corp.sgi.com>, olson@anchor.esd.sgi.com (Dave Olson) writes: > In <1990Dec18.074044.13043@Think.COM> barmar@think.com (Barry Margolin) writes: > > | In article <1990Dec18.041334.7498@ccu1.aukuni.ac.nz> russell@ccu1.aukuni.ac.nz (Russell J Fulton;ccc032u) writes: > | The 4.3bsd telnetd doesn't have this problem. If it is unable to negotiate > | the terminal type, it doesn't supply the "-p" (preserve environment) option > | to /bin/login. And when it does negotiate the terminal type, it sets the > | environment that is inherited by /bin/login to only contain the TERM > | variable. > | > | I suggest you ask your vendor to adopt this strategy. > > This is exactly how it works. However, if TERM isn't passed in to login > by telnetd, AND TERM is already set in the environment, then login will > use the value already in the environment, which in this case was inherited > down the chain from the operator's shell -> inetd -> telnetd -> login. They are not (as described above) exactly the same. Under BSD if telnetd cannot get a value for TERM from the other end, there is no TERM in login's environment (even if there is a TERM in telnetd's environment). -- John Hascall An ill-chosen word is the fool's messenger. Project Vincent Iowa State University Computation Center john@iastate.edu Ames, IA 50010 (515) 294-9551