]> git.sur5r.net Git - openldap/commitdiff
ITS#6699 search references must turn onelevel scope to base
authorHoward Chu <hyc@openldap.org>
Fri, 12 Nov 2010 04:35:49 +0000 (04:35 +0000)
committerHoward Chu <hyc@openldap.org>
Fri, 12 Nov 2010 04:35:49 +0000 (04:35 +0000)
servers/slapd/back-ldap/chain.c

index cd226de44db09ab5d70a46f04d5848f690cd8933..dfd395326060eba61022476bd8eec56686f2968e 100644 (file)
@@ -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;