[Remove entries to the current 2.0 section below, when backported]
+ *) Enable the option to support anonymous shared memory in mod_ldap.
+ This makes the cache work on Linux again. [Graham Leggett]
+
*) Allow LimitRequestBody to be reset to unlimited. PR 29106
[André Malo]
<?xml version="1.0"?>
<!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
<?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
-<!-- $Revision: 1.11 $ -->
+<!-- $Revision: 1.12 $ -->
<!--
Copyright 2002-2004 The Apache Software Foundation
<usage>
<p>Specifies the directory path and file name of the shared memory
- cache file. If not set, shared memory caching will not be used.</p>
+ cache file. If not set, anonymous shared memory will be used if the
+ platform supports it.</p>
</usage>
</directivesynopsis>
server_rec *s_vhost;
util_ldap_state_t *st_vhost;
- /* initializing cache if file is here and we already don't have shm addr*/
- if (st->cache_file && !st->cache_shm) {
+ /* initializing cache if shared memory size is not zero and we already don't have shm address */
+ if (!st->cache_shm && st->cache_bytes > 0) {
#endif
result = util_ldap_cache_init(p, st);
- apr_strerror(result, buf, sizeof(buf));
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, result, s,
- "LDAP cache init: %s", buf);
+ if (result != APR_SUCCESS) {
+ apr_strerror(result, buf, sizeof(buf));
+ ap_log_error(APLOG_MARK, APLOG_ERR, result, s,
+ "LDAP cache: error while creating a shared memory segment: %s", buf);
+ }
#if APR_HAS_SHARED_MEMORY
/* merge config in all vhost */
}
}
else {
- ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0 , s, "LDAP cache: Unable to init Shared Cache: no file");
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, "LDAP cache: LDAPSharedCacheSize is zero, disabling shared memory cache");
}
#endif
#if APR_HAS_SHARED_MEMORY
apr_status_t result;
- if (!st->cache_file) {
- return -1;
- }
-
result = apr_shm_create(&st->cache_shm, st->cache_bytes, st->cache_file, st->pool);
- if (result == EEXIST) {
+ if (result == APR_EEXIST) {
/*
* The cache could have already been created (i.e. we may be a child process). See
* if we can attach to the existing shared memory