Thread View: comp.bugs.4bsd
4 messages
4 total messages
Started by Jonathan Stone
Tue, 17 Nov 1992 04:13
Bug in 386BSD, Net-2 telnets, Berkeley telnet.91.03.25: "send ayt" doesn' t work
Author: Jonathan Stone
Date: Tue, 17 Nov 1992 04:13
Date: Tue, 17 Nov 1992 04:13
66 lines
2745 bytes
2745 bytes
[[This may be very old news, but I don't recall seeing it before, and archie
hasn't helped me find any source code with the bug fixed.
If it is old news, apologies, and please let me know via mail. ]]
Index::
telnet SEND command broken in client (e.g., SEND AYT)
Synopsis::
Sending simple options, such as AYT, doesn't work.
Repeat-by::
build a telnet client from any of the above source code.
(the relevant file differs only in copyright notices and
one debugging statement for all three of the above releases).
Start a telnet with the command "telnet".
Type "show options", then "connect <somehost>", where <somehost>
is a host that understands the AYT option.
Type a telnet escape and then "send ayt".
Observe that the telnet options debugging shows junk, viz:
telnet> send ayt
SENT IAC 268439864
Diagnosis::
In commands.c:sendcmd(), options that don't have a special
handler function are sent by NET2ADD(IAC, what).
The local variable "what" is never assigned, resulting in junk
being sent to the telnet server.
Fix::
The patch below works for me with telnet.91.03.25 source
compiled on a Decstation.
the relevant file differs only in copyright notices and
one debugging statement for all three of the above releases:
net-2, the March 1989 telnet release, and BSD
*** commands.c.DIST Mon Mar 25 14:14:23 1991
--- commands.c Mon Nov 16 19:36:52 1992
***************
*** 277,283 ****
int argc;
char **argv;
{
- int what; /* what we are sending this time */
int count; /* how many bytes we are going to need to send */
int i;
int question = 0; /* was at least one argument a question */
--- 277,282 ----
***************
*** 350,357 ****
(s->narg > 1) ? argv[i+2] : 0);
i += s->narg;
} else {
! NET2ADD(IAC, what);
! printoption("SENT", IAC, what);
}
}
return (count == success);
--- 349,356 ----
(s->narg > 1) ? argv[i+2] : 0);
i += s->narg;
} else {
! NET2ADD(IAC, s->what);
! printoption("SENT", IAC, s->what);
}
}
return (count == success);
Re: Bug in 386BSD, Net-2 telnets, Berkeley telnet.91.03.25: "send ayt" doesn' t work
Author: Mike O'Connor
Date: Tue, 17 Nov 1992 23:30
Date: Tue, 17 Nov 1992 23:30
15 lines
1077 bytes
1077 bytes
In article <1992Nov17.041308.5252@CSD-NewsHost.Stanford.EDU>
jonathan@CS.Stanford.EDU (Jonathan Stone) writes:
:Index::
: telnet SEND command broken in client (e.g., SEND AYT)
For what it's worth, the bug appears in BSDI Gamma as well.
...Mike
--
Michael J. O'Connor | Internet: mjo@FMSRL7.SRL.FORD.COM
Ford Motor Company, OPEO | UUCP: ...!{backbone}!fmsrl7!mjo
20000 Rotunda, Bldg. 1-3001 | Phone: +1 (313) 248-1260
Dearborn, MI 48121 | Fax: +1 (313) 323-6277
Re: Bug in 386BSD, Net-2 telnets, Berkeley telnet.91.03.25: "send ayt" doesn' t work
Author: Christos Zoulas
Date: Wed, 18 Nov 1992 20:56
Date: Wed, 18 Nov 1992 20:56
48 lines
1817 bytes
1817 bytes
In article <1ebvb1INNe3t@ef2007.efhd.ford.com> "Mike O'Connor" <mjo@fmsrl7.srl.ford.com> writes:
>In article <1992Nov17.041308.5252@CSD-NewsHost.Stanford.EDU>
>jonathan@CS.Stanford.EDU (Jonathan Stone) writes:
>
>:Index::
>: telnet SEND command broken in client (e.g., SEND AYT)
>
>For what it's worth, the bug appears in BSDI Gamma as well.
>
And here's the patch I sent to Keith Bostic...
As you can see by inspecting the code, the variable 'what' is never
initialized...
christos
*** /tmp/T0a29914 Wed Nov 18 15:54:58 1992
--- commands.c Mon Oct 26 21:26:30 1992
***************
*** 291,297 ****
int argc;
char **argv;
{
- int what; /* what we are sending this time */
int count; /* how many bytes we are going to need to send */
int i;
int question = 0; /* was at least one argument a question */
--- 291,296 ----
***************
*** 364,371 ****
(s->narg > 1) ? argv[i+2] : 0);
i += s->narg;
} else {
! NET2ADD(IAC, what);
! printoption("SENT", IAC, what);
}
}
return (count == success);
--- 363,370 ----
(s->narg > 1) ? argv[i+2] : 0);
i += s->narg;
} else {
! NET2ADD(IAC, s->what);
! printoption("SENT", IAC, s->what);
}
}
return (count == success);
Re: Bug in 386BSD, Net-2 telnets, Berkeley telnet.91.03.25: "send ayt" doesn' t work
Author: John F Haugh II
Date: Fri, 20 Nov 1992 23:17
Date: Fri, 20 Nov 1992 23:17
17 lines
1549 bytes
1549 bytes
In article <1ebvb1INNe3t@ef2007.efhd.ford.com> "Mike O'Connor" <mjo@fmsrl7.srl.ford.com> writes: >In article <1992Nov17.041308.5252@CSD-NewsHost.Stanford.EDU> >jonathan@CS.Stanford.EDU (Jonathan Stone) writes: >:Index:: >: telnet SEND command broken in client (e.g., SEND AYT) > >For what it's worth, the bug appears in BSDI Gamma as well. I found that in the BSD telnetd most of the "send" commands don't work correctly. RFC 854 says that "send break" performs the same sort of function as the <BREAK> key in an asynch universe. Yet the telnetd does the function by stuffing the QUIT character down the PTY. This isn't right by a long shot. -- John F. Haugh II | MaBellNet: (512) 823-8817 | SneakerNet: 042/2D034 InterNet: jfh@eureka.aixserv.austin.ibm.com [TSAKC] Disclaimer: I am not a representative of IBM. I speak for myself only.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads