[PATCH] broken inetd support in busybox httpd
Denis Vlasenko
vda.linux at googlemail.com
Wed Jan 10 14:49:04 PST 2007
On Wednesday 10 January 2007 21:54, Mathias Jeschke wrote:
> ----- Forwarded message from Mathias Jeschke <jeschke at informatik.hu-berlin.de> -----
>
> From: Mathias Jeschke <jeschke at informatik.hu-berlin.de>
> To: Vladimir Oleynik <dzo at simtreas.ru>
> CC: busybox at busybox.net
> Subject: [PATCH] broken inetd support in busybox httpd
> Date: Wed, 10 Jan 2007 19:27:25 +0100
> Message-ID: <20070110182725.GA22503 at mail.majes.de>
>
> Hello,
>
> I send this patch to fix the inetd support for the httpd in busybox
> (I tested 1.3.1 and svn version).
>
> The bug origns in the treatment of fds for writing at the functions
> sendHeaders() and sendFile(). The unpatched busybox version uses the
> same! fd for reading and writing - what is not problematic with sockets,
> which are bi-directional.
>
> To fix it, I have added another int variable "accepted_write_socket"
> to the "HttpdConfig" struct and rewrites the use of config->accepted_socket
> in the full_write(...) calls.
>
> Finally im not sure if I introduced some potential errors of the select()
> usage in the combination with the write-direction
> (e.g. if the clients is busy).
>
> Additionally I fixed two bugs, if someone won't select HTTPD_CGI.
Super, can we see the patch?
--
vda
More information about the busybox
mailing list