DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12757>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12757

mod_ldap cache tries to open an existing shared memory file

           Summary: mod_ldap cache tries to open an existing shared memory
                    file
           Product: Apache httpd-2.0
           Version: HEAD
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Other Modules
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: [EMAIL PROTECTED]


File: /modules/experimental/util_ldap_cach.c

apr_status_t util_ldap_cache_init(apr_pool_t *pool, apr_size_t reqsize)
{
#if APR_HAS_SHARED_MEMORY
    apr_status_t result;

    - result = apr_shm_create(&util_ldap_shm, reqsize, "/tmp/ldap_cache", pool);
    + result = apr_shm_create(&util_ldap_shm, reqsize, NULL, pool);
    if (result != APR_SUCCESS) {
        return result;
    }

pool);
#endif
....
}
The ldap cache used by mod_ldap and mod_auth_ldap tries to create a shared 
memory file for each process forked. The problem is that only the first process 
is able to create the file, all the other processes fail to create the file 
because it already exists. This disables caching on all processes other than 
the initial process. Caching LDAP authentication is essential as this is a slow 
task, especially with Microsoft Active Directory. One solution on linux is to 
use an anonymous shared memory file (fileName is NULL) but apparently anonymous 
shared memory is not supported on other platforms. I assume all processes 
should share a single cache. Would anonymous shared memory create a new file 
for each process? If this is not desired, only the first process should create 
the file and all the other processes should attach to in.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to