]> git.sur5r.net Git - openldap/commitdiff
Removed control old kludge code
authorKurt Zeilenga <kurt@openldap.org>
Thu, 27 Jan 2005 23:06:57 +0000 (23:06 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Thu, 27 Jan 2005 23:06:57 +0000 (23:06 +0000)
servers/slapd/backend.c
servers/slapd/controls.c

index 2a7c3388bf976d3dd90e606a7977eb9ef59ae75a..084a82568855d6c7b41a0eec3bbe0e25aa20358b 100644 (file)
@@ -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
index 075cff8c1b61b328d12264df43d99b5d104bee13..c201273eb579f44430bcba861f4e04fab2ad8d58 100644 (file)
@@ -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;