httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 47037] New: cgid daemon fails to start if the path to cgid.sock is longer than 108 characters
Date Wed, 15 Apr 2009 18:00:32 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=47037

           Summary: cgid daemon fails to start if the path to cgid.sock is
                    longer than 108 characters
           Product: Apache httpd-2
           Version: 2.2.11
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_cgid
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: shah.paritosh@gmail.com


Whenever I make a request to a path whose content handler is "cgi-script", I
get a 503 response, and the following in my error_log:

(3)No such process: cgid daemon is gone; is Apache terminating?

I've traced the problem to the following piece of code in mod_cgid.c

    struct sockaddr_un unix_addr;
    ...
    ...
    apr_cpystrn(unix_addr.sun_path, sockname, sizeof unix_addr.sun_path);

where sockaddr_un is

/* file sys/un.h */
struct sockaddr_un
  {
    __SOCKADDR_COMMON (sun_);
    char sun_path[108];         /* Path name.  */
  };

So, effectively it only looks at first 108 characters of sockname. Using longer
paths might cause unexpected behavior ( depending on what file first 108
characters resolve to ).

I have a pretty long ServerRoot path. By default, mod_cgid uses
ServerRoot/logs/cgid.sock to store cgid.sock file. So I suspect that this is
the source of my problem. When I explicitly set ScriptSock to '/tmp/cgid.sock'
everything works as expected.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message