You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mod_python-dev@quetz.apache.org by "Jim Gallacher (JIRA)" <ji...@apache.org> on 2006/03/11 22:45:57 UTC

[jira] Resolved: (MODPYTHON-131) Make name of mutex directory configurable.

     [ http://issues.apache.org/jira/browse/MODPYTHON-131?page=all ]
     
Jim Gallacher resolved MODPYTHON-131:
-------------------------------------

    Fix Version: 3.3
     Resolution: Fixed

> Make name of mutex directory configurable.
> ------------------------------------------
>
>          Key: MODPYTHON-131
>          URL: http://issues.apache.org/jira/browse/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:
>   http://www.mail-archive.com/python-dev@httpd.apache.org/msg01271.html
> 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);
>   #else
>         char *fname = NULL;
>   #endif
> 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:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Re: [jira] Resolved: (MODPYTHON-131) Make name of mutex directory configurable.

Posted by Graham Dumpleton <gr...@dscpl.com.au>.
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.

Graham

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

>      [ http://issues.apache.org/jira/browse/MODPYTHON-131?page=all ]
>
> Jim Gallacher resolved MODPYTHON-131:
> -------------------------------------
>
>     Fix Version: 3.3
>      Resolution: Fixed
>
>> Make name of mutex directory configurable.
>> ------------------------------------------
>>
>>          Key: MODPYTHON-131
>>          URL: http://issues.apache.org/jira/browse/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:
>>   
>> http://www.mail-archive.com/python-dev@httpd.apache.org/msg01271.html
>> 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);
>>   #else
>>         char *fname = NULL;
>>   #endif
>> 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:
>    http://issues.apache.org/jira/secure/Administrators.jspa
> -
> For more information on JIRA, see:
>    http://www.atlassian.com/software/jira