]> git.sur5r.net Git - openldap/commitdiff
ITS#5486, fix rev 1.219. Must never use s_op directly, must always use
authorHoward Chu <hyc@openldap.org>
Tue, 6 May 2008 03:03:47 +0000 (03:03 +0000)
committerHoward Chu <hyc@openldap.org>
Tue, 6 May 2008 03:03:47 +0000 (03:03 +0000)
a copy.

servers/slapd/overlays/syncprov.c

index 0551f1e93380a1f533e548413927123da68cf1ec..93bb5ae08d2e4130891c47827b10f7caaf4219ad 100644 (file)
@@ -1176,6 +1176,7 @@ syncprov_matchops( Operation *op, opcookie *opc, int saveit )
        for (ss = si->si_ops, sprev = (syncops *)&si->si_ops; ss;
                sprev = ss, ss=snext)
        {
+               Operation op2;
                syncmatches *sm;
                int found = 0;
 
@@ -1223,8 +1224,11 @@ syncprov_matchops( Operation *op, opcookie *opc, int saveit )
                        }
                }
 
+               if ( fc.fscope )
+                       op2 = *ss->s_op;
+
                /* check if current o_req_dn is in scope and matches filter */
-               if ( fc.fscope && test_filter( ss->s_op, e, ss->s_op->ors_filter ) ==
+               if ( fc.fscope && test_filter( &op2, e, ss->s_op->ors_filter ) ==
                        LDAP_COMPARE_TRUE ) {
                        if ( saveit ) {
                                sm = op->o_tmpalloc( sizeof(syncmatches), op->o_tmpmemctx );