From: Kurt Zeilenga Date: Sat, 31 May 2003 02:55:23 +0000 (+0000) Subject: Move SYNC, SYNCREPL, and LDAP_CACHING out from behind LDAP_DEVEL X-Git-Tag: OPENLDAP_REL_ENG_2_1_MP~964 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=03233d2719519785e4d9b0a40daf0d3f2826a63b;p=openldap Move SYNC, SYNCREPL, and LDAP_CACHING out from behind LDAP_DEVEL --- diff --git a/include/ldap.h b/include/ldap.h index 73b8efe152..83bd5d96f0 100644 --- a/include/ldap.h +++ b/include/ldap.h @@ -193,15 +193,7 @@ typedef struct ldapcontrol { #define LDAP_CONTROL_DUPENT LDAP_CONTROL_DUPENT_REQUEST #endif -#ifdef LDAP_DEVEL #define LDAP_CONTROL_PAGEDRESULTS "1.2.840.113556.1.4.319" -#endif - -#ifdef LDAP_DEVEL -#define LDAP_CLIENT_UPDATE 1 -#define LDAP_SYNC 2 -#define LDAP_SYNCREPL 1 -#endif #ifdef LDAP_CLIENT_UPDATE #define LDAP_CONTROL_CLIENT_UPDATE "1.3.6.1.4.1.4203.666.5.3" @@ -210,7 +202,11 @@ typedef struct ldapcontrol { #define LDAP_CUP_COOKIE_OID "1.3.6.1.4.1.4203.666.10.1" #endif +#ifdef LDAP_DEVEL +#define LDAP_SYNC 2 +#endif #ifdef LDAP_SYNC +#define LDAP_SYNCREPL 1 #define LDAP_CONTROL_SYNC "1.3.6.1.4.1.4203.666.5.6" #define LDAP_CONTROL_SYNC_STATE "1.3.6.1.4.1.4203.666.5.7" #define LDAP_CONTROL_SYNC_DONE "1.3.6.1.4.1.4203.666.5.8" @@ -230,10 +226,9 @@ typedef struct ldapcontrol { #define LDAP_CONTROL_VLVREQUEST "2.16.840.1.113730.3.4.9" #define LDAP_CONTROL_VLVRESPONSE "2.16.840.1.113730.3.4.10" -#ifdef LDAP_DEVEL +/* controls for MSAD compatibility */ #define LDAP_CONTROL_X_DOMAIN_SCOPE "1.2.840.113556.1.4.1339" #define LDAP_CONTROL_X_PERMISSIVE_MODIFY "1.2.840.113556.1.4.1413" -#endif /* LDAP Unsolicited Notifications */ #define LDAP_NOTICE_OF_DISCONNECTION "1.3.6.1.4.1.1466.20036" @@ -249,10 +244,7 @@ typedef struct ldapcontrol { #define LDAP_TAG_EXOP_MODIFY_PASSWD_GEN ((ber_tag_t) 0x80U) #define LDAP_EXOP_X_WHO_AM_I "1.3.6.1.4.1.4203.1.11.3" - -#ifdef LDAP_DEVEL #define LDAP_EXOP_X_CANCEL "1.3.6.1.4.1.4203.666.6.3" -#endif /* LDAP Features */ #define LDAP_FEATURE_ALL_OPERATIONAL_ATTRS "1.3.6.1.4.1.4203.1.5.1" /* + */ @@ -339,9 +331,7 @@ typedef struct ldapcontrol { #define LDAP_RES_COMPARE ((ber_tag_t) 0x6fU) /* application + constructed */ #define LDAP_RES_EXTENDED ((ber_tag_t) 0x78U) /* V3: application + constructed */ #define LDAP_RES_EXTENDED_PARTIAL ((ber_tag_t) 0x79U) /* V3+: application + constructed */ -#ifdef LDAP_DEVEL #define LDAP_RES_INTERMEDIATE_RESP ((ber_tag_t) 0x7aU) -#endif #define LDAP_RES_ANY (-1) #define LDAP_RES_UNSOLICITED (0) diff --git a/servers/slapd/slap.h b/servers/slapd/slap.h index 4fdafe11a0..87ee2dcf4c 100644 --- a/servers/slapd/slap.h +++ b/servers/slapd/slap.h @@ -35,10 +35,8 @@ #include "ldap_pvt_thread.h" #include "ldap_queue.h" -#ifdef LDAP_DEVEL #define SLAP_EXTENDED_SCHEMA 1 -#define LDAP_CACHING -#endif +#define LDAP_CACHING 1 LDAP_BEGIN_DECL /* @@ -703,9 +701,9 @@ struct slap_internal_schema { ObjectClass *si_oc_dynamicObject; #ifdef LDAP_SYNCREPL - ObjectClass *si_oc_glue; - ObjectClass *si_oc_syncConsumerSubentry; - ObjectClass *si_oc_syncProviderSubentry; + ObjectClass *si_oc_glue; + ObjectClass *si_oc_syncConsumerSubentry; + ObjectClass *si_oc_syncProviderSubentry; #endif /* objectClass attribute descriptions */ @@ -732,8 +730,8 @@ struct slap_internal_schema { #endif /* LDAP_CACHING */ #ifdef LDAP_SYNCREPL - AttributeDescription *si_ad_dseType; - AttributeDescription *si_ad_syncreplCookie; + AttributeDescription *si_ad_dseType; + AttributeDescription *si_ad_syncreplCookie; #endif /* root DSE attribute descriptions */ @@ -1268,7 +1266,6 @@ typedef BackendDB Backend; #define backends backendDB #ifdef LDAP_SYNCREPL - struct nonpresent_entry { struct berval *dn; struct berval *ndn; @@ -1983,27 +1980,36 @@ typedef struct slap_op { #endif } Operation; -#define send_ldap_error( op, rs, err, text ) \ -do { (rs)->sr_err = err; (rs)->sr_text = text; \ -(op->o_conn->c_send_ldap_result)( op, rs ); } while (0) -#define send_ldap_discon( op, rs, err, text ) \ -do { (rs)->sr_err = err; (rs)->sr_text = text; \ -send_ldap_disconnect( op, rs ); } while (0) -typedef void (SEND_LDAP_RESULT)(struct slap_op *op, struct slap_rep *rs); -typedef int (SEND_SEARCH_ENTRY)(struct slap_op *op, struct slap_rep *rs); -typedef int (SEND_SEARCH_REFERENCE)(struct slap_op *op, struct slap_rep *rs); -typedef void (SEND_LDAP_EXTENDED)(struct slap_op *op, struct slap_rep *rs); -typedef void (SEND_LDAP_INTERMEDIATE_RESP)(struct slap_op *op, struct slap_rep *rs); +#define send_ldap_error( op, rs, err, text ) do { \ + (rs)->sr_err = err; (rs)->sr_text = text; \ + (op->o_conn->c_send_ldap_result)( op, rs ); \ + } while (0) +#define send_ldap_discon( op, rs, err, text ) do { \ + (rs)->sr_err = err; (rs)->sr_text = text; \ + send_ldap_disconnect( op, rs ); \ + } while (0) + +typedef void (SEND_LDAP_RESULT)( + struct slap_op *op, struct slap_rep *rs); +typedef int (SEND_SEARCH_ENTRY)( + struct slap_op *op, struct slap_rep *rs); +typedef int (SEND_SEARCH_REFERENCE)( + struct slap_op *op, struct slap_rep *rs); +typedef void (SEND_LDAP_EXTENDED)( + struct slap_op *op, struct slap_rep *rs); +typedef void (SEND_LDAP_INTERMEDIATE_RESP)( + struct slap_op *op, struct slap_rep *rs); + #define send_ldap_result( op, rs ) \ -(op->o_conn->c_send_ldap_result)( op, rs ) + (op->o_conn->c_send_ldap_result)( op, rs ) #define send_search_entry( op, rs ) \ -(op->o_conn->c_send_search_entry)( op, rs ) + (op->o_conn->c_send_search_entry)( op, rs ) #define send_search_reference( op, rs ) \ -(op->o_conn->c_send_search_reference)( op, rs ) + (op->o_conn->c_send_search_reference)( op, rs ) #define send_ldap_extended( op, rs ) \ -(op->o_conn->c_send_ldap_extended)( op, rs ) + (op->o_conn->c_send_ldap_extended)( op, rs ) #define send_ldap_intermediate_resp( op, rs ) \ -(op->o_conn->c_send_ldap_intermediate_resp)( op, rs ) + (op->o_conn->c_send_ldap_intermediate_resp)( op, rs ) /* * Caches the result of a backend_group check for ACL evaluation @@ -2102,7 +2108,7 @@ typedef struct slap_conn { #ifdef LDAP_RES_INTERMEDIATE_RESP SEND_LDAP_INTERMEDIATE_RESP *c_send_ldap_intermediate_resp; #endif - + } Connection; #if defined(LDAP_SYSLOG) && defined(LDAP_DEBUG)