#define LDAP_OPT_X_TLS_CRLCHECK 0x600b
#define LDAP_OPT_X_TLS_CONNECT_CB 0x600c
#define LDAP_OPT_X_TLS_CONNECT_ARG 0x600d
+#define LDAP_OPT_X_TLS_DHFILE 0x600e
#define LDAP_OPT_X_TLS_NEVER 0
#define LDAP_OPT_X_TLS_HARD 1
/* LDAP Controls */
/* standard track controls */
-#define LDAP_CONTROL_MANAGEDSAIT "2.16.840.1.113730.3.4.2" /* RFC 3296 */
-#define LDAP_CONTROL_SUBENTRIES "1.3.6.1.4.1.4203.1.10.1" /* RFC 3672 */
-#define LDAP_CONTROL_PAGEDRESULTS "1.2.840.113556.1.4.319" /* RFC 2696 */
+#define LDAP_CONTROL_MANAGEDSAIT "2.16.840.1.113730.3.4.2" /* RFC 3296 */
+#define LDAP_CONTROL_PROXY_AUTHZ "2.16.840.1.113730.3.4.18" /* RFC TBD */
+#define LDAP_CONTROL_SUBENTRIES "1.3.6.1.4.1.4203.1.10.1" /* RFC 3672 */
+
+#define LDAP_CONTROL_VALUESRETURNFILTER "1.2.826.0.1.334810.2.3"/* RFC 3876 */
+#define LDAP_CONTROL_ASSERT "1.3.6.1.1.12" /* RFC TBD */
+#define LDAP_CONTROL_PRE_READ "1.3.6.1.1.13.1" /* RFC TBD */
+#define LDAP_CONTROL_POST_READ "1.3.6.1.1.13.2" /* RFC TBD */
/* standard track - not implemented in slapd(8) */
#define LDAP_CONTROL_SORTREQUEST "1.2.840.113556.1.4.473" /* RFC 2891 */
#define LDAP_CONTROL_SORTRESPONSE "1.2.840.113556.1.4.474" /* RFC 2891 */
-/* but not yet formalized controls */
-#define LDAP_CONTROL_PROXY_AUTHZ "2.16.840.1.113730.3.4.18"
-#define LDAP_CONTROL_VALUESRETURNFILTER "1.2.826.0.1.334810.2.3"
-
-/* various works in progress */
-#define LDAP_CONTROL_ASSERT "1.3.6.1.4.1.4203.666.5.9"
-#define LDAP_CONTROL_NOOP "1.3.6.1.4.1.4203.666.5.2"
-#define LDAP_CONTROL_PRE_READ "1.3.6.1.4.1.4203.666.5.10.1"
-#define LDAP_CONTROL_POST_READ "1.3.6.1.4.1.4203.666.5.10.2"
-
-#if 0
-/* LDAP Duplicated Entry Control Extension *//* not implemented in slapd(8) */
-#define LDAP_CONTROL_DUPENT_REQUEST "2.16.840.1.113719.1.27.101.1"
-#define LDAP_CONTROL_DUPENT_RESPONSE "2.16.840.1.113719.1.27.101.2"
-#define LDAP_CONTROL_DUPENT_ENTRY "2.16.840.1.113719.1.27.101.3"
-#define LDAP_CONTROL_DUPENT LDAP_CONTROL_DUPENT_REQUEST
-#endif
-
-/* LDAP VLV *//* not implemented in slapd(8) */
-#define LDAP_CONTROL_VLVREQUEST "2.16.840.1.113730.3.4.9"
-#define LDAP_CONTROL_VLVRESPONSE "2.16.840.1.113730.3.4.10"
+/* non-standard track controls */
+#define LDAP_CONTROL_PAGEDRESULTS "1.2.840.113556.1.4.319" /* RFC 2696 */
/* Password policy Controls *//* work in progress */
-/* ITS#3458: released, but not to latest draft; disabled by default */
+/* ITS#3458: released; disabled by default */
#define LDAP_CONTROL_PASSWORDPOLICYREQUEST "1.3.6.1.4.1.42.2.27.8.5.1"
#define LDAP_CONTROL_PASSWORDPOLICYRESPONSE "1.3.6.1.4.1.42.2.27.8.5.1"
+/* various works in progress */
+#define LDAP_CONTROL_NOOP "1.3.6.1.4.1.4203.666.5.2"
+#define LDAP_CONTROL_NO_SUBORDINATES "1.3.6.1.4.1.4203.666.5.11"
+#define LDAP_CONTROL_MANAGEDIT "1.3.6.1.4.1.4203.666.5.12"
+#define LDAP_CONTROL_SLURP "1.3.6.1.4.1.4203.666.5.13"
+#define LDAP_CONTROL_VALSORT "1.3.6.1.4.1.4203.666.5.14"
+#define LDAP_CONTROL_DONTUSECOPY "1.3.6.1.4.1.4203.666.5.15"
+
/* LDAP Sync -- draft-zeilenga-ldup-sync *//* submitted for publication */
#define LDAP_SYNC_OID "1.3.6.1.4.1.4203.1.9.1"
#define LDAP_CONTROL_SYNC LDAP_SYNC_OID ".1"
#define LDAP_SYNC_MODIFY 2
#define LDAP_SYNC_DELETE 3
-/* MS ActiveDirectory controls (for 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"
-#define LDAP_CONTROL_X_INCREMENTAL_VALUES "1.2.840.113556.1.4.802"
-#define LDAP_CONTROL_X_TREE_DELETE "1.2.840.113556.1.4.805"
-#define LDAP_CONTROL_X_SEARCH_OPTIONS "1.2.840.113556.1.4.1340"
-#define LDAP_SEARCH_FLAG_DOMAIN_SCOPE 1 /* do not generate referrals */
-#define LDAP_SEARCH_FLAG_PHANTOM_ROOT 2 /* search all NCs subordinate to base */
-
/* LDAP Chaining Behavior Control *//* work in progress */
/* <draft-sermersheim-ldap-chaining>;
- * see also LDAP_REQUIRES_CHAINING, LDAP_CANNOT_CHAIN */
+ * see also LDAP_NO_REFERRALS_FOUND, LDAP_CANNOT_CHAIN */
#ifdef LDAP_DEVEL
#define LDAP_CONTROL_X_CHAINING_BEHAVIOR "1.3.6.1.4.1.4203.666.11.3"
#define LDAP_REFERRALS_REQUIRED 3
#endif
+/* MS Active Directory controls (for compatibility) */
+#define LDAP_CONTROL_X_INCREMENTAL_VALUES "1.2.840.113556.1.4.802"
+#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"
+#define LDAP_CONTROL_X_SEARCH_OPTIONS "1.2.840.113556.1.4.1340"
+#define LDAP_SEARCH_FLAG_DOMAIN_SCOPE 1 /* do not generate referrals */
+#define LDAP_SEARCH_FLAG_PHANTOM_ROOT 2 /* search all subordinate NCs */
+
+/* MS Active Directory controls - not implemented in slapd(8) */
+#define LDAP_CONTROL_X_TREE_DELETE "1.2.840.113556.1.4.805"
+#define LDAP_CONTROL_X_EXTENDED_DN "1.2.840.113556.1.4.529"
+
+/* various expired works */
+/* LDAP Duplicated Entry Control Extension *//* not implemented in slapd(8) */
+#define LDAP_CONTROL_DUPENT_REQUEST "2.16.840.1.113719.1.27.101.1"
+#define LDAP_CONTROL_DUPENT_RESPONSE "2.16.840.1.113719.1.27.101.2"
+#define LDAP_CONTROL_DUPENT_ENTRY "2.16.840.1.113719.1.27.101.3"
+#define LDAP_CONTROL_DUPENT LDAP_CONTROL_DUPENT_REQUEST
+
+/* LDAP Persistent Search Control *//* not implemented in slapd(8) */
+#define LDAP_CONTROL_PERSIST_REQUEST "2.16.840.1.113730.3.4.3"
+#define LDAP_CONTROL_PERSIST_ENTRY_CHANGE_NOTICE "2.16.840.1.113730.3.4.7"
+#define LDAP_CONTROL_PERSIST_ENTRY_CHANGE_ADD 0x1
+#define LDAP_CONTROL_PERSIST_ENTRY_CHANGE_DELETE 0x2
+#define LDAP_CONTROL_PERSIST_ENTRY_CHANGE_MODIFY 0x4
+#define LDAP_CONTROL_PERSIST_ENTRY_CHANGE_RENAME 0x8
+
+/* LDAP VLV *//* not implemented in slapd(8) */
+#define LDAP_CONTROL_VLVREQUEST "2.16.840.1.113730.3.4.9"
+#define LDAP_CONTROL_VLVRESPONSE "2.16.840.1.113730.3.4.10"
+
+
/* LDAP Unsolicited Notifications */
#define LDAP_NOTICE_OF_DISCONNECTION "1.3.6.1.4.1.1466.20036" /* RFC 2251 */
#define LDAP_NOTICE_DISCONNECT LDAP_NOTICE_OF_DISCONNECTION
#define LDAP_TAG_EXOP_MODIFY_PASSWD_NEW ((ber_tag_t) 0x82U)
#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"
-#define LDAP_EXOP_X_CANCEL "1.3.6.1.1.8"
+#define LDAP_EXOP_CANCEL "1.3.6.1.1.8" /* RFC 3909 */
+#define LDAP_EXOP_X_CANCEL LDAP_EXOP_CANCEL
+
+/* various works in progress */
+#define LDAP_EXOP_WHO_AM_I "1.3.6.1.4.1.4203.1.11.3"
+#define LDAP_EXOP_X_WHO_AM_I LDAP_EXOP_WHO_AM_I
+
+#define LDAP_EXOP_X_TURN "1.3.6.1.4.1.4203.666.6.4"
/* LDAP Grouping of Related Operations *//* a work in progress */
#ifdef LDAP_DEVEL
#define LDAP_GROUP_TRANSACTION "1.3.6.1.4.1.4203.666.10.4"
#endif
+/* LDAP Distributed Procedures <draft-sermersheim-ldap-distproc> */
+/* a work in progress */
+#ifdef LDAP_DEVEL
+/* FIXME: allocate an OID arc under OpenLDAP experimental arc */
+#define LDAP_X_DISTPROC_BASE "1.3.6.1.4.1.4203.666.11.6"
+#define LDAP_EXOP_X_CHAINEDREQUEST LDAP_X_DISTPROC_BASE ".1"
+#define LDAP_FEATURE_X_CANCHAINOPS LDAP_X_DISTPROC_BASE ".2"
+#define LDAP_CONTROL_X_RETURNCONTREF LDAP_X_DISTPROC_BASE ".3"
+#define LDAP_URLEXT_X_LOCALREFOID LDAP_X_DISTPROC_BASE ".4"
+#define LDAP_URLEXT_X_REFTYPEOID LDAP_X_DISTPROC_BASE ".5"
+#define LDAP_URLEXT_X_SEARCHEDSUBTREEOID \
+ LDAP_X_DISTPROC_BASE ".6"
+#define LDAP_URLEXT_X_FAILEDNAMEOID LDAP_X_DISTPROC_BASE ".7"
+#define LDAP_URLEXT_X_LOCALREF "x-localReference"
+#define LDAP_URLEXT_X_REFTYPE "x-referenceType"
+#define LDAP_URLEXT_X_SEARCHEDSUBTREE "x-searchedSubtree"
+#define LDAP_URLEXT_X_FAILEDNAME "x-failedName"
+#endif
+
/* LDAP Features */
#define LDAP_FEATURE_ALL_OP_ATTRS "1.3.6.1.4.1.4203.1.5.1" /* RFC 3673 */
#define LDAP_FEATURE_OBJECTCLASS_ATTRS \
#define LDAP_FEATURE_ABSOLUTE_FILTERS "1.3.6.1.4.1.4203.1.5.3" /* (&) (|) */
#define LDAP_FEATURE_LANGUAGE_TAG_OPTIONS "1.3.6.1.4.1.4203.1.5.4"
#define LDAP_FEATURE_LANGUAGE_RANGE_OPTIONS "1.3.6.1.4.1.4203.1.5.5"
+#define LDAP_FEATURE_MODIFY_INCREMENT "1.3.6.1.1.14"
#ifdef LDAP_DEVEL
/* LDAP Experimental (works in progress) Features */
-#define LDAP_FEATURE_MODIFY_INCREMENT "1.3.6.1.4.1.4203.666.8.2"
#define LDAP_FEATURE_SUBORDINATE_SCOPE \
"1.3.6.1.4.1.4203.666.8.1" /* "children" */
#define LDAP_FEATURE_CHILDREN_SCOPE LDAP_FEATURE_SUBORDINATE_SCOPE
#define LDAP_SUBSTRING_FINAL ((ber_tag_t) 0x82U) /* context specific */
/* search scopes */
-#define LDAP_SCOPE_DEFAULT ((ber_int_t) -1) /* OpenLDAP extension */
#define LDAP_SCOPE_BASE ((ber_int_t) 0x0000)
#define LDAP_SCOPE_BASEOBJECT LDAP_SCOPE_BASE
#define LDAP_SCOPE_ONELEVEL ((ber_int_t) 0x0001)
#define LDAP_SCOPE_SUB LDAP_SCOPE_SUBTREE
#define LDAP_SCOPE_SUBORDINATE ((ber_int_t) 0x0003) /* OpenLDAP extension */
#define LDAP_SCOPE_CHILDREN LDAP_SCOPE_SUBORDINATE
+#define LDAP_SCOPE_DEFAULT ((ber_int_t) -1) /* OpenLDAP extension */
/* substring filter component types */
#define LDAP_SUBSTRING_INITIAL ((ber_tag_t) 0x80U) /* context specific */
#define LDAP_ALREADY_EXISTS 0x44
#define LDAP_NO_OBJECT_CLASS_MODS 0x45
#define LDAP_RESULTS_TOO_LARGE 0x46 /* CLDAP */
-#define LDAP_AFFECTS_MULTIPLE_DSAS 0x47 /* LDAPv3 */
+#define LDAP_AFFECTS_MULTIPLE_DSAS 0x47
#define LDAP_OTHER 0x50
#define LDAP_TOO_LATE 0x78
#define LDAP_CANNOT_CANCEL 0x79
+/* Assertion control (122) */
+#define LDAP_ASSERTION_FAILED 0x7A
+
/* Experimental result codes */
-#define LDAP_E_ERROR(n) LDAP_RANGE((n),0x1000,0x3FFF) /* experimental */
-#define LDAP_X_ERROR(n) LDAP_RANGE((n),0x4000,0xFFFF) /* private use */
+#define LDAP_E_ERROR(n) LDAP_RANGE((n),0x1000,0x3FFF)
-/* for the LDAP Sync operation */
-#define LDAP_SYNC_REFRESH_REQUIRED 0x4100
+/* LDAP Sync (4096) */
+#define LDAP_SYNC_REFRESH_REQUIRED 0x1000
-/* for the LDAP No-Op control */
-#define LDAP_NO_OPERATION 0x410e
-/* for the Assertion control */
-#define LDAP_ASSERTION_FAILED 0x410f
+/* Private Use result codes */
+#define LDAP_X_ERROR(n) LDAP_RANGE((n),0x4000,0xFFFF)
+
+#define LDAP_X_SYNC_REFRESH_REQUIRED 0x4100 /* defunct */
+#define LDAP_X_ASSERTION_FAILED 0x410f /* defunct */
+
+/* for the LDAP No-Op control */
+#define LDAP_X_NO_OPERATION 0x410e
/* for the Chaining Behavior control (consecutive result codes requested;
* see <draft-sermersheim-ldap-chaining> ) */
#ifdef LDAP_CONTROL_X_CHAINING_BEHAVIOR
-#define LDAP_REQUIRES_CHAINING 0x4110
-#define LDAP_CANNOT_CHAIN 0x4111
+#define LDAP_X_NO_REFERRALS_FOUND 0x4110
+#define LDAP_X_CANNOT_CHAIN 0x4111
+#endif
+
+/* for Distributed Procedures (see <draft-sermersheim-ldap-distproc>) */
+#ifdef LDAP_X_DISTPROC_BASE
+#define LDAP_X_INVALIDREFERENCE 0x4112
#endif
/* API Error Codes
#define LDAP_NOT_SUPPORTED (-12)
#define LDAP_CONTROL_NOT_FOUND (-13)
#define LDAP_NO_RESULTS_RETURNED (-14)
-#define LDAP_MORE_RESULTS_TO_RETURN (-15)
+#define LDAP_MORE_RESULTS_TO_RETURN (-15) /* Obsolete */
#define LDAP_CLIENT_LOOP (-16)
#define LDAP_REFERRAL_LIMIT_EXCEEDED (-17)
LDAP_REBIND_PROC *rebind_proc,
void *params ));
+/* V3 referral selection Function Callback Prototype */
+typedef int (LDAP_NEXTREF_PROC) LDAP_P((
+ LDAP *ld, char ***refsp, int *cntp,
+ void *params ));
+
+LDAP_F( int )
+ldap_set_nextref_proc LDAP_P((
+ LDAP *ld,
+ LDAP_NEXTREF_PROC *nextref_proc,
+ void *params ));
+
/*
* in controls.c:
*/
* in tls.c
*/
+LDAP_F( int )
+ldap_tls_inplace LDAP_P((
+ LDAP *ld ));
+
LDAP_F( int )
ldap_start_tls LDAP_P((
LDAP *ld,
* in search.c:
*/
LDAP_F( int )
+ldap_bv2escaped_filter_value LDAP_P((
+ struct berval *in,
+ struct berval *out ));
+
+LDAP_F( int )
ldap_search_ext LDAP_P((
LDAP *ld,
LDAP_CONST char *base,
int *msgidp ));
LDAP_F( int )
-ldap_cancel_s LDAP_P((
- LDAP *ld,
+ldap_cancel_s LDAP_P(( LDAP *ld,
int cancelid,
LDAPControl **sctrl,
LDAPControl **cctrl ));
+/*
+ * LDAP Turn Extended Operation <draft-zeilenga-ldap-turn-xx.txt>
+ * in turn.c
+ */
+#define LDAP_API_FEATURE_TURN 1000
+
+LDAP_F( int )
+ldap_turn LDAP_P(( LDAP *ld,
+ int mutual,
+ LDAP_CONST char* identifier,
+ LDAPControl **sctrls,
+ LDAPControl **cctrls,
+ int *msgidp ));
+
+LDAP_F( int )
+ldap_turn_s LDAP_P(( LDAP *ld,
+ int mutual,
+ LDAP_CONST char* identifier,
+ LDAPControl **sctrl,
+ LDAPControl **cctrl ));
+
/*
* LDAP Server Side Sort
* in sortctrl.c
* LDAP Transactions
* in txn.c
*/
-#ifdef LDAP_GROUPING_TRANSACTION
+#ifdef LDAP_GROUP_TRANSACTION
LDAP_F( int )
ldap_parse_txn_create LDAP_P((
LDAP *ld,