]> git.sur5r.net Git - openldap/commitdiff
add support for "subordinate" scope
authorPierangelo Masarati <ando@openldap.org>
Fri, 6 May 2005 10:21:00 +0000 (10:21 +0000)
committerPierangelo Masarati <ando@openldap.org>
Fri, 6 May 2005 10:21:00 +0000 (10:21 +0000)
servers/slapd/back-meta/search.c

index 42e7cb993a3d6b4a489dcaba34a8afa67e9d83ef..ae30ba1d9f5c3c7670dbea7d12d22dbf77e02817 100644 (file)
@@ -106,6 +106,9 @@ meta_back_search_start(
                        }
                        break;
 
+#ifdef LDAP_SCOPE_SUBORDINATE
+               case LDAP_SCOPE_SUBORDINATE:
+#endif /* LDAP_SCOPE_SUBORDINATE */
                case LDAP_SCOPE_ONELEVEL:
                {
                        struct berval   rdn = mi->mi_targets[ candidate ].mt_nsuffix;
@@ -119,7 +122,14 @@ meta_back_search_start(
                                 * base, and make scope "base"
                                 */
                                realbase = mi->mi_targets[ candidate ].mt_nsuffix;
-                               realscope = LDAP_SCOPE_BASE;
+#ifdef LDAP_SCOPE_SUBORDINATE
+                               if ( op->ors_scope == LDAP_SCOPE_SUBORDINATE ) {
+                                       realscope = LDAP_SCOPE_SUBTREE;
+                               } else
+#endif /* LDAP_SCOPE_SUBORDINATE */
+                               {
+                                       realscope = LDAP_SCOPE_BASE;
+                               }
                                break;
                        } /* else continue with the next case */
                }