#define META_DEFAULT_TARGET_NONE -1
struct metatarget **targets;
-#ifdef LDAP_CACHING
struct rewrite_info *rwinfo;
cache_manager *cm;
Backend *glue_be;
-#endif /* LDAP_CACHING */
struct metadncache cache;
#include "../back-ldap/back-ldap.h"
#include "back-meta.h"
-#ifdef LDAP_CACHING
#define MAX_ATTR_SETS 500
static void find_supersets( struct attr_set* attr_sets, int numsets );
static int compare_sets( struct attr_set* setA, int, int );
return result;
}
-#endif
#include "../../../libraries/libldap/ldap-int.h"
#include <sys/time.h>
-#ifdef LDAP_CACHING
-
static struct berval bv_queryid_any = BER_BVC( "(queryid=*)" );
static Attribute*
return LDAP_SUCCESS;
}
-
-#endif /* LDAP_CACHING */
#include "../back-ldap/back-ldap.h"
#include "back-meta.h"
-#ifdef LDAP_CACHING
static void add_query_on_top (query_manager*, CachedQuery*);
static int base_scope_compare(struct berval* dn_stored,
struct berval* dn_incoming, int scope_stored,
template->no_of_queries--;
}
-#endif
#include "../../../libraries/libldap/ldap-int.h"
#include <sys/time.h>
-#ifdef LDAP_CACHING
static int
remove_func (
Operation *op,
return 0;
}
-
-#endif /* LDAP_CACHING */
#include "ldap_log.h"
#include "../../../libraries/libldap/ldap-int.h"
-#ifdef LDAP_CACHING
static Entry*
meta_create_entry(
Backend *be,
return 0;
}
}
-#endif
#include "slap.h"
#include "back-meta.h"
-#ifdef LDAP_CACHING
static char* invert_string(char* string);
static struct berval* merge_init_final(struct berval*, struct berval*, struct berval*);
static int strings_containment(struct berval* stored, struct berval* incoming);
*/
return rc;
}
-#endif
#undef ldap_debug /* silence a warning in ldap-int.h */
#include "../../../libraries/libldap/ldap-int.h"
-#ifdef LDAP_CACHING
void
filter2template(
Filter *f,
return;
}
}
-#endif /* LDAP_CACHING */
#define META_CACHE_H
#include "slap.h"
-#ifdef LDAP_CACHING
/* cache specific errors */
enum type_of_result
{
struct exception* result
);
#endif
-#endif
int i = li->ntargets-1;
if ( i < 0 ) {
-#ifndef LDAP_CACHING
- fprintf( stderr,
- "%s: line %d: need \"uri\" directive first\n",
- fname, lineno );
-#else /* LDAP_CACHING */
if ( strcasecmp( argv[0], "rewriteEngine" ) == 0 ) {
li->rwinfo = rewrite_info_init( REWRITE_MODE_USE_DEFAULT );
}
return rewrite_parse(li->rwinfo, fname, lineno,
argc, argv);
-#endif /* LDAP_CACHING */
}
return rewrite_parse( li->targets[ i ]->rwmap.rwm_rw, fname, lineno,
fname, lineno, argc, argv );
/* anything else */
} else {
-#ifdef LDAP_CACHING
if ( meta_back_cache_config( be, fname, lineno, argc, argv ) == 0 ) {
return 0;
}
-#endif /* LDAP_CACHING */
fprintf( stderr,
"%s: line %d: unknown directive \"%s\" in meta database definition"
{
struct metainfo *li;
-#ifdef LDAP_CACHING
struct rewrite_info *rwinfo;
cache_manager *cm;
query_manager *qm;
ldap_pvt_thread_mutex_init(&cm->cache_mutex);
ldap_pvt_thread_mutex_init(&cm->remove_mutex);
ldap_pvt_thread_mutex_init( &cm->cc_mutex );
-#endif /* LDAP_CACHING */
li = ch_calloc( 1, sizeof( struct metainfo ) );
if ( li == NULL ) {
* this may change
*/
li->defaulttarget = META_DEFAULT_TARGET_NONE;
-#ifdef LDAP_CACHING
li->cm = cm;
li->rwinfo = rwinfo;
/* FIXME: what about qm ? */
-#endif /* LDAP_CACHING */
ldap_pvt_thread_mutex_init( &li->conn_mutex );
ldap_pvt_thread_mutex_init( &li->cache.mutex );
int isroot = 0;
dncookie dc;
-#ifdef LDAP_CACHING
cache_manager* cm = li->cm;
if (cm->caching) {
return meta_back_cache_search(op, rs);
}
-#endif /* LDAP_CACHING */
/*
* controls are set in ldap_back_dobind()
NULL, NULL, NULL, NULL, NULL,
offsetof(struct slap_internal_schema, si_ad_superiorUUID) },
-#ifdef LDAP_CACHING
/* LDAP cache specific operational attribute */
{ "queryid", "( 1.3.6.1.4.1.4203.666.1.12 NAME 'queryid' "
"DESC 'list of queries the entry belongs to' "
NULL, NULL,
NULL, NULL, NULL, NULL, NULL,
offsetof(struct slap_internal_schema, si_ad_queryid) },
-#endif /* LDAP_CACHING */
{ "syncreplCookie", "( 1.3.6.1.4.1.4203.666.1.23 "
"NAME 'syncreplCookie' "
#include "ldap_queue.h"
#define SLAP_EXTENDED_SCHEMA 1
-#define LDAP_CACHING 1
LDAP_BEGIN_DECL
/*
AttributeDescription *si_ad_namingCSN;
AttributeDescription *si_ad_superiorUUID;
-#ifdef LDAP_CACHING
/* LDAP cache specific operational attribute */
AttributeDescription *si_ad_queryid;
-#endif /* LDAP_CACHING */
AttributeDescription *si_ad_dseType;
AttributeDescription *si_ad_syncreplCookie;