httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthieu Estrade <apa...@moresecurity.org>
Subject [PATCH] Bug #18756: fix many problems about ldap cache using shared memory
Date Fri, 12 Sep 2003 12:01:41 GMT
Hi,

This is my second and new patch for ldap cache using shared memory.
I am using ldap cache with linux redhat and worker mpm.

The problems i found:

1) All shm cache information (shm addr, rmm addr, lock) are declared as
global.
--> in worker mpm, many strange problems happen.

2) shm initialisation is in child init hook
--> it try to create an shm file per child

3) ldap cache using shm is using a default filename to create shm, in
/tmp
--> if 2 different httpd are used, only one can use ldap cache using
shm.


What i did:

1) i moved all this global declaration inside the module config, then i
made all rmm_alloc and rmm_free use these module config data.

2) i moved the shm init in post_config hook, then did some code to merge
all these rmm and shm addr in all vhost module config 

3) i created a directive LDAPSharedCacheFile receiving a filename, to
create the file with apr_root_relative which will be used to create the
shm.

I tested this patch on linux rh9 with 3 vhost using ldap auth, it work
well. I also tested the ldap-status and it work well too.

Feedback are welcome !

regards,

Matthieu


Mime
View raw message