From f9d36c0dce7ef04dbabc735a0a9fd323d9267196 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 19 Jan 2005 18:34:36 +0000 Subject: [PATCH] Make most LDAP_DEVEL macro uses indirect --- servers/slapd/root_dse.c | 5 +++-- servers/slapd/schema_prep.c | 17 ++++++++++------- servers/slapd/slap.h | 31 ++++++++++++++----------------- 3 files changed, 27 insertions(+), 26 deletions(-) diff --git a/servers/slapd/root_dse.c b/servers/slapd/root_dse.c index 46f25f15a8..46e77968ce 100644 --- a/servers/slapd/root_dse.c +++ b/servers/slapd/root_dse.c @@ -34,9 +34,10 @@ static struct berval supportedFeatures[] = { BER_BVC(LDAP_FEATURE_ABSOLUTE_FILTERS), /* (&) and (|) search filters */ BER_BVC(LDAP_FEATURE_LANGUAGE_TAG_OPTIONS), /* Language Tag Options */ BER_BVC(LDAP_FEATURE_LANGUAGE_RANGE_OPTIONS),/* Language Range Options */ - -#ifdef LDAP_DEVEL +#ifdef LDAP_FEATURE_SUBORDINATE_SCOPE BER_BVC(LDAP_FEATURE_SUBORDINATE_SCOPE), /* "children" search scope */ +#endif +#ifdef LDAP_FEATURE_MODIFY_INCREMENT BER_BVC(LDAP_FEATURE_MODIFY_INCREMENT), /* Modify/increment */ #endif {0,NULL} diff --git a/servers/slapd/schema_prep.c b/servers/slapd/schema_prep.c index ee064c157d..d4decf4bc2 100644 --- a/servers/slapd/schema_prep.c +++ b/servers/slapd/schema_prep.c @@ -370,13 +370,16 @@ static struct slap_schema_oc_map { "matchingRuleUse ) )", subentryObjectClass, SLAP_OC_OPERATIONAL, offsetof(struct slap_internal_schema, si_oc_subschema) }, -#ifdef LDAP_DEVEL +#ifdef LDAP_COLLECTIVE_ATTRIBUTES { "collectiveAttributeSubentry", "( 2.5.17.2 " - "NAME 'collectiveAttributeSubentry' " + "NAME 'RFC3671: collectiveAttributeSubentry' " "AUXILIARY )", subentryObjectClass, SLAP_OC_COLLECTIVEATTRIBUTESUBENTRY|SLAP_OC_OPERATIONAL|SLAP_OC_HIDE, - offsetof(struct slap_internal_schema, si_oc_collectiveAttributeSubentry) }, + offsetof( struct slap_internal_schema, + si_oc_collectiveAttributeSubentry) }, +#endif +#ifdef LDAP_DYNAMIC_OBJECTS { "dynamicObject", "( 1.3.6.1.4.1.1466.101.119.2 " "NAME 'dynamicObject' " "DESC 'RFC2589: Dynamic Object' " @@ -506,7 +509,7 @@ static struct slap_schema_ad_map { NULL, NULL, NULL, NULL, NULL, NULL, NULL, offsetof(struct slap_internal_schema, si_ad_subschemaSubentry) }, -#ifdef LDAP_DEVEL +#ifdef LDAP_COLLECTIVE_ATTRIBUTES { "collectiveAttributeSubentries", "( 2.5.18.12 " "NAME 'collectiveAttributeSubentries' " "EQUALITY distinguishedNameMatch " @@ -566,7 +569,7 @@ static struct slap_schema_ad_map { NULL, NULL, NULL, NULL, NULL, offsetof(struct slap_internal_schema, si_ad_namingCSN) }, -#if 0 +#ifdef LDAP_SUPERIOR_UUID { "superiorUUID", "( 1.3.6.1.4.1.4203.666.1.11 NAME 'superiorUUID' " "DESC 'UUID of the superior entry' " "EQUALITY octetStringMatch " @@ -602,7 +605,7 @@ static struct slap_schema_ad_map { NULL, NULL, NULL, NULL, NULL, offsetof(struct slap_internal_schema, si_ad_contextCSN) }, -#ifdef LDAP_DEVEL +#ifdef LDAP_SYNC_TIMESTAMP { "syncTimestamp", "( 1.3.6.1.4.1.4203.666.1.26 NAME 'syncTimestamp' " "DESC 'Time which object was replicated' " "EQUALITY generalizedTimeMatch " @@ -862,7 +865,7 @@ static struct slap_schema_ad_map { offsetof(struct slap_internal_schema, si_ad_aci) }, #endif -#ifdef LDAP_DEVEL +#ifdef LDAP_DYNAMIC_OBJECTS { "entryTtl", "( 1.3.6.1.4.1.1466.101.119.3 NAME 'entryTtl' " "DESC 'RFC2589: entry time-to-live' " "SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE " diff --git a/servers/slapd/slap.h b/servers/slapd/slap.h index aa356b80f5..d5b3a6c3ec 100644 --- a/servers/slapd/slap.h +++ b/servers/slapd/slap.h @@ -58,6 +58,20 @@ LDAP_BEGIN_DECL +#ifdef LDAP_DEVEL +#define SLAP_ACL_HONOR_DISCLOSE /* partially implemented */ +#define SLAP_DYNACL +#define LDAP_COMP_MATCH /* experimental */ +#define LDAP_DYNAMIC_OBJECTS +#define LDAP_SYNC_TIMESTAMP +#define LDAP_COLLECTIVE_ATTRIBUTES /* not yet implemented */ +#endif + +#if defined(LDAP_DEVEL) && defined(ENABLE_REWRITE) +/* use librewrite for sasl-regexp */ +#define SLAP_AUTH_REWRITE 1 +#endif /* LDAP_DEVEL && ENABLE_REWRITE */ + /* * SLAPD Memory allocation macros * @@ -324,10 +338,6 @@ typedef int slap_syntax_transform_func LDAP_P(( struct berval * out, void *memctx)); -#ifdef LDAP_DEVEL -#define LDAP_COMP_MATCH -#endif - #ifdef LDAP_COMP_MATCH typedef void* slap_component_transform_func LDAP_P(( struct berval * in )); @@ -1117,10 +1127,6 @@ typedef struct slap_ldap_modlist { #define ml_values ml_mod.mod_values } LDAPModList; -#ifdef LDAP_DEVEL -#define SLAP_ACL_HONOR_DISCLOSE -#endif /* LDAP_DEVEL */ - /* * represents an access control list */ @@ -1172,10 +1178,6 @@ typedef struct slap_authz_info { } AuthorizationInformation; -#ifdef LDAP_DEVEL -#define SLAP_DYNACL -#endif /* LDAP_DEVEL */ - #ifdef SLAP_DYNACL struct slap_op; @@ -2585,11 +2587,6 @@ typedef int (SLAP_CTRL_PARSE_FN) LDAP_P(( #define SLAP_ZONE_ALLOC 1 #undef SLAP_ZONE_ALLOC -#if defined(LDAP_DEVEL) && defined(ENABLE_REWRITE) -/* use librewrite for sasl-regexp */ -#define SLAP_AUTH_REWRITE 1 -#endif /* LDAP_DEVEL && ENABLE_REWRITE */ - #ifdef LDAP_COMP_MATCH /* * Extensible Filter Definition -- 2.39.5