In the area of code where changes for this was made, there is:

        char fname[255];
        /* XXX What happens if len(mutex_dir) > 255 - len(mpmtx%d%d)? */
snprintf(fname, 255, "%s/mpmtx%d%d", mutex_dir, glb->parent_pid, n);

The value 255 should really be MAXPATHLEN macro. On UNIX platforms,
it is often 1024 or 4096 from memory.

This is defined in <sys/param.h> system header file on UNIX systems.

Two places in src/mod_python.c where this occurs.

This would at least be a bit safer than 255.


On 12/03/2006, at 8:45 AM, Jim Gallacher (JIRA) wrote:

     [ ]

Jim Gallacher resolved MODPYTHON-131:

    Fix Version: 3.3
     Resolution: Fixed

Make name of mutex directory configurable.

         Key: MODPYTHON-131
     Project: mod_python
        Type: Improvement
  Components: core
    Versions: 3.2.7
    Reporter: Graham Dumpleton
    Assignee: Jim Gallacher
     Fix For: 3.3

Creating an issue for this so it can be tracked.
Been pointed out in: that on Mandriva Linux, that is is necessary to manually change the mutex directory in mod_python.c source code. Area of code is: #if !defined(OS2) && !defined(WIN32) && !defined(BEOS) && !defined(NETWARE)
        char fname[255];
        snprintf(fname, 255, "/tmp/mpmtx%d%d", glb->parent_pid, n);
        char *fname = NULL;
There should be an option to configure program to allow this to be more easily changed. Way of changing the value through Apache configuration to also be investigated further.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

Reply via email to