if( ctrls ) {
for( ; *ctrls != NULL ; ctrls++ ) {
- /* KLUDGE: ldctl_iscritical munged by controls.c:get_ctrls()
- * to ensure this check is enabled/disabled appropriately.
- */
- if( (*ctrls)->ldctl_iscritical && !ldap_charray_inlist(
- op->o_bd->be_controls, (*ctrls)->ldctl_oid ) )
+ if(
+#ifdef SLAP_CONTROL_AVAILABILITY_KLUDGE
+ /* KLUDGE: ldctl_iscritical munged by controls.c:get_ctrls()
+ * to ensure this check is enabled/disabled appropriately.
+ */
+ (*ctrls)->ldctl_iscritical &&
+#endif
+ !ldap_charray_inlist( op->o_bd->be_controls,
+ (*ctrls)->ldctl_oid ) )
{
/* Per RFC 2251 (and LDAPBIS discussions), if the control
* is recognized and appropriate for the operation (which
goto return_results;
}
+#ifdef SLAP_CONTROL_AVAILABILITY_KLUDGE
if ( sc->sc_mask & SLAP_CTRL_FRONTEND ) {
/* KLUDGE: disable backend_control() check */
c->ldctl_iscritical = 0;
/* KLUDGE: enable backend_control() check */
c->ldctl_iscritical = 1;
}
+#endif
} else if( c->ldctl_iscritical ) {
/* unavailable CRITICAL control */
int code;
const char *err;
- if( def->mrd_usage == SLAP_MR_NONE &&
- def->mrd_compat_syntaxes == NULL )
- {
+ if( def->mrd_usage == SLAP_MR_NONE && def->mrd_compat_syntaxes == NULL ) {
Debug( LDAP_DEBUG_ANY, "register_matching_rule: not usable %s\n",
def->mrd_desc, 0, 0 );
if( def->mrd_associated != NULL ) {
amr = mr_find( def->mrd_associated );
-
if( amr == NULL ) {
- Debug( LDAP_DEBUG_ANY, "register_matching_rule: could not locate "
- "associated matching rule %s for %s\n",
+ Debug( LDAP_DEBUG_ANY, "register_matching_rule: "
+ "could not locate associated matching rule %s for %s\n",
def->mrd_associated, def->mrd_desc, 0 );
return -1;
if (( def->mrd_usage & SLAP_MR_EQUALITY ) &&
(( def->mrd_usage & SLAP_MR_SUBTYPE_MASK ) != SLAP_MR_NONE ))
{
- Debug( LDAP_DEBUG_ANY,
- "register_matching_rule: inappropriate (approx) association "
- "%s for %s\n",
+ Debug( LDAP_DEBUG_ANY, "register_matching_rule: "
+ "inappropriate (approx) association %s for %s\n",
def->mrd_associated, def->mrd_desc, 0 );
return -1;
}
} else if (!( amr->smr_usage & SLAP_MR_EQUALITY )) {
- Debug( LDAP_DEBUG_ANY,
- "register_matching_rule: inappropriate (equalilty) association "
- "%s for %s\n",
+ Debug( LDAP_DEBUG_ANY, "register_matching_rule: "
+ "inappropriate (equalilty) association %s for %s\n",
def->mrd_associated, def->mrd_desc, 0 );
return -1;
}