]> git.sur5r.net Git - openldap/commitdiff
Round 2 of subentry changes
authorKurt Zeilenga <kurt@openldap.org>
Wed, 9 Jan 2002 19:43:15 +0000 (19:43 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Wed, 9 Jan 2002 19:43:15 +0000 (19:43 +0000)
servers/slapd/back-bdb/search.c
servers/slapd/proto-slap.h
servers/slapd/schema_prep.c

index d444c7844c1f7ec0ed5425775da88fbc15d10cf4..2092951c5017e84fccd228031fdc3f25aa859401 100644 (file)
@@ -309,6 +309,23 @@ bdb_search(
                        goto loop_continue;
                }
 
+               if ( is_entry_subentry( e ) ) {
+                       if( scope != LDAP_SCOPE_BASE ) {
+                               if(!get_subentries_visibility( op )) {
+                                       /* only subentries are visible */
+                                       goto loop_continue;
+                               }
+                       } else if ( get_subentries( op ) &&
+                               !get_subentries_visibility( op ))
+                       {
+                               /* only subentries are visible */
+                               goto loop_continue;
+                       }
+               } else if ( get_subentries_visibility( op )) {
+                       /* only subentries are visible */
+                       goto loop_continue;
+               }
+
 #ifdef BDB_ALIASES
                if ( deref & LDAP_DEREF_SEARCHING && is_entry_alias( e ) ) {
                        Entry *matched;
index 315ed85df23745f87953b393743fb1f31894f3d7..07011b8e28c48edc8848ee5973adc8101cc0efcf 100644 (file)
@@ -800,6 +800,8 @@ LDAP_SLAPD_F (int) is_entry_objectclass LDAP_P((
        is_entry_objectclass((e), slap_schema.si_oc_alias)
 #define is_entry_referral(e)   \
        is_entry_objectclass((e), slap_schema.si_oc_referral)
+#define is_entry_subentry(e)   \
+       is_entry_objectclass((e), slap_schema.si_oc_subentry)
 
 
 /*
index ce8891b4ed7615733ebb954ba2729c86abb20726..0a288c7fc6da419b4037d9c0b20228338252456b 100644 (file)
@@ -124,7 +124,7 @@ static struct slap_schema_oc_map {
        { "alias", offsetof(struct slap_internal_schema, si_oc_alias) },
        { "referral", offsetof(struct slap_internal_schema, si_oc_referral) },
        { "LDAProotDSE", offsetof(struct slap_internal_schema, si_oc_rootdse) },
-       { "LDAPsubentry", offsetof(struct slap_internal_schema, si_oc_subentry) },
+       { "subentry", offsetof(struct slap_internal_schema, si_oc_subentry) },
        { "subschema", offsetof(struct slap_internal_schema, si_oc_subschema) },
        { NULL, 0 }
 };