Hi!

I developed an extended version of the auth_ldap module and use it currently
in Apache 1.3. Now I want to port this to Apache 2. 
I got everything ported except the follwing 2 problems:

1) It seems the functions ap_mm_malloc, ap_mm_strdup and ap_mm_free from
"ap_mm.h" aren't there anymore? How do I port them to Apache 2?

2) When I include the module in Apache 2 (2.0.52) and request a Directory
per Webbrowser that is auth_ldap-protected, I get a segfault in the
authenticate user function because this line returns NULL :

  auth_ldap_config_rec *sec =
    (auth_ldap_config_rec *)ap_get_module_config(r->per_dir_config,
&ep_auth_module);

This line always gives me a NULL-pointer, but it did not in the 1.3 version.
I investigated a bit and found, that the function 
ap_get_module_config just does a vector lookup:
r->per_dir_config[ep_auth_module.module_index]

I echoed the array r->per_dir_config to stderr and I got the following
output:

ep_auth_module.module_index = 21    

(although it is the ONY module I load in my configuration; it gets
initialized using STANDARD_20MODULE_STUFF with the value of -1)

Now the list of the pointers in r->per_dir_config :

ptr[0]=0x816e720
ptr[1]=(nil)
ptr[2]=(nil)
ptr[3]=(nil)
ptr[4]=(nil)
ptr[5]=(nil)
ptr[6]=0x809e2de
ptr[7]=(nil)
ptr[8]=(nil)
ptr[9]=(nil)
ptr[10]=(nil)
ptr[11]=(nil)
ptr[12]=(nil)
ptr[13]=(nil)
ptr[14]=(nil)
ptr[15]=(nil)
ptr[16]=(nil)
ptr[17]=(nil)
ptr[18]=(nil)
ptr[19]=(nil)
ptr[20]=(nil)
ptr[21]=(nil)
ptr[22]=(nil)
ptr[23]=(nil)
ptr[24]=(nil)
ptr[25]=(nil)
ptr[26]=(nil)

As you can see, index 21 is NULL. 

I even tried to force the not-NULL indices by writing: 
  auth_ldap_config_rec *sec = r->per_dir_config[6];
and 
  auth_ldap_config_rec *sec = r->per_dir_config[0];

But this gave me a segfault at another location ...


I don't know whether I'm doing something wrong in the Module source, or in
the way I build it...

I compile it using:
  CFLAGS=-c -g -march=i586 -mcpu=i686 -fmessage-length=0 -Wall -DEAPI_MM
-fPIC -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHARD_SERVER_LIMIT=2048
-DDYNAMIC_MODULE_LIMIT=128 -DSSL_EXPERIMENTAL_PERDIRCA_IGNORE
-DSSL_EXPERIMENTAL_PROXY_IGNORE -DLINUX=22 -DMOD_SSL=208115 -DEAPI
-DWITH_SHARED_LDAP_CACHE -DWITH_OPENLDAP -fPIC -Wall -DSHARED_MODULE
  LIB=-lmm -lldap -lcrypt -lpq
  
  And Linking is done as shared object: $(LD) $(LIB) -o $@ -shared  $^


Does somebody have a clue what's wrong here? If you need more info, just let
me know.

Thanks in advance!
Stefan

-- 
Stefan Gaffga, Systementwickler          _____  _____
EP:ElectronicPartner GmbH               / ___/ / _  /  __
Mündelheimer Weg 40, 40472 Düsseldorf  / __/  / ___/  /_/
Tel:0211/4156-223 Fax:0211/4156-308   /____/ /_/     /_/ 

Reply via email to