pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/40079: bozohttpd does not report reason for cgi failure



>Number:         40079
>Category:       pkg
>Synopsis:       bozohttpd does not report reason for cgi failure
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Dec 02 05:05:00 +0000 2008
>Originator:     jklowden%schemamania.org@localhost
>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@localhost:/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?!");
        }



Home | Main Index | Thread Index | Old Index