quick hack to fix ITS#1654

This commit is contained in:
Pierangelo Masarati 2002-03-26 18:21:25 +00:00
parent c72a409588
commit bbfcc82d02
2 changed files with 7 additions and 4 deletions

View file

@ -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

View 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 {