]> git.sur5r.net Git - openldap/commitdiff
exactly one ID can match (ITS#5791; further fix previous commit)
authorPierangelo Masarati <ando@openldap.org>
Sat, 8 Nov 2008 10:39:45 +0000 (10:39 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sat, 8 Nov 2008 10:39:45 +0000 (10:39 +0000)
servers/slapd/back-bdb/filterindex.c

index 31fd91b342ea411c1a79f4330ea8d69f748e2f8b..49900c881d5e5ed0fc9cc30be59a434b073df8ca 100644 (file)
@@ -720,10 +720,14 @@ equality_candidates(
        if ( ava->aa_desc == slap_schema.si_ad_entryDN ) {
                EntryInfo *ei = NULL;
                rc = bdb_cache_find_ndn( op, rtxn, &ava->aa_value, &ei );
-               if ( rc == LDAP_SUCCESS )
-                       bdb_idl_insert( ids, ei->bei_id );
-               if ( ei )
+               if ( rc == LDAP_SUCCESS ) {
+                       /* exactly one ID can match */
+                       ids[0] = 1;
+                       ids[1] = ei->bei_id;
+               }
+               if ( ei ) {
                        bdb_cache_entryinfo_unlock( ei );
+               }
                return rc;
        }