[BusyBox] Re: any reason why telnetd rejects and vanishes?

Rob Landley rob at landley.net
Sat Jul 9 21:46:26 UTC 2005


Just dredging through my old "to-fix" list (now that I got a new laptop cord 
where the brick on it wasn't _beeping_.  I thought it was just a transformer, 
but that would make way too much sense for dell to implement...)

Anyway: I don't see a checkin for this one, but telnetd.c includes busybox.h 
which includes config.h...?

This resolved already?

On Tuesday 12 April 2005 03:51, Vijay Padiyar wrote:
> Hi Rob
>
> Well, in that case, there's one more problem with BusyBox. I submitted a
> bug report about it to BusyBox.
>
> In the file 'networking/telnetd.c', add the following line at the top of
> the file:
>
> #include <config.h>
>
> This is because (as of BusyBox version 1.0) the following code in telnetd.c
> doesn't get executed even if CONFIG_FEATURE_DEVPTS option is enabled in
> config.h:
>
> #ifdef CONFIG_FEATURE_DEVPTS
>  p = open("/dev/ptmx", 2);
>  if (p > 0) {
>   grantpt(p);
>   unlockpt(p);
>   strcpy(line, ptsname(p));
>   return(p);
>  }
> #else
> ..
> #endif
>
> So I have two suggestions for you:
>
> 1. Add the line mentioned above to telnetd.c, compile BusyBox again and try
> it out.
>
> 2. If it still doesn't work, check whether your /etc/protocols and
> /etc/services files are in order and whether you have the following line
> present (and as shown here) in /etc/inetd.conf:
>
> telnet  stream  tcp     nowait  root    /usr/sbin/telnetd       telnetd
>
> Do this and then tell me if it still doesn't work.
>
> Regards
>
> Vijay Padiyar
>
> http://www.vijaypadiyar.eu.tf
>
>
> ----- Original Message -----
> From: "Robert P. J. Day" <rpjday at mindspring.com>
> To: "Vijay Padiyar" <vijay_padiyar at hotmail.com>
> Cc: "BusyBox Support" <busybox at mail.codepoet.org>
> Sent: Monday, April 11, 2005 8:43 PM
> Subject: Re: any reason why telnetd rejects and vanishes?
>
> > On Mon, 11 Apr 2005, Vijay Padiyar wrote:
> > > Hi Robert
> > >
> > > I suppose you get an error such as "Connection forcibly closed by
> > > remote host", or something to that effect?
> >
> > $ telnet 10.1.1.82
> > Trying 10.1.1.82...
> > Connected to 10.1.1.82 (10.1.1.82).
> > Escape character is '^]'.
> > Connection closed by foreign host.
> >
> > > Can you tell me what device files are present in your target
> > > filesystem's /dev directory? Also whether you've enabled
> > > CONFIG_FEATURE_DEVPTS in BusyBox? You should have that feature
> > > enabled, as well as 'ptmx' device and 'pts' sub-directory
> > > respectively in the /dev directory:
> > >
> > > crw-r--r--        1 root     root           5,       2 Feb  2 11:20
> > > ptmx drwxrwxrwt    2 root     root                 4096 Feb  2 11:20
> > > pts
> >
> > yup, i have all of the above.  the difference is that i was previously
> > using a 2.4 kernel, now i'm up to 2.6.11.7.
> >
> > when the system comes up, telnetd is running nicely, i can bring up
> > the net interface with "ifconfig", ping works well both ways, i can
> > telnet *out* of the embedded system with no trouble (just to verify
> > proper network operation), but the instant i try to telnet in, i get
> > the above and telnetd vanishes.
> >
> > i can start telnetd again manually, and i'll get the same result.  is
> > there some interaction with a 2.6 kernel that i'm unaware of?
> >
> > rday
>
> _______________________________________________
> busybox mailing list
> busybox at mail.busybox.net
> http://busybox.net/mailman/listinfo/busybox



More information about the busybox mailing list