home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / bugs / 4bsd / 226 next >
Encoding:
Text File  |  1992-11-17  |  2.7 KB  |  79 lines

  1. Xref: sparky comp.bugs.4bsd:226 comp.unix.bsd:8969
  2. Newsgroups: comp.bugs.4bsd,comp.unix.bsd
  3. Path: sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!spool.mu.edu!agate!stanford.edu!CSD-NewsHost.Stanford.EDU!CS.Stanford.EDU!jonathan
  4. From: jonathan@CS.Stanford.EDU (Jonathan Stone)
  5. Subject:  Bug in 386BSD, Net-2 telnets, Berkeley telnet.91.03.25: "send ayt" doesn' t work
  6. Message-ID: <1992Nov17.041308.5252@CSD-NewsHost.Stanford.EDU>
  7. Followup-To:  comp.bugs.4bsd
  8. Sender: news@CSD-NewsHost.Stanford.EDU
  9. Organization: Computer Science Department, Stanford University.
  10. Date: Tue, 17 Nov 1992 04:13:08 GMT
  11. Lines: 66
  12.  
  13. [[This may be very old news, but I don't recall seeing it before, and archie
  14.   hasn't helped me find any source code with the bug fixed.
  15.   If it is old news, apologies, and please let me know via mail. ]]
  16.  
  17. Index::
  18.     telnet SEND command broken in client (e.g., SEND AYT)
  19.  
  20. Synopsis::
  21.     Sending simple options, such as AYT,  doesn't work.
  22.  
  23. Repeat-by::
  24.     build a telnet client from any of the above source code.
  25.     (the relevant file differs only in copyright notices and
  26.      one debugging statement for all three of the above releases).
  27.     Start a telnet with the command "telnet".
  28.     Type "show options", then "connect <somehost>", where <somehost>
  29.     is a host that understands the AYT option.
  30.     Type a telnet escape and then "send ayt".
  31.     Observe that the telnet options debugging shows junk, viz:
  32.  
  33.         telnet> send ayt
  34.         SENT IAC 268439864
  35. Diagnosis::
  36.     In commands.c:sendcmd(),  options that don't have a special
  37.     handler function are sent by NET2ADD(IAC, what).
  38.     The local variable "what" is never assigned, resulting in junk
  39.     being sent to the telnet server.
  40.  
  41. Fix::
  42.     The patch below works for me with telnet.91.03.25 source
  43.     compiled on a Decstation.
  44.     the relevant file differs only in copyright notices and
  45.      one debugging statement for all three of the above releases:
  46.     net-2, the March 1989 telnet release, and BSD
  47.  
  48. *** commands.c.DIST    Mon Mar 25 14:14:23 1991
  49. --- commands.c    Mon Nov 16 19:36:52 1992
  50. ***************
  51. *** 277,283 ****
  52.       int  argc;
  53.       char **argv;
  54.   {
  55. -     int what;        /* what we are sending this time */
  56.       int count;        /* how many bytes we are going to need to send */
  57.       int i;
  58.       int question = 0;    /* was at least one argument a question */
  59. --- 277,282 ----
  60. ***************
  61. *** 350,357 ****
  62.                     (s->narg > 1) ? argv[i+2] : 0);
  63.           i += s->narg;
  64.       } else {
  65. !         NET2ADD(IAC, what);
  66. !         printoption("SENT", IAC, what);
  67.       }
  68.       }
  69.       return (count == success);
  70. --- 349,356 ----
  71.                     (s->narg > 1) ? argv[i+2] : 0);
  72.           i += s->narg;
  73.       } else {
  74. !         NET2ADD(IAC, s->what);
  75. !         printoption("SENT", IAC, s->what);
  76.       }
  77.       }
  78.       return (count == success);
  79.