]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/overlays/dynlist.c
ITS#3682, dup entry and free the DB's copy before sending it
[openldap] / servers / slapd / overlays / dynlist.c
index c5cc511d5154a20336df678d17300045c9de6142..c417292000929294e4b646338a5a265ea5e761b3 100644 (file)
@@ -211,7 +211,7 @@ dynlist_sc_update( Operation *op, SlapReply *rs )
 
                /* test access to attribute */
                for ( i = 0; !BER_BVISNULL( &a->a_vals[i] ); i++ )
-                       /* jst count */ ;
+                       /* just count */ ;
 
                vals = op->o_tmpalloc( ( i + 1 ) * sizeof( struct berval ), op->o_tmpmemctx );
                if ( a->a_nvals != a->a_vals ) {
@@ -275,7 +275,7 @@ dynlist_send_entry( Operation *op, SlapReply *rs )
        Attribute       *a;
        slap_callback   cb;
        Operation       o = *op;
-       SlapReply       r = *rs;
+       SlapReply       r = { REP_SEARCH };
        struct berval   *url;
        Entry           *e;
        int             e_flags;
@@ -300,6 +300,7 @@ dynlist_send_entry( Operation *op, SlapReply *rs )
        cb.sc_next = NULL;
 
        o.o_callback = &cb;
+       o.ors_deref = LDAP_DEREF_NEVER;
        o.ors_limit = NULL;
        o.ors_tlimit = SLAP_NO_LIMIT;
        o.ors_slimit = SLAP_NO_LIMIT;
@@ -516,6 +517,7 @@ dynlist_compare( Operation *op, SlapReply *rs )
        }
 
        o.ors_scope = LDAP_SCOPE_BASE;
+       o.ors_deref = LDAP_DEREF_NEVER;
        an[0].an_name = op->orc_ava->aa_desc->ad_cname;
        an[0].an_desc = op->orc_ava->aa_desc;
        BER_BVZERO( &an[1].an_name );
@@ -728,7 +730,7 @@ dynlist_db_destroy(
 static slap_overinst dynlist = { { NULL } };
 
 int
-dynlist_over_init(void)
+dynlist_init(void)
 {
        dynlist.on_bi.bi_type = "dynlist";
        dynlist.on_bi.bi_db_init = dynlist_db_init;
@@ -745,7 +747,7 @@ dynlist_over_init(void)
 int
 init_module( int argc, char *argv[] )
 {
-       return dynlist_over_init();
+       return dynlist_init();
 }
 #endif