From 5ad7133202874dd09e0d30984677aedfbff33ecc Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Fri, 6 May 2005 10:21:00 +0000 Subject: [PATCH] add support for "subordinate" scope --- servers/slapd/back-meta/search.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/servers/slapd/back-meta/search.c b/servers/slapd/back-meta/search.c index 42e7cb993a..ae30ba1d9f 100644 --- a/servers/slapd/back-meta/search.c +++ b/servers/slapd/back-meta/search.c @@ -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 */ } -- 2.39.5