]> git.sur5r.net Git - openldap/commitdiff
quick hack to fix ITS#1654
authorPierangelo Masarati <ando@openldap.org>
Tue, 26 Mar 2002 18:21:25 +0000 (18:21 +0000)
committerPierangelo Masarati <ando@openldap.org>
Tue, 26 Mar 2002 18:21:25 +0000 (18:21 +0000)
CHANGES
servers/slapd/back-ldbm/search.c

diff --git a/CHANGES b/CHANGES
index 1307c92fa4c12e9e27c787a88729197e58b294e1..0b203ebb77d9917db0cbedebb9a97e1e88547cde 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -3,6 +3,7 @@ OpenLDAP 2.0 Change Log
 OpenLDAP 2.0.24 Engineering
        Fixed slapd acl group/dnaddr bug (ITS#1607)
        Fixed ber_bvstrdup() empty string ("") bug (ITS#1662)
+       Fixed back-ldbm dn normalization bug in onelevel searches (ITS#1654)
        Documentation
                Updated release documents
 
index 9a7a0a16f275f036c78f1129651af2dceac3c721..82ff79297a59a29d7b036a1506752a66b9ce0d12 100644 (file)
@@ -283,10 +283,12 @@ searchit:
                        /* check scope */
                        if ( !scopeok && scope == LDAP_SCOPE_ONELEVEL ) {
                                if ( (dn = dn_parent( be, e->e_ndn )) != NULL ) {
-                                       (void) dn_normalize( dn );
-                                       scopeok = (dn == realbase)
-                                               ? 1
-                                               : (strcmp( dn, realbase ) ? 0 : 1 );
+                                       char *newdn = dn;
+                                       while ( ASCII_SPACE( newdn[ 0 ] ) ) {
+                                               newdn++;
+                                       }
+                                       scopeok = ( strcmp( newdn, realbase ) 
+                                                       ? 0 : 1 );
                                        free( dn );
 
                                } else {