]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/matchedValues.c
Added ppolicy_hide_lockout keyword
[openldap] / servers / slapd / matchedValues.c
index 22a0ad17eeac3a5ac5b4dd1f511d0b64df7fbc1d..ef7b39638d06defa1b4aca7908e24a34cd5edece 100644 (file)
@@ -1,13 +1,18 @@
 /* $OpenLDAP$ */
-/* 
- * Copyright 1999-2003 The OpenLDAP Foundation.
+/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
+ *
+ * Copyright 1999-2004 The OpenLDAP Foundation.
  * All rights reserved.
  *
- * Redistribution and use in source and binary forms are permitted only
- * as authorized by the OpenLDAP Public License.  A copy of this
- * license is available at http://www.OpenLDAP.org/license.html or
- * in file LICENSE in the top-level directory of the distribution.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted only as authorized by the OpenLDAP
+ * Public License.
+ *
+ * A copy of this license is available in the file LICENSE in the
+ * top-level directory of the distribution or, alternatively, at
+ * <http://www.OpenLDAP.org/license.html>.
  */
+
 #include "portable.h"
 
 #include <stdio.h>
@@ -17,8 +22,6 @@
 
 #include "slap.h"
 
-#include "../../libraries/liblber/lber-int.h"
-
 static int
 test_mra_vrFilter(
        Operation       *op,
@@ -69,7 +72,7 @@ filter_matched_values(
        Debug( LDAP_DEBUG_FILTER, "=> filter_matched_values\n", 0, 0, 0 );
 #endif
 
-       for ( vrf = op->vrFilter; vrf != NULL; vrf = vrf->vrf_next ) {
+       for ( vrf = op->o_vrFilter; vrf != NULL; vrf = vrf->vrf_next ) {
                switch ( vrf->vrf_choice ) {
                case SLAPD_FILTER_COMPUTED:
 #ifdef NEW_LOGGING
@@ -223,11 +226,7 @@ test_ava_vrFilter(
 
                }
 
-#ifdef SLAP_NVALUES
                bv = a->a_nvals;
-#else
-               bv = a->a_vals;
-#endif
                for ( j=0; bv->bv_val != NULL; bv++, j++ ) {
                        int ret;
                        int rc;
@@ -310,11 +309,7 @@ test_substrings_vrFilter(
                        continue;
                }
 
-#ifdef SLAP_NVALUES
                bv = a->a_nvals;
-#else
-               bv = a->a_vals;
-#endif
                for ( j = 0; bv->bv_val != NULL; bv++, j++ ) {
                        int ret;
                        int rc;
@@ -365,26 +360,14 @@ test_mra_vrFilter(
                                continue;
                        }
 
-#ifdef SLAP_NVALUES
                        rc = asserted_value_validate_normalize( a->a_desc, mra->ma_rule,
                                SLAP_MR_EXT|SLAP_MR_VALUE_OF_ASSERTION_SYNTAX,
-                               &mra->ma_value, &value, &text );
-#else
-                       /* normalize for equality */
-                       rc = value_validate_normalize( a->a_desc, 
-                               SLAP_MR_EQUALITY,
-                               &mra->ma_value, &value,
-                               &text );
-#endif
+                               &mra->ma_value, &value, &text, op->o_tmpmemctx );
 
                        if( rc != LDAP_SUCCESS ) continue;
                }
 
-#ifdef SLAP_NVALUES
                bv = a->a_nvals;
-#else
-               bv = a->a_vals;
-#endif
                for ( j = 0; bv->bv_val != NULL; bv++, j++ ) {
                        int ret;
                        int rc;