]> git.sur5r.net Git - openldap/commitdiff
TS#7303 tweak
authorHoward Chu <hyc@openldap.org>
Tue, 12 Jun 2012 23:23:54 +0000 (16:23 -0700)
committerHoward Chu <hyc@openldap.org>
Tue, 12 Jun 2012 23:23:54 +0000 (16:23 -0700)
servers/slapd/back-bdb/search.c

index a822564c558b4ecda796223fab55497e2e4537a7..d30d7b9f2e7b5ba1095bb67ddf756fb838ae8788 100644 (file)
@@ -1253,7 +1253,7 @@ static int search_candidates(
 
        if( op->ors_deref & LDAP_DEREF_SEARCHING ) {
                rc = search_aliases( op, rs, e, txn, ids, scopes, stack );
-               if ( BDB_IDL_IS_ZERO( ids ))
+               if ( BDB_IDL_IS_ZERO( ids ) && rc == LDAP_SUCCESS )
                        rc = bdb_dn2idl( op, txn, &e->e_nname, BEI(e), ids, stack );
        } else {
                rc = bdb_dn2idl( op, txn, &e->e_nname, BEI(e), ids, stack );