httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brad Nicholes" <BNICHO...@novell.com>
Subject Re: svn commit: r386698 - /httpd/httpd/trunk/modules/ldap/util_ldap.c
Date Fri, 17 Mar 2006 21:21:16 GMT
>>> On 3/17/2006 at 12:53 pm, in message
<cc67648e0603171153h5c73ce98y69d6538adb00bda@mail.gmail.com>, "Jeff
Trawick"
<trawick@gmail.com> wrote:
> On 3/17/06, bnicholes@apache.org <bnicholes@apache.org> wrote:
>> Author: bnicholes
>> Date: Fri Mar 17 11:26:27 2006
>> New Revision: 386698
>>
>> URL: http://svn.apache.org/viewcvs?rev=386698&view=rev 
>> Log:
>> Fix the server_merge so that the memory pools and mutexes that were
created 
> during the server_create, are used.  Allow the settings that can be 
> overwritten in a vhost to use the vhost values
>>
>> Modified:
>>     httpd/httpd/trunk/modules/ldap/util_ldap.c
>>
>> Modified: httpd/httpd/trunk/modules/ldap/util_ldap.c
>> URL: 
>
http://svn.apache.org/viewcvs/httpd/httpd/trunk/modules/ldap/util_ldap.c?rev=

> 386698&r1=386697&r2=386698&view=diff
>> 
>
=============================================================================
> =
>> --- httpd/httpd/trunk/modules/ldap/util_ldap.c (original)
>> +++ httpd/httpd/trunk/modules/ldap/util_ldap.c Fri Mar 17 11:26:27
2006
>> @@ -1753,24 +1753,36 @@
>>      util_ldap_state_t *base = (util_ldap_state_t *) basev;
>>      util_ldap_state_t *overrides = (util_ldap_state_t *)
overridesv;
>>
>> -    st->pool = base->pool;
>> +    st->pool = overrides->pool;
>>  #if APR_HAS_THREADS
>> -    st->mutex = base->mutex;
>> +    st->mutex = overrides->mutex;
>>  #endif
>>
>> +    /* The cache settings can not be modified in a
>> +        virtual host since all server use the same
>> +        shared memory cache. */
>>      st->cache_bytes = base->cache_bytes;
>>      st->search_cache_ttl = base->search_cache_ttl;
>>      st->search_cache_size = base->search_cache_size;
>>      st->compare_cache_ttl = base->compare_cache_ttl;
>>      st->compare_cache_size = base->compare_cache_size;
>> -    st->connections = base->connections;
>> -    st->ssl_supported = base->ssl_supported;
>> +
>> +    st->connections = NULL;
>> +    st->ssl_supported = 0;
>>      st->global_certs = apr_array_append(p, base->global_certs,
>>                                            
overrides->global_certs);
>>      st->client_certs = apr_array_append(p, base->client_certs,
>>                                            
overrides->client_certs);
>>      st->secure = (overrides->secure_set == 0) ? base->secure
>>                                                : overrides->secure;
>> +
>> +    /* LDAP connection settings can be overwritten in a virtual
host */
>> +    st->connectionTimeout = (overrides->connectionTimeout == 10)
>> +                                ? base->connectionTimeout
>> +                                : overrides->connectionTimeout;
> 
> actually, it can't...
> 
> util_ldap_set_connection_timeout() has
>   err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
>   if (err != NULL) {
>     return err;
>   }
> 
> should I remove that check for GLOBAL_ONLY?
> 
> I can a check for GLOBAL_ONLY and try to update the docs for
> directives that aren't appropriate in a vhost, according to your
notes
> in the merge function

Ah crap, I knew I was missing something that was preventing the
directives from being called in a vhost.  The GLOBAL_ONLY should be
removed from the LDAPConnectionTimeout directive.  In fact I probably
need to add GLOBAL_ONLY to all of the caching directives even though
nothing would happen even if somebody tried to set a cache directive
inside a vhost.

Brad

Mime
View raw message