Bug 36410

Summary: Problem with cgid when module other than mod_suexec is providing uid/gid
Product: Apache httpd-2 Reporter: Fabian Fagerholm <fabbe>
Component: mod_cgidAssignee: Apache HTTPD Bugs Mailing List <bugs>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 2.0.54   
Target Milestone: ---   
Hardware: Other   
OS: other   

Description Fabian Fagerholm 2005-08-29 19:28:38 UTC
When trying mod_vhost_ldap (http://alioth.debian.org/projects/modvhostldap/) I
discovered that cgid segfaults when trying to run a simple cgi script. This is
documented in the Debian BTS (http://bugs.debian.org) as bug #323785
(http://bugs.debian.org/323785).

The issue was discussed in the #apache channel on IRC, and it was concluded that
the reason for the segfault is that cgid is unable to access the memory region
where mod_vhost_ldap keeps its module_config structure -- or any other
module_config structure for that matter. For suExec, there is special magic in
mod_cgid that allows its configuration to be passed through the unix socket so
that cgid can use it. However, adding such special cases for every module that
needs them is not really a good way to solve the problem.

So a more generic way of letting mod_cgid access is needed. When discussing the
issue on IRC, colmmacc suggested that there is a more correct way implemented in
os/unix/unixd.c.
Comment 1 Colm MacCarthaigh 2005-08-29 22:34:03 UTC
Not quite on the unixd.c, but there is a more correct way of doing this within
cgid, working on it now.
Comment 2 Colm MacCarthaigh 2005-08-30 13:37:38 UTC
This bug has been fixed in trunk, see;

http://svn.apache.org/viewcvs?rev=264759&view=rev
Comment 3 Colm MacCarthaigh 2005-08-30 16:54:54 UTC
A patch for the 2.2.x branch is now available at;

http://people.apache.org/~colm/2.2.x-suexec-cgid.patch
Comment 4 Colm MacCarthaigh 2005-08-30 16:56:29 UTC
Apologies, I meant the 2.0.x branch;

http://people.apache.org/~colm/2.0.x-suexec-cgid.patch