From 1ff692274aa62a9e049a39cdff1412dc6649d8a9 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 27 Jan 2005 23:06:57 +0000 Subject: [PATCH] Removed control old kludge code --- servers/slapd/backend.c | 12 ++---------- servers/slapd/controls.c | 18 ------------------ 2 files changed, 2 insertions(+), 28 deletions(-) diff --git a/servers/slapd/backend.c b/servers/slapd/backend.c index 2a7c3388bf..084a825688 100644 --- a/servers/slapd/backend.c +++ b/servers/slapd/backend.c @@ -859,17 +859,9 @@ backend_check_controls( assert( 0 ); } - } else 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 && -#else - !slap_global_control( op, (*ctrls)->ldctl_oid ) && -#endif + } else if ( !slap_global_control( op, (*ctrls)->ldctl_oid ) && !ldap_charray_inlist( op->o_bd->be_controls, - (*ctrls)->ldctl_oid ) ) + (*ctrls)->ldctl_oid ) ) { /* Per RFC 2251 (and LDAPBIS discussions), if the control * is recognized and appropriate for the operation (which diff --git a/servers/slapd/controls.c b/servers/slapd/controls.c index 075cff8c1b..c201273eb5 100644 --- a/servers/slapd/controls.c +++ b/servers/slapd/controls.c @@ -640,24 +640,6 @@ int get_ctrls( goto return_results; } -#ifdef SLAP_CONTROL_AVAILABILITY_KLUDGE - /* backend_check_controls() kludge */ - if ( sc->sc_mask & SLAP_CTRL_GLOBAL ) { - /* KLUDGE: disable backend_control() check */ - c->ldctl_iscritical = 0; - - } else if ( tagmask == SLAP_CTRL_SEARCH && - sc->sc_mask & SLAP_CTRL_GLOBAL_SEARCH ) - { - /* KLUDGE: disable backend_control() check */ - c->ldctl_iscritical = 0; - - } else { - /* KLUDGE: enable backend_control() check */ - c->ldctl_iscritical = 1; - } -#endif - } else if( c->ldctl_iscritical ) { /* unavailable CRITICAL control */ rs->sr_err = LDAP_UNAVAILABLE_CRITICAL_EXTENSION;