diff --git a/servers/slapd/back-ldap/chain.c b/servers/slapd/back-ldap/chain.c index cd226de44d..dfd3953260 100644 --- a/servers/slapd/back-ldap/chain.c +++ b/servers/slapd/back-ldap/chain.c @@ -708,7 +708,11 @@ ldap_chain_search( } else { /* RFC 4511: if scope is absent, use original */ - tmp_oq_search.rs_scope = op->ors_scope; + /* Section 4.5.3: if scope is onelevel, use base */ + if ( op->ors_scope == LDAP_SCOPE_ONELEVEL ) + tmp_oq_search.rs_scope = LDAP_SCOPE_BASE; + else + tmp_oq_search.rs_scope = op->ors_scope; } rc = LDAP_SUCCESS;