NetBSD Problem Report #40079

From jklowden@schemamania.org  Tue Dec  2 05:03:12 2008
Return-Path: <jklowden@schemamania.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id 5B72863B8BD
	for <gnats-bugs@gnats.NetBSD.org>; Tue,  2 Dec 2008 05:03:12 +0000 (UTC)
Message-Id: <20081202025933.32C08525462@mail.schemamania.org>
Date: Mon,  1 Dec 2008 21:59:33 -0500 (EST)
From: jklowden@schemamania.org
Reply-To: jklowden@schemamania.org
To: gnats-bugs@gnats.NetBSD.org
Subject: bozohttpd does not report reason for cgi failure
X-Send-Pr-Version: 3.95

>Number:         40079
>Category:       pkg
>Synopsis:       bozohttpd does not report reason for cgi failure
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    mrg
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Dec 02 05:05:00 +0000 2008
>Closed-Date:    Mon Apr 20 05:21:37 +0000 2009
>Last-Modified:  Mon Apr 20 05:21:37 +0000 2009
>Originator:     jklowden@schemamania.org
>Release:        NetBSD 3.1
>Organization:

>Environment:
System: NetBSD cherry.schemamania.org 3.1 NetBSD 3.1 (Cherry) #0: Sun Nov 12 18:56:01 EST 2006 jklowden@cherry.schemamania.org:/usr/src/sys/arch/i386/compile/Cherry i386
Architecture: i386
Machine: i386
>Description:
	cgi-bozo.c reports only 'child exec failed' when exec(3) fails.  
	The attached patch adds the output of strerror(errno) to the 
	message.  
>How-To-Repeat:
	try invoking a CGI file with the wrong path. 
>Fix:

diff -u ../../../bozohttpd/work/bozohttpd-20060517/cgi-bozo.c ./cgi-bozo.c
--- ../../../bozohttpd/work/bozohttpd-20060517/cgi-bozo.c	2006-05-17 04:19:10.000000000 -0400
+++ ./cgi-bozo.c	2008-12-01 21:25:22.000000000 -0500
@@ -254,7 +254,8 @@
 		dup2(sv[1], STDOUT_FILENO);

 		if (-1 == execve(path, argv, envp))
-			error(1, "child exec failed: %s", path);
+			error(1, "child exec failed: %s (%s)", path, 
+			      strerror(errno));
 		/* NOT REACHED */
 		error(1, "child execve returned?!");
 	}

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->mrg
Responsible-Changed-By: obache@NetBSD.org
Responsible-Changed-When: Tue, 02 Dec 2008 12:20:44 +0000
Responsible-Changed-Why:
Over to maintainer.


State-Changed-From-To: open->analyzed
State-Changed-By: mrg@NetBSD.org
State-Changed-When: Sat, 18 Apr 2009 12:40:15 +0000
State-Changed-Why:
i've included a similar change in my tree; i'll be import this into netbsd
in the next couple of days.


From: matthew green <mrg@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/40079 CVS commit: src/libexec/httpd
Date: Sat, 18 Apr 2009 21:09:41 +0000

 Module Name:	src
 Committed By:	mrg
 Date:		Sat Apr 18 21:09:41 UTC 2009

 Update of /cvsroot/src/libexec/httpd
 In directory ivanova.netbsd.org:/tmp/cvs-serv2135

 Log Message:
 import bozohttpd 20090418.  changes include:

 o  avoid dying in daemon mode for some uncommon, but recoverable, errors
 o  close leaking file descriptors for CGI and daemon mode
 o  handle poll errors properly
 o  don't try to handle more than one request per process yet

 this covers PR#38489 and PR#40079, as well some some issues reported
 privately.

 Status:

 Vendor Tag:	bozohttpd
 Release Tags:	bozohttpd-20090418

 C src/libexec/httpd/CHANGES
 U src/libexec/httpd/Makefile
 U src/libexec/httpd/Makefile.boot
 C src/libexec/httpd/auth-bozo.c
 C src/libexec/httpd/bozohttpd.8
 C src/libexec/httpd/bozohttpd.c
 C src/libexec/httpd/bozohttpd.h
 C src/libexec/httpd/cgi-bozo.c
 U src/libexec/httpd/content-bozo.c
 C src/libexec/httpd/daemon-bozo.c
 U src/libexec/httpd/dir-index-bozo.c
 C src/libexec/httpd/queue.h
 U src/libexec/httpd/ssl-bozo.c
 U src/libexec/httpd/tilde-luzah-bozo.c
 N src/libexec/httpd/bozohttpd.8.txt
 N src/libexec/httpd/bozohttpd.8.html
 U src/libexec/httpd/testsuite/Makefile
 U src/libexec/httpd/testsuite/html_cmp
 U src/libexec/httpd/testsuite/t1.in
 U src/libexec/httpd/testsuite/t1.out
 U src/libexec/httpd/testsuite/t10.in
 U src/libexec/httpd/testsuite/t10.out
 U src/libexec/httpd/testsuite/t2.in
 U src/libexec/httpd/testsuite/t2.out
 U src/libexec/httpd/testsuite/t3.in
 U src/libexec/httpd/testsuite/t3.out
 U src/libexec/httpd/testsuite/t4.in
 U src/libexec/httpd/testsuite/t4.out
 U src/libexec/httpd/testsuite/t5.in
 U src/libexec/httpd/testsuite/t5.out
 U src/libexec/httpd/testsuite/t6.in
 U src/libexec/httpd/testsuite/t6.out
 U src/libexec/httpd/testsuite/t7.in
 U src/libexec/httpd/testsuite/t7.out
 U src/libexec/httpd/testsuite/t8.in
 U src/libexec/httpd/testsuite/t8.out
 U src/libexec/httpd/testsuite/t9.in
 U src/libexec/httpd/testsuite/t9.out
 U src/libexec/httpd/testsuite/data/index.html
 U src/libexec/httpd/testsuite/data/file

 8 conflicts created by this import.
 Use the following command to help the merge:

 	cvs checkout -jbozohttpd:yesterday -jbozohttpd src/libexec/httpd

State-Changed-From-To: analyzed->closed
State-Changed-By: mrg@NetBSD.org
State-Changed-When: Mon, 20 Apr 2009 05:21:37 +0000
State-Changed-Why:
this is fixed with bozohttpd 20090418.  thanks for the report.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.