mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-04-18 15:20:35 +08:00
Macro cleanup
This commit is contained in:
parent
f1c98ef3c0
commit
8c8ea049cb
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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 <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"
|
||||
|
@ -13,8 +13,8 @@
|
||||
* <http://www.OpenLDAP.org/license.html>.
|
||||
*/
|
||||
/* 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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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 }
|
||||
};
|
||||
|
||||
|
@ -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,
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user