Network Working Group D. Borman, Editor
Request for Comments: 1408 Cray Research, Inc.
January 1993
Telnet Environment Option
1. Command Names and Codes
ENVIRON 36
ESC 2
USERVAR 3
2. Command Meanings
IAC WILL ENVIRON
Telnet Working Group [Page 1]
RFC 1408 Telnet Environment Option January 1993
IAC DO ENVIRON
Telnet Working Group [Page 2]
RFC 1408 Telnet Environment Option January 1993
The sender of this command is sending information about environment variables that have changed. It is identical to the IS command, except that the command is INFO instead of IS. Only the side that is WILL ENVIRON may send an INFO command. The INFO command is not to be used to send initial information; the SEND/IS sequence is to be used for that. The INFO command is to be used to propagate changes in environment variables, and may be spontaneously generated.
3. Default Specification
The default specification for this option is
4. Motivation
Many operating systems have startup information and environment variables that contain information that should be propagated to remote machines when Telnet connections are established. Rather than create a new Telnet option each time someone comes up with some new information that they need propagated through a Telnet session, but that the Telnet session itself doesn't really need to know about, this generic information option can be used.
5. Well Known Variables
USER This variable is used to transmit the user or account
Telnet Working Group [Page 3]
RFC 1408 Telnet Environment Option January 1993
PRINTER This variable is used to identify the default location
6. Implementation Rules
WILL and DO are used only at the beginning of the connection to obtain and grant permission for future negotiations.
Telnet Working Group [Page 4]
RFC 1408 Telnet Environment Option January 1993
The receiving host is not required to put all variables that it receives into the environment. For example, if the client should send across USERVAR "TERM" VALUE "xterm" as an environment variable, and the TERMINAL-TYPE [1] option has already been used to determine the terminal type, the server may safely ignore the TERM variable. Also, some startup information may be used in other ways; for example, the values for "USER", "ACCT" and "PROJ" values might be used to decide which account to log into, and might never be put into the users environment. In general, if the server has already determined the value of an environment variable by some more accurate means, or if it does not understand a variable name, it may ignore the value sent in the ENVIRON option. The server may also prefer to just put all unknown information into the users environment. This is the suggested method of implementation, because it allows the user the most flexibility.
Telnet Working Group [Page 5]
RFC 1408 Telnet Environment Option January 1993
is a valid response to any of the following:
7. Security Concerns
It is important for an implementor of the ENVIRON option to understand the interaction of setting options and the login/authentication process. Specifically careful analysis should be done to determine which variables are "safe" to set prior to having the client login. An example of a bad choice would be permitting a variable to be changed that allows an intruder to circumvent or compromise the login/authentication program itself.
8. References
[1] VanBokkelen, J., "Telnet Terminal-Type Option", RFC 1091, FTP
Telnet Working Group [Page 6]
RFC 1408 Telnet Environment Option January 1993
Author's Address