mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
ITS#7303 fix unneeded alias lookups
This commit is contained in:
parent
c73ec15022
commit
7c28420618
@ -184,7 +184,7 @@ static int search_aliases(
|
|||||||
BDB_IDL_ZERO( aliases );
|
BDB_IDL_ZERO( aliases );
|
||||||
rs->sr_err = bdb_filter_candidates( op, txn, &af, aliases,
|
rs->sr_err = bdb_filter_candidates( op, txn, &af, aliases,
|
||||||
curscop, visited );
|
curscop, visited );
|
||||||
if (rs->sr_err != LDAP_SUCCESS) {
|
if (rs->sr_err != LDAP_SUCCESS || BDB_IDL_IS_ZERO( aliases )) {
|
||||||
return rs->sr_err;
|
return rs->sr_err;
|
||||||
}
|
}
|
||||||
oldsubs[0] = 1;
|
oldsubs[0] = 1;
|
||||||
@ -1253,6 +1253,8 @@ static int search_candidates(
|
|||||||
|
|
||||||
if( op->ors_deref & LDAP_DEREF_SEARCHING ) {
|
if( op->ors_deref & LDAP_DEREF_SEARCHING ) {
|
||||||
rc = search_aliases( op, rs, e, txn, ids, scopes, stack );
|
rc = search_aliases( op, rs, e, txn, ids, scopes, stack );
|
||||||
|
if ( BDB_IDL_IS_ZERO( ids ))
|
||||||
|
rc = bdb_dn2idl( op, txn, &e->e_nname, BEI(e), ids, stack );
|
||||||
} else {
|
} else {
|
||||||
rc = bdb_dn2idl( op, txn, &e->e_nname, BEI(e), ids, stack );
|
rc = bdb_dn2idl( op, txn, &e->e_nname, BEI(e), ids, stack );
|
||||||
}
|
}
|
||||||
|
@ -160,7 +160,7 @@ static int search_aliases(
|
|||||||
MDB_IDL_ZERO( aliases );
|
MDB_IDL_ZERO( aliases );
|
||||||
rs->sr_err = mdb_filter_candidates( op, txn, &af, aliases,
|
rs->sr_err = mdb_filter_candidates( op, txn, &af, aliases,
|
||||||
curscop, visited );
|
curscop, visited );
|
||||||
if (rs->sr_err != LDAP_SUCCESS) {
|
if (rs->sr_err != LDAP_SUCCESS || MDB_IDL_IS_ZERO( aliases )) {
|
||||||
return rs->sr_err;
|
return rs->sr_err;
|
||||||
}
|
}
|
||||||
oldsubs[0] = 1;
|
oldsubs[0] = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user