2 This is a distribution of both client and server telnet. These programs
11 Solaris 2.4 x x (no linemode in server)
12 SunOs 4.1.4 X X (no linemode in server)
13 Ultrix 4.3 X X (no linemode in server)
14 Ultrix 4.1 X X (no linemode in server)
16 In addition, previous versions have been compiled on the following
17 machines, but were not available for testing this version.
23 SunOs 4.0.3c X X (no linemode in server)
24 4.3 BSD X X (no linemode in server)
25 DYNIX V3.0.12 X X (no linemode in server)
26 Ultrix 3.1 X X (no linemode in server)
27 Ultrix 4.0 X X (no linemode in server)
28 SunOs 3.5 X X (no linemode in server)
29 SunOs 4.1.3 X X (no linemode in server)
30 Solaris 2.2 x x (no linemode in server)
31 Solaris 2.3 x x (no linemode in server)
34 DYNIX V3.0.17.9 X X (no linemode in server)
35 HP-UX 8.0 x x (no linemode in server)
37 This code should work, but there are no guarantees.
41 This is a bugfix release.
43 The change in the previous release from using makeutx() to
44 pututxline() caused problems on SunOS/Solaris. It has been
45 changed back to using makeutx(). Symptoms include users
46 getting error messages when logging in about not being able
49 Using memmove() instead of memcpy() caused problems under
50 SunOS 4.x, since it doesn't have memmove(). Config.generic
51 has been modified to include mem.o for SunOS 4.x.
53 Some new code was added to telnetd to do some environment
54 variable cleanup before execing login. Thanks to Sam Hartman
55 at MIT for pointing this out.
57 A couple of other minor bugfixes.
61 This release represents what is on the 4.4BSD-Lite2 release, which
62 should be the final BSD release. I will continue to support of
63 telnet, The code (without encryption) is available via anonymous ftp
64 from ftp.cray.com, in src/telnet/telnet.YY.MM.DD.NE.tar.Z, where
65 YY.MM.DD is replaced with the year, month and day of the release.
66 If you can't find it at one of these places, at some point in the
67 near future information about the latest releases should be available
70 In addition, the version with the encryption code is available via
71 ftp from net-dist.mit.edu, in the directory /pub/telnet. There
72 is a README file there that gives further information on how
73 to get the distribution.
75 Questions, comments, bug reports and bug fixes can be sent to
76 one of these addresses:
81 This release is mainly bug fixes and code cleanup.
83 Replace all calls to bcopy()/bzero() with calls to
84 memmove()/memset() and all calls to index()/rindex()
85 with calls to strchr()/strrchr().
87 Add some missing diagnostics for option tracing
90 Add support for BSDI 2.0 and Solaris 2.4.
92 Add support for UNICOS 8.0
94 Get rid of expanded tabs and trailing white spaces.
97 Fix for telnet going into an endless spin
98 when the session dies abnormally.
101 Changes to allow telnet to compile
104 From Philip Guenther:
105 makeutx() doesn't expand utmpx,
106 use pututxline() instead.
109 Add a sleep(1) before execing login
110 to avoid race condition that can eat
112 Use terminal speed directly if it is
113 not an encoded value.
116 Fix to realloc() call. Fix for execing
117 login on solaris with no user name.
121 This is a list of some of the changes since the last tar release
122 of telnet/telnetd. There are probably other changes that aren't
123 listed here, but this should hit a lot of the main ones.
126 Changed #define for AUTHENTICATE to AUTHENTICATION
127 Changed #define for ENCRYPT to ENCRYPTION
128 Changed #define for DES_ENCRYPT to DES_ENCRYPTION
130 Added support for SPX authentication: -DSPX
132 Added support for Kerberos Version 5 authentication: -DKRB5
134 Added support for ANSI C function prototypes
136 Added support for the NEW-ENVIRON option (RFC-1572)
137 including support for USERVAR.
139 Made support for the old Environment Option (RFC-1408)
140 conditional on -DOLD_ENVIRON
142 Added #define ENV_HACK - support for RFC 1571
144 The encryption code is removed from the public distributions.
145 Domestic 4.4 BSD distributions contain the encryption code.
147 ENV_HACK: Code to deal with systems that only implement
148 the old ENVIRON option, and have reversed definitions
149 of ENV_VAR and ENV_VAL. Also fixes ENV processing in
150 client to handle things besides just the default set...
152 NO_BSD_SETJMP: UNICOS configuration for
153 UNICOS 6.1/6.0/5.1/5.0 systems.
155 STREAMSPTY: Use /dev/ptmx to get a clean pty. This
156 is for SVr4 derivatives (Like Solaris)
158 UTMPX: For systems that have /etc/utmpx. This is for
159 SVr4 derivatives (Like Solaris)
161 Definitions for BSDI 1.0
163 Definitions for 4.3 Reno and 4.4 BSD.
165 Definitions for UNICOS 8.0 and UNICOS 7.C
167 Definitions for Solaris 2.0
169 Definitions for HP-UX 8.0
171 Latest Copyright notices from Berkeley.
173 FLOW-CONTROL: support for RFC-XXXx
178 Fix the "send" command to not send garbage...
180 Fix status message for "skiprc"
182 Make sure to send NAWS after telnet has been suspended
183 or an external command has been run, if the window size
190 Support flowcontrol option in non-linemode servers.
192 -k Server supports Kludge Linemode, but will default to
193 either single character mode or real Linemode support.
194 The user will have to explicitly ask to switch into
195 kludge linemode. ("stty extproc", or escape back to
196 to telnet and say "mode line".)
198 -u Specify the length of the hostname field in the utmp
199 file. Hostname longer than this length will be put
200 into the utmp file in dotted decimal notation, rather
201 than putting in a truncated hostname.
203 -U Registered hosts only. If a reverse hostname lookup
204 fails, the connection will be refused.
207 Allows forwarding of credentials for KRB5.
213 This version of telnet/telnetd has support for both
214 the AUTHENTICATION and ENCRYPTION options. The
215 AUTHENTICATION option is fairly well defined, and
216 an option number has been assigned to it. The
217 ENCRYPTION option is still in a state of flux; an
218 option number has been assigned to, but it is still
219 subject to change. The code is provided in this release
220 for experimental and testing purposes.
222 The telnet "send" command can now be used to send
223 do/dont/will/wont commands, with any telnet option
224 name. The rules for when do/dont/will/wont are sent
225 are still followed, so just because the user requests
226 that one of these be sent doesn't mean that it will
229 The telnet "getstatus" command no longer requires
230 that option printing be enabled to see the response
231 to the "DO STATUS" command.
233 A -n flag has been added to telnetd to disable
236 A new telnet command, "auth" has been added (if
237 AUTHENTICATE is defined). It has four sub-commands,
238 "status", "disable", "enable" and "help".
240 A new telnet command, "encrypt" has been added (if
241 ENCRYPT is defined). It has many sub-commands:
242 "enable", "type", "start", "stop", "input",
243 "-input", "output", "-output", "status", and "help".
245 The LOGOUT option is now supported by both telnet
246 and telnetd, a new command, "logout", was added
249 Several new toggle options were added:
250 "autoencrypt", "autodecrypt", "autologin", "authdebug",
251 "encdebug", "skiprc", "verbose_encrypt"
253 An "rlogin" interface has been added. If the program
254 is named "rlogin", or the "-r" flag is given, then
255 an rlogin type of interface will be used.
256 ~. Terminates the session
257 ~<susp> Suspend the session
258 ~^] Escape to telnet command mode
259 ~~ Pass through the ~.
260 BUG: If you type the rlogin escape character
261 in the middle of a line while in rlogin
262 mode, you cannot erase it or any characters
263 before it. Hopefully this can be fixed
264 in a future release...
268 A "libtelnet.a" has now been created. This library
269 contains code that is common to both telnet and
270 telnetd. This is also where library routines that
271 are needed, but are not in the standard C library,
274 The makefiles have been re-done. All of the site
275 specific configuration information has now been put
276 into a single "Config.generic" file, in the top level
277 directory. Changing this one file will take care of
278 all three subdirectories. Also, to add a new/local
279 definition, a "Config.local" file may be created
280 at the top level; if that file exists, the subdirectories
281 will use that file instead of "Config.generic".
283 Many 1-2 line functions in commands.c have been
284 removed, and just inserted in-line, or replaced
289 The non-termio code in both telnet and telnetd was
290 setting/clearing CTLECH in the sg_flags word. This
291 was incorrect, and has been changed to set/clear the
292 LCTLECH bit in the local mode word.
294 The SRCRT #define has been removed. If IP_OPTIONS
295 and IPPROTO_IP are defined on the system, then the
296 source route code is automatically enabled.
298 The NO_GETTYTAB #define has been removed; there
299 is a compatibility routine that can be built into
300 libtelnet to achieve the same results.
302 The server, telnetd, has been switched to use getopt()
303 for parsing the argument list.
305 The code for getting the input/output speeds via
306 cfgetispeed()/cfgetospeed() was still not quite
307 right in telnet. Posix says if the ispeed is 0,
308 then it is really equal to the ospeed.
310 The suboption processing code in telnet now has
311 explicit checks to make sure that we received
312 the entire suboption (telnetd was already doing this).
314 The telnet code for processing the terminal type
315 could cause a core dump if an existing connection
316 was closed, and a new connection opened without
319 Telnetd was doing a TCSADRAIN when setting the new
320 terminal settings; This is not good, because it means
321 that the tcsetattr() will hang waiting for output to
322 drain, and telnetd is the only one that will drain
323 the output... The fix is to use TCSANOW which does
326 Telnetd was improperly setting/clearing the ISTRIP
327 flag in the c_lflag field, it should be using the
330 When the child process of telnetd was opening the
331 slave side of the pty, it was re-setting the EXTPROC
332 bit too early, and some of the other initialization
333 code was wiping it out. This would cause telnetd
334 to go out of linemode and into single character mode.
336 One instance of leaving linemode in telnetd forgot
337 to send a WILL ECHO to the client, the net result
338 would be that the user would see double character
341 If the MODE was being changed several times very
342 quickly, telnetd could get out of sync with the
343 state changes and the returning acks; and wind up
344 being left in the wrong state.
348 Switch the client to use getopt() for parsing the
349 argument list. The 4.3Reno getopt.c is included for
350 systems that don't have getopt().
352 Use the posix _POSIX_VDISABLE value for what value
353 to use when disabling special characters. If this
354 is undefined, it defaults to 0x3ff.
356 For non-termio systems, TIOCSETP was being used to
357 change the state of the terminal. This causes the
358 input queue to be flushed, which we don't want. This
359 is now changed to TIOCSETN.
361 Take out the "#ifdef notdef" around the code in the
362 server that generates a "sync" when the pty output
363 is flushed. The potential problem is that some older
364 telnet clients may go into an infinite loop when they
365 receive a "sync", if so, the server can be compiled
366 with "NO_URGENT" defined.
368 Fix the client where it was setting/clearing the OPOST
369 bit in the c_lflag field, not the c_oflag field.
371 Fix the client where it was setting/clearing the ISTRIP
372 bit in the c_lflag field, not the c_iflag field. (On
373 4.3Reno, this is the ECHOPRT bit in the c_lflag field.)
374 The client also had its interpretation of WILL BINARY
375 and DO BINARY reversed.
377 Fix a bug in client that would cause a core dump when
378 attempting to remove the last environment variable.
380 In the client, there were a few places were switch()
381 was being passed a character, and if it was a negative
382 value, it could get sign extended, and not match
383 the 8 bit case statements. The fix is to and the
384 switch value with 0xff.
386 Add a couple more printoption() calls in the client, I
387 don't think there are any more places were a telnet
388 command can be received and not printed out when
391 A new flag has been added to the client, "-a". Currently,
392 this just causes the USER name to be sent across, in
393 the future this may be used to signify that automatic
394 authentication is requested.
396 The USER variable is now only sent by the client if
397 the "-a" or "-l user" options are explicitly used, or
398 if the user explicitly asks for the "USER" environment
399 variable to be exported. In the server, if it receives
400 the "USER" environment variable, it won't print out the
401 banner message, so that only "Password:" will be printed.
402 This makes the semantics more like rlogin, and should be
403 more familiar to the user. (People are not used to
404 getting a banner message, and then getting just a
407 Re-vamp the code for starting up the child login
408 process. The code was getting ugly, and it was
409 hard to tell what was really going on. What we
410 do now is after the fork(), in the child:
411 1) make sure we have no controlling tty
412 2) open and initialize the tty
413 3) do a setsid()/setpgrp()
414 4) makes the tty our controlling tty.
415 On some systems, #2 makes the tty our controlling
416 tty, and #4 is a no-op. The parent process does
417 a gets rid of any controlling tty after the child
420 Use the strdup() library routine in telnet, instead
421 of the local savestr() routine. If you don't have
422 strdup(), you need to define NO_STRDUP.
424 Add support for ^T (SIGINFO/VSTATUS), found in the
425 4.3Reno distribution. This maps to the AYT character.
426 You need a 4-line bugfix in the kernel to get this
429 > *** tty_pty.c.ORG Tue Sep 11 09:41:53 1990
430 > --- tty_pty.c Tue Sep 11 17:48:03 1990
433 > if ((tp->t_lflag&NOFLSH) == 0)
434 > ttyflush(tp, FREAD|FWRITE);
435 > ! pgsignal(tp->t_pgrp, *(unsigned int *)data);
439 > if ((tp->t_lflag&NOFLSH) == 0)
440 > ttyflush(tp, FREAD|FWRITE);
441 > ! pgsignal(tp->t_pgrp, *(unsigned int *)data, 1);
442 > ! if ((*(unsigned int *)data == SIGINFO) &&
443 > ! ((tp->t_lflag&NOKERNINFO) == 0))
448 The client is now smarter when setting the telnet escape
449 character; it only sets it to one of VEOL and VEOL2 if
450 one of them is undefined, and the other one is not already
451 defined to the telnet escape character.
453 Handle TERMIOS systems that have separate input and output
454 line speed settings embedded in the flags.
456 Many other minor bug fixes.
459 Re-organize makefiles and source tree. The telnet/Source
460 directory is now gone, and all the source that was in
461 telnet/Source is now just in the telnet directory.
463 Separate makefile for each system are now gone. There
464 are two makefiles, Makefile and Makefile.generic.
465 The "Makefile" has the definitions for the various
466 system, and "Makefile.generic" does all the work.
467 There is a variable called "WHAT" that is used to
468 specify what to make. For example, in the telnet
469 directory, you might say:
470 make 4.4bsd WHAT=clean
471 to clean out the directory.
473 Add support for the ENVIRON and XDISPLOC options.
474 In order for the server to work, login has to have
475 the "-p" option to preserve environment variables.
477 Add the SOFT_TAB and LIT_ECHO modes in the LINEMODE support.
479 Add the "-l user" option to command line and open command
480 (This is passed through the ENVIRON option).
482 Add the "-e" command line option, for setting the escape
485 Add the "-D", diagnostic, option to the server. This allows
486 the server to print out debug information, which is very
487 useful when trying to debug a telnet that doesn't have any
490 Turn off the literal next character when not in LINEMODE.
492 Don't recognize ^Y locally, just pass it through.
494 Make minor modifications for Sun4.0 and Sun4.1
496 Add support for both FORW1 and FORW2 characters. The
497 telnet escape character is set to whichever of the
498 two is not being used. If both are in use, the escape
499 character is not set, so when in linemode the user will
500 have to follow the escape character with a <CR> or <EOF)
501 to get it passed through.
503 Commands can now be put in single and double quotes, and
504 a backslash is now an escape character. This is needed
505 for allowing arbitrary strings to be assigned to environment
508 Switch telnetd to use macros like telnet for keeping
509 track of the state of all the options.
511 Fix telnetd's processing of options so that we always do
512 the right processing of the LINEMODE option, regardless
513 of who initiates the request to turn it on. Also, make
514 sure that if the other side went "WILL ECHO" in response
515 to our "DO ECHO", that we send a "DONT ECHO" to get the
516 option turned back off!
518 Fix the TERMIOS setting of the terminal speed to handle both
519 BSD's separate fields, and the SYSV method of CBAUD bits.
521 Change how we deal with the other side refusing to enable
522 an option. The sequence used to be: send DO option; receive
523 WONT option; send DONT option. Now, the sequence is: send
524 DO option; receive WONT option. Both should be valid
525 according to the spec, but there has been at least one
526 client implementation of telnet identified that can get
527 really confused by this. (The exact sequence, from a trace
528 on the server side, is (numbers are number of responses that
529 we expect to get after that line...):
531 send WILL ECHO 1 (initial request)
532 send WONT ECHO 2 (server is changing state)
533 recv DO ECHO 1 (first reply, ok. expect DONT ECHO next)
534 send WILL ECHO 2 (server changes state again)
535 recv DONT ECHO 1 (second reply, ok. expect DO ECHO next)
536 recv DONT ECHO 0 (third reply, wrong answer. got DONT!!!)
537 *** send WONT ECHO (send WONT to acknowledge the DONT)
538 send WILL ECHO 1 (ask again to enable option)
546 (and the last 5 lines loop forever)
548 The line with the "***" is last of the WILL/DONT/WONT sequence.
549 The change to the server to not generate that makes this same
561 There is other option negotiation going on, and not sending
562 the third part changes some of the timings, but this specific
563 example no longer gets stuck in a loop. The "telnet.state"
564 file has been modified to reflect this change to the algorithm.
566 A bunch of miscellaneous bug fixes and changes to make
569 This version of telnet also has some KERBEROS stuff in
570 it. This has not been tested, it uses an un-authorized
571 telnet option number, and uses an out-of-date version
572 of the (still being defined) AUTHENTICATION option.
573 There is no support for this code, do not enable it.
577 CHANGES/BUGFIXES SINCE LAST RELEASE:
578 Some support for IP TOS has been added. Requires that the
579 kernel support the IP_TOS socket option (currently this
580 is only in UNICOS 6.0).
582 Both telnet and telnetd now use the cc_t typedef. typedefs are
583 included for systems that don't have it (in termios.h).
585 SLC_SUSP was not supported properly before. It is now.
587 IAC EOF was not translated properly in telnetd for SYSV_TERMIO
588 when not in linemode. It now saves a copy of the VEOF character,
589 so that when ICANON is turned off and we can't trust it anymore
590 (because it is now the VMIN character) we use the saved value.
592 There were two missing "break" commands in the linemode
593 processing code in telnetd.
595 Telnetd wasn't setting the kernel window size information
596 properly. It was using the rows for both rows and columns...
598 Questions/comments go to
605 README: You are reading it.
608 This file contains all the OS specific definitions. It
609 has pre-definitions for many common system types, and is
610 in standard makefile format. See the comments at the top
611 of the file for more information.
614 This is not part of the distribution, but if this file exists,
615 it is used instead of "Config.generic". This allows site
616 specific configuration without having to modify the distributed
617 "Config.generic" file.
620 This file contains the diffs for the changes needed for the
621 kernel to support LINEMODE is the server. These changes are
622 for a 4.3BSD system. You may need to make some changes for
623 your particular system.
625 There is a new bit in the terminal state word, TS_EXTPROC.
626 When this bit is set, several aspects of the terminal driver
627 are disabled. Input line editing, character echo, and
628 mapping of signals are all disabled. This allows the telnetd
629 to turn of these functions when in linemode, but still keep
630 track of what state the user wants the terminal to be in.
634 TIOCEXT Turn on/off the TS_EXTPROC bit
635 TIOCGSTATE Get t_state of tty to look at TS_EXTPROC bit
636 TIOCSIG Generate a signal to processes in the
637 current process group of the pty.
639 There is a new mode for packet driver, the TIOCPKT_IOCTL bit.
640 When packet mode is turned on in the pty, and the TS_EXTPROC
641 bit is set, then whenever the state of the pty is changed, the
642 next read on the master side of the pty will have the TIOCPKT_IOCTL
643 bit set, and the data will contain the following:
651 This allows the process on the server side of the pty to know
652 when the state of the terminal has changed, and what the new
655 However, if you define USE_TERMIO or SYSV_TERMIO, the code will
656 expect that the structure returned in the TIOCPKT_IOCTL is
657 the termio/termios structure.
660 This file contains the changes needed for the stty(1) program
661 to report on the current status of the TS_EXTPROC bit. It also
662 allows the user to turn on/off the TS_EXTPROC bit. This is useful
663 because it allows the user to say "stty -extproc", and the
664 LINEMODE option will be automatically disabled, and saying "stty
665 extproc" will re-enable the LINEMODE option.
668 Both the client and server have code in them to deal
669 with option negotiation loops. The algorithm that is
670 used is described in this file.
673 This directory contains the client code. No kernel changes are
674 needed to use this code.
677 This directory contains the server code. If LINEMODE or KLUDGELINEMODE
678 are defined, then the kernel modifications listed above are needed.
681 This directory contains code that is common to both the client
685 This directory has a new <arpa/telnet.h>
687 libtelnet/Makefile.4.4:
689 telnetd/Makefile.4.4:
690 These are the makefiles that can be used on a 4.3Reno
691 system when this software is installed in /usr/src/lib/libtelnet,
692 /usr/src/libexec/telnetd, and /usr/src/usr.bin/telnet.
695 The following TELNET options are supported:
698 The LINEMODE option is supported as per RFC1116. The
699 FORWARDMASK option is not currently supported.
701 BINARY: The client has the ability to turn on/off the BINARY
702 option in each direction. Turning on BINARY from
703 server to client causes the LITOUT bit to get set in
704 the terminal driver on both ends, turning on BINARY
705 from the client to the server causes the PASS8 bit
706 to get set in the terminal driver on both ends.
709 This is supported as per RFC1091. On the server side,
710 when a terminal type is received, termcap/terminfo
711 is consulted to determine if it is a known terminal
712 type. It keeps requesting terminal types until it
713 gets one that it recognizes, or hits the end of the
714 list. The server side looks up the entry in the
715 termcap/terminfo data base, and generates a list of
716 names which it then passes one at a time to each
717 request for a terminal type, duplicating the last
718 entry in the list before cycling back to the beginning.
720 NAWS: The Negotiate about Window Size, as per RFC 1073.
723 Implemented as per RFC 1079
726 Implemented as per RFC 1080
735 LOGOUT: As per RFC 727
738 The server will send its current status upon
739 request. It does not ask for the clients status.
740 The client will request the servers current status
741 from the "send getstatus" command.
744 This option is currently being defined by the IETF
745 Telnet Working Group, and an RFC has not yet been
746 issued, but should be in the near future...
749 This functionality can be done through the ENVIRON
750 option, it is added here for completeness.
753 This option is currently being defined by the IETF
754 Telnet Working Group, and an RFC has not yet been
755 issued. The basic framework is pretty much decided,
756 but the definitions for the specific authentication
757 schemes is still in a state of flux.
760 This option is currently being defined by the IETF
761 Telnet Working Group, and an RFC has not yet been
762 issued. The draft RFC is still in a state of flux,
763 so this code may change in the future.