From 1e18b823a0711da358d0e758b68762c1cc8f461e Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Fri, 12 Nov 2010 04:35:49 +0000 Subject: [PATCH] ITS#6699 search references must turn onelevel scope to base --- servers/slapd/back-ldap/chain.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; -- 2.39.5