You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Harald Alvestrand <Ha...@uninett.no> on 1997/02/06 11:00:01 UTC

mod_cgi/163: Errors in call_exec routine aren't logged anywhere

>Number:         163
>Category:       mod_cgi
>Synopsis:       Errors in call_exec routine aren't logged anywhere
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Thu Feb  6 02:00:01 1997
>Originator:     Harald.T.Alvestrand@uninett.no
>Organization:
apache
>Release:        1.2b6
>Environment:
SunOS 4.1.4 gcc
>Description:
I had some trouble getting the suexec wrapper to work (the problem was a
GID that didn't exist in the config).

It turned out that logging of errors from the call_exec routine simply went
nowhere at all. More investigation gave the following rather easy patch to
util_script.h:
void call_exec (request_rec *r, char *argv0, char **env, int shellcmd) 
{
    char *execuser;
    core_dir_config *conf;
    struct passwd *pw;
    struct group *gr;
    char err_string[HUGE_STRING_LEN];
    
+    /* Brutality incarnate - make all those log_unixerr statements work!!!! */
+    r->server->error_log = stderr;

This makes my class of config problems much easier to debug.




>How-To-Repeat:
If you can't reproduce it by putting a wrong group in your own config,
I'll happily reproduce mine at http://counter.li.org/cgi-bin/test, but
in the meantime, I hoep to fix it.
>Fix:
See above. Keep up the good work%2
>Audit-Trail:
>Unformatted: