mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
Fix referral scope logic
This commit is contained in:
parent
f2f4b7b73b
commit
d8292a62da
@ -977,11 +977,17 @@ re_encode_request( LDAP *ld,
|
|||||||
/* search requests need to be re-scope-ed */
|
/* search requests need to be re-scope-ed */
|
||||||
rc = ber_scanf( &tmpber, "{ae" /*"}"*/, &orig_dn, &scope );
|
rc = ber_scanf( &tmpber, "{ae" /*"}"*/, &orig_dn, &scope );
|
||||||
|
|
||||||
if( srv->lud_scope == LDAP_SCOPE_DEFAULT &&
|
if( srv->lud_scope != LDAP_SCOPE_DEFAULT ) {
|
||||||
scope != LDAP_SCOPE_SUBTREE )
|
/* use the scope provided in reference */
|
||||||
{
|
scope = srv->lud_scope;
|
||||||
|
|
||||||
|
} else if ( scope != LDAP_SCOPE_SUBTREE ) {
|
||||||
|
/* use scope implied by previous operation */
|
||||||
|
/* base -> base */
|
||||||
|
/* one -> base */
|
||||||
|
/* subtree -> subtree */
|
||||||
scope = LDAP_SCOPE_BASE;
|
scope = LDAP_SCOPE_BASE;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
rc = ber_scanf( &tmpber, "{a" /*}*/, &orig_dn );
|
rc = ber_scanf( &tmpber, "{a" /*}*/, &orig_dn );
|
||||||
|
Loading…
Reference in New Issue
Block a user