From 8c8ea049cba497d0dbccefcda01af4dc5c7138f7 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 16 Feb 2006 05:01:29 +0000 Subject: [PATCH] Macro cleanup --- clients/tools/ldapsearch.c | 4 ++-- include/ldap.h | 6 +++--- libraries/libldap/cancel.c | 12 ++++++------ libraries/libldap/whoami.c | 2 +- servers/slapd/back-monitor/database.c | 4 ++-- servers/slapd/controls.c | 9 +-------- servers/slapd/extended.c | 4 ++-- 7 files changed, 17 insertions(+), 24 deletions(-) diff --git a/clients/tools/ldapsearch.c b/clients/tools/ldapsearch.c index 4e4f757f11..7eda37d8d9 100644 --- a/clients/tools/ldapsearch.c +++ b/clients/tools/ldapsearch.c @@ -1178,8 +1178,8 @@ static int dosearch( msgidber = ber_alloc_t(LBER_USE_DER); ber_printf(msgidber, "{i}", msgid); ber_flatten(msgidber, &msgidvalp); - ldap_extended_operation(ld, LDAP_EXOP_X_CANCEL, - msgidvalp, NULL, NULL, &cancel_msgid); + ldap_extended_operation(ld, LDAP_EXOP_CANCEL, + msgidvalp, NULL, NULL, &cancel_msgid); nresponses_psearch = -1; } } diff --git a/include/ldap.h b/include/ldap.h index 55e9af68fd..0d65ea29e4 100644 --- a/include/ldap.h +++ b/include/ldap.h @@ -209,7 +209,6 @@ typedef struct ldapcontrol { #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.3344810.2.3"/* RFC 3876 */ -#define LDAP_CONTROL_X_VALUESRETURNFILTER "1.2.826.0.1.334810.2.3"/* bad OID */ #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 */ @@ -332,16 +331,17 @@ typedef struct ldapcontrol { #define LDAP_TAG_EXOP_REFRESH_REQ_TTL ((ber_tag_t) 0x81U) #define LDAP_TAG_EXOP_REFRESH_RES_TTL ((ber_tag_t) 0x80U) -/* 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 +/* various works in progress */ +#ifdef LDAP_DEVEL #define LDAP_EXOP_X_TURN "1.3.6.1.4.1.4203.666.6.4" +#endif /* LDAP Distributed Procedures */ /* 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" diff --git a/libraries/libldap/cancel.c b/libraries/libldap/cancel.c index 32ebfcfa16..ef77a2d46f 100644 --- a/libraries/libldap/cancel.c +++ b/libraries/libldap/cancel.c @@ -13,8 +13,8 @@ * . */ /* ACKNOWLEDGEMENTS: - * This program was orignally developed by Kurt D. Zeilenga for inclusion in - * OpenLDAP Software. + * This program was orignally developed by Kurt D. Zeilenga for inclusion + * in OpenLDAP Software. */ /* @@ -48,8 +48,8 @@ ldap_cancel( cancelidber = ber_alloc_t( LBER_USE_DER ); ber_printf( cancelidber, "{i}", cancelid ); ber_flatten( cancelidber, &cancelidvalp ); - rc = ldap_extended_operation( ld, LDAP_EXOP_X_CANCEL, - cancelidvalp, sctrls, cctrls, msgidp ); + rc = ldap_extended_operation( ld, LDAP_EXOP_CANCEL, + cancelidvalp, sctrls, cctrls, msgidp ); ber_free( cancelidber, 1 ); return rc; } @@ -68,8 +68,8 @@ ldap_cancel_s( cancelidber = ber_alloc_t( LBER_USE_DER ); ber_printf( cancelidber, "{i}", cancelid ); ber_flatten( cancelidber, &cancelidvalp ); - rc = ldap_extended_operation_s( ld, LDAP_EXOP_X_CANCEL, - cancelidvalp, sctrls, cctrls, NULL, NULL ); + rc = ldap_extended_operation_s( ld, LDAP_EXOP_CANCEL, + cancelidvalp, sctrls, cctrls, NULL, NULL ); ber_free( cancelidber, 1 ); return rc; } diff --git a/libraries/libldap/whoami.c b/libraries/libldap/whoami.c index 1b5f286242..ec96523d32 100644 --- a/libraries/libldap/whoami.c +++ b/libraries/libldap/whoami.c @@ -68,7 +68,7 @@ ldap_whoami( LDAP *ld, assert( LDAP_VALID( ld ) ); assert( msgidp != NULL ); - rc = ldap_extended_operation( ld, LDAP_EXOP_X_WHO_AM_I, + rc = ldap_extended_operation( ld, LDAP_EXOP_WHO_AM_I, NULL, sctrls, cctrls, msgidp ); return rc; diff --git a/servers/slapd/back-monitor/database.c b/servers/slapd/back-monitor/database.c index 36296f18fe..e50b53ff8a 100644 --- a/servers/slapd/back-monitor/database.c +++ b/servers/slapd/back-monitor/database.c @@ -79,8 +79,8 @@ static struct restricted_ops_t { }, restricted_exops[] = { { BER_BVC( LDAP_EXOP_START_TLS ), SLAP_RESTRICT_EXOP_START_TLS }, { BER_BVC( LDAP_EXOP_MODIFY_PASSWD ), SLAP_RESTRICT_EXOP_MODIFY_PASSWD }, - { BER_BVC( LDAP_EXOP_X_WHO_AM_I ), SLAP_RESTRICT_EXOP_WHOAMI }, - { BER_BVC( LDAP_EXOP_X_CANCEL ), SLAP_RESTRICT_EXOP_CANCEL }, + { BER_BVC( LDAP_EXOP_WHO_AM_I ), SLAP_RESTRICT_EXOP_WHOAMI }, + { BER_BVC( LDAP_EXOP_CANCEL ), SLAP_RESTRICT_EXOP_CANCEL }, { BER_BVNULL, 0 } }; diff --git a/servers/slapd/controls.c b/servers/slapd/controls.c index 050f0ac7e1..a0ed023722 100644 --- a/servers/slapd/controls.c +++ b/servers/slapd/controls.c @@ -96,7 +96,7 @@ static int num_known_controls = 1; static char *proxy_authz_extops[] = { LDAP_EXOP_MODIFY_PASSWD, - LDAP_EXOP_X_WHO_AM_I, + LDAP_EXOP_WHO_AM_I, LDAP_EXOP_REFRESH, NULL }; @@ -128,13 +128,6 @@ static struct slap_control control_defs[] = { SLAP_CTRL_GLOBAL|SLAP_CTRL_SEARCH, NULL, NULL, parseValuesReturnFilter, LDAP_SLIST_ENTRY_INITIALIZER(next) }, -#ifdef LDAP_CONTROL_X_VALUESRETURNFILTER - { LDAP_CONTROL_X_VALUESRETURNFILTER /* bad OID */, - (int)offsetof(struct slap_control_ids, sc_valuesReturnFilter), - SLAP_CTRL_GLOBAL|SLAP_CTRL_SEARCH|SLAP_CTRL_HIDE, - NULL, NULL, - parseValuesReturnFilter, LDAP_SLIST_ENTRY_INITIALIZER(next) }, -#endif { LDAP_CONTROL_PAGEDRESULTS, (int)offsetof(struct slap_control_ids, sc_pagedResults), SLAP_CTRL_SEARCH, diff --git a/servers/slapd/extended.c b/servers/slapd/extended.c index 9d6aeb9505..82a1cecf9b 100644 --- a/servers/slapd/extended.c +++ b/servers/slapd/extended.c @@ -56,8 +56,8 @@ static SLAP_EXTOP_MAIN_FN whoami_extop; * just a way to get built-in extops onto the extop list without * having a separate init routine for each built-in extop. */ -const struct berval slap_EXOP_CANCEL = BER_BVC(LDAP_EXOP_X_CANCEL); -const struct berval slap_EXOP_WHOAMI = BER_BVC(LDAP_EXOP_X_WHO_AM_I); +const struct berval slap_EXOP_CANCEL = BER_BVC(LDAP_EXOP_CANCEL); +const struct berval slap_EXOP_WHOAMI = BER_BVC(LDAP_EXOP_WHO_AM_I); const struct berval slap_EXOP_MODIFY_PASSWD = BER_BVC(LDAP_EXOP_MODIFY_PASSWD); const struct berval slap_EXOP_START_TLS = BER_BVC(LDAP_EXOP_START_TLS); -- 2.39.5