Skip to content
Snippets Groups Projects
Commit d8292a62 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Fix referral scope logic

parent f2f4b7b7
No related branches found
No related tags found
No related merge requests found
......@@ -977,11 +977,17 @@ re_encode_request( LDAP *ld,
/* search requests need to be re-scope-ed */
rc = ber_scanf( &tmpber, "{ae" /*"}"*/, &orig_dn, &scope );
if( srv->lud_scope == LDAP_SCOPE_DEFAULT &&
scope != LDAP_SCOPE_SUBTREE )
{
if( srv->lud_scope != LDAP_SCOPE_DEFAULT ) {
/* 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;
}
}
} else {
rc = ber_scanf( &tmpber, "{a" /*}*/, &orig_dn );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment