--- servers/slapd/back-ldap/chain.c 2011/01/03 20:19:08 1.52.2.14 +++ servers/slapd/back-ldap/chain.c 2011/01/03 22:22:12 1.52.2.15 @@ -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;