First I would like to say hello to everyone in this list.
I'm running kernel 2.4.10 (Intel), and performing experiments with the
khttpd server compiled as a module. I am writing to this list concerning a
couple of things I noticed in khttpd, and offering a fix. If this is
already a known fact, I didn't find it in the archives.
I began noticing that it crashed always with a kernel error or hanging the
machine when apache was not running. When the machine survived, it also
returned a 403 error, with a "Permission denied" message.
Upon source investigation, I noticed that at
/usr/src/linux/net/khttpd/userspace.c, at the function Userspace, in the
place where's the user-daemon no present case is coded, a structure element
is not released.
After correction, I have also changed the 403 error (permission denied), to
a 503 Service Unavailable, as I believe it's more correct. If the khttpd
daemon can't call Apache (or other userspace daemon) when it's not capable
of processing the request, it's better to give a 503 message than a 403,
for my and the users' sanity sake.
So, in the 2.4.10 kernel source tree, in the already mentioned
/usr/src/linux/net/khttpd/userspace.c, at line 114, you can make the
Send403(CurrentRequest->sock); to Send50x(CurrentRequest-sock);
Append the following lines after the Send50x:
A diff file is included as an attachment.
-- Rui Ribeiro Network and Security consultant http://www.case.pt
P.S. A copy of this message has already been sent to khttpd users list.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to email@example.com More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sun Sep 30 2001 - 21:00:56 EST