Denys Vlasenko wrote:
On Tue, Jun 9, 2009 at 9:10 PM, Denys Vlasenko<[email protected]> wrote:
Does the attached patch help?
Scratch that. Here is a (hopefully) more complete fix:
http://busybox.net/downloads/fixes-1.14.1/busybox-1.14.1-telnetd.patch
Does it work for you?
--
vda
Oops. In that case, scratch some of my previous reply too. I'll give
it a try, but
I have to say that I still like my patch more. It makes it clear that
the child only
gets descriptors 0, 1, and 2, and it's simpler. Your patch is more
precise about
what it closes, but that means that if, say, telnetd itself inherited a
descriptor from
its invoker, or if, say, somebody adds another open descriptor (say for
a log file)
to telnetd, you'd have to take care to close that one in the child too.
But maybe I should have used sysconf(_SC_OPEN_MAX) instead of
getdtablesize().
The former is presumably more portable than the latter.
--Doug.
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox