]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#9929 more for prev commit
authorHoward Chu <hyc@openldap.org>
Sun, 9 Oct 2022 15:41:04 +0000 (16:41 +0100)
committerHoward Chu <hyc@openldap.org>
Sun, 9 Oct 2022 15:41:04 +0000 (16:41 +0100)
Don't prevent returning dynamic lists if dynamic groups were part of search.

servers/slapd/overlays/dynlist.c

index f7979b21aaf757871a39bd18095aecfd954c29fc..3427710eea58c0e4ebebdd79757932af93c1c2d0 100644 (file)
@@ -1548,7 +1548,8 @@ dynlist_search2resp( Operation *op, SlapReply *rs )
 
        if ( rs->sr_type == REP_SEARCH && rs->sr_entry != NULL ) {
                rc = SLAP_CB_CONTINUE;
-               /* See if this is one of our dynamic entries */
+               /* See if this is one of our dynamic groups */
+               dyn = NULL;
                if ( ds->ds_names ) {
                        dyn = ldap_tavl_find( ds->ds_names, &rs->sr_entry->e_nname, dynlist_avl_cmp );
                        if ( dyn ) {
@@ -1557,7 +1558,9 @@ dynlist_search2resp( Operation *op, SlapReply *rs )
                                        rc = dynlist_prepare_entry( op, rs, dyn->dy_dli, dyn );
                        } else if ( ds->ds_want )
                                dynlist_add_memberOf( op, rs, ds );
-               } else {
+               }
+               /* Then check for dynamic lists */
+               if ( dyn == NULL ) {
                        dynlist_info_t  *dli;
                        Attribute *a = attr_find ( rs->sr_entry->e_attrs, slap_schema.si_ad_objectClass );
                        if ( a ) {