Re: Proposed LDAP Fix

2005-03-09 Thread Brad Nicholes
The patch has been committed to httpd-trunk.

thanks,
Brad

>>> [EMAIL PROTECTED] Tuesday, March 08, 2005 7:26:02 AM >>>
I had problems with LDAP modules in 2.0.53 on Windows.  It
authenticates
fine, but when I shut down apache I get those Microsoft alerts saying
something went wrong.  It only happens when I have the ldap modules
enabled.  The problem is in modules/experimental/util_ldap_cache.c in
the util_ldap_cache_module_kill() method.  The cache_file is null.
Adding a null check prior to calling apr_file_remove() fixed the
issue.
Any thoughts?  Thanks.
,
Josh.
 
 
apr_status_t util_ldap_cache_module_kill(void *data)
{
util_ldap_state_t *st = (util_ldap_state_t *)data;
 
util_ald_destroy_cache(st->util_ldap_cache);
#if APR_HAS_SHARED_MEMORY
if (st->cache_rmm != NULL) {
apr_rmm_destroy (st->cache_rmm);
st->cache_rmm = NULL;
}
if (st->cache_shm != NULL) {
apr_status_t result = apr_shm_destroy(st->cache_shm);
st->cache_shm = NULL;
  if ( st->cache_file != NULL ) // ADDED THIS LINE
   apr_file_remove(st->cache_file, st->pool);
return result;
}
#endif
return APR_SUCCESS;
}



Proposed LDAP Fix

2005-03-08 Thread Fenlason, Josh
Title: Message



I had problems with 
LDAP modules in 2.0.53 on Windows.  It authenticates fine, but when I shut 
down apache I get those Microsoft alerts saying something went wrong.  It 
only happens when I have the ldap modules enabled.  The problem is in 
modules/experimental/util_ldap_cache.c in the util_ldap_cache_module_kill() 
method.  The cache_file is null.  Adding a null check prior to calling 
apr_file_remove() fixed the issue.  Any thoughts?  
Thanks.
,
Josh.
 
 
apr_status_t 
util_ldap_cache_module_kill(void *data){    
util_ldap_state_t *st = (util_ldap_state_t *)data;
 
    
util_ald_destroy_cache(st->util_ldap_cache);#if 
APR_HAS_SHARED_MEMORY    if (st->cache_rmm != NULL) 
{    apr_rmm_destroy 
(st->cache_rmm);    
st->cache_rmm = NULL;    }    if 
(st->cache_shm != NULL) {    
apr_status_t result = 
apr_shm_destroy(st->cache_shm);    
st->cache_shm = NULL;  if ( st->cache_file != NULL ) 
// ADDED THIS LINE   apr_file_remove(st->cache_file, 
st->pool);    return 
result;    }#endif    return 
APR_SUCCESS;}