]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#9779 slapo-dynlist: fix static group filter with multiple members
authorHoward Chu <hyc@openldap.org>
Mon, 17 Jan 2022 16:32:28 +0000 (16:32 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Tue, 18 Jan 2022 23:06:21 +0000 (23:06 +0000)
servers/slapd/overlays/dynlist.c

index ac987443926873e992181e2032d301c53bcd7488..b04f65c0c6eaacd7fb04afead9517b83f6919f69 100644 (file)
@@ -1208,20 +1208,13 @@ dynlist_filter_stgroup( Operation *op, Filter *n, Attribute *a )
        Filter *dnf, *orf = NULL;
        int i;
 
-       if ( a->a_numvals == 1 && n->f_choice == SLAPD_FILTER_COMPUTED ) {
+       if ( a->a_numvals == 1 ) {
                dnf = n;
-               dnf->f_next = NULL;
        } else {
                orf = n;
-               if ( n->f_choice != LDAP_FILTER_OR ) {
-                       dnf = op->o_tmpalloc( sizeof(Filter), op->o_tmpmemctx );
-                       *dnf = *n;
-                       orf->f_choice = LDAP_FILTER_OR;
-                       orf->f_next = NULL;
-                       orf->f_list = dnf;
-               }
+               orf->f_choice = LDAP_FILTER_OR;
                dnf = op->o_tmpalloc( sizeof(Filter), op->o_tmpmemctx );
-               dnf->f_next = orf->f_list;
+               dnf->f_next = NULL;
                orf->f_list = dnf;
        }