Client connections and telnetd (-K flag?)

Denys Vlasenko vda.linux at googlemail.com
Fri Nov 26 03:59:18 UTC 2010


On Thursday 25 November 2010 11:32, Magnus Carlsson wrote:
> Thanks for your answer.
> 
> I don't think you read the entire post though :-)
> 
> > What version of busybox?
> 1.13.3
> 
> > I think this is already fixed. Try newer version.
> I understand your point here, although as I stated in the original
> post, I checked the previous mail threads and bug reports and came to
> the conclusion that the fix for this issue would be the -K flag to
> telnetd and that is already present in 1.13.3.

No, -K is not the fix for that. The fix was in this commit:

commit a4bcbd0e0416bb4965488ec1f16039aa302f8b91
Author: Denys Vlasenko <vda.linux at googlemail.com>
Date:   Tue Jun 9 23:01:24 2009 +0200

    telnetd: properly close fds in child


and you need to use at least 1.15.x to have this fix.
1.14.4 does not have the fix, neither 1.13.3.


> I am not against upgrading although I would like some input if the -K
> flag is considered to be working in 1.13.3 or if I have done something
> else wrong.

If telnetd is run with -K, you are getting "Connection closed by foreign host"
immediately in this example telnel session:

$ sleep 20 &
[1] 2997
$ exit
Connection closed by foreign host

whereas without -K, you will wait for backgrounded sleep to exit.

I just re-tested it. It works.

-- 
vda


More information about the busybox mailing list