]> git.sur5r.net Git - openldap/commitdiff
ITS#8435 Fix uninited slap_callback.sc_writewait
authorHallvard Furuseth <hallvard@openldap.org>
Sun, 12 Jun 2016 06:30:58 +0000 (08:30 +0200)
committerHallvard Furuseth <hallvard@openldap.org>
Sun, 12 Jun 2016 06:30:58 +0000 (08:30 +0200)
contrib/slapd-modules/authzid/authzid.c
servers/slapd/backover.c
servers/slapd/overlays/constraint.c
servers/slapd/overlays/dds.c
servers/slapd/overlays/dynlist.c
servers/slapd/overlays/memberof.c
servers/slapd/overlays/pcache.c
servers/slapd/overlays/sssvlv.c
servers/slapd/overlays/syncprov.c
servers/slapd/slapi/slapi_overlay.c
servers/slapd/syncrepl.c

index 03aab97db77db8dad67a82ea2d2bd120f72a85e8..494b6f331b74b1c81a50542e78d3eae07e0039fb 100644 (file)
@@ -292,6 +292,7 @@ authzid_op_bind(
                op->o_callback->sc_response = authzid_response;
                op->o_callback->sc_cleanup = authzid_cleanup;
                op->o_callback->sc_private = NULL;
+               op->o_callback->sc_writewait = NULL;
                op->o_callback->sc_next = sc;
        }
 
index c94b67cbc8ae6283c1b95fd58641a1611dd979e8..2448b9489ac7c4ccad5893dbb141c8debb257a66 100644 (file)
@@ -1245,6 +1245,7 @@ overlay_remove( BackendDB *be, slap_overinst *on, Operation *op )
        rm_cb->sc_cleanup = overlay_remove_cb;
        rm_cb->sc_response = NULL;
        rm_cb->sc_private = (void*) rm_ctx;
+       rm_cb->sc_writewait = NULL;
 
        /* Append callback to the end of the list */
        if ( !op->o_callback ) {
index 33323e399d4225ba41563a9fde98d1003867e8fc..5c65b42dc90e07c3407ad11d12792e4287640833 100644 (file)
@@ -601,7 +601,7 @@ constraint_violation( constraint *c, struct berval *bv, Operation *op )
                case CONSTRAINT_URI: {
                        Operation nop = *op;
                        slap_overinst *on = (slap_overinst *) op->o_bd->bd_info;
-                       slap_callback cb;
+                       slap_callback cb = { 0 };
                        int i;
                        int found = 0;
                        int rc;
@@ -609,9 +609,7 @@ constraint_violation( constraint *c, struct berval *bv, Operation *op )
                        struct berval filterstr;
                        char *ptr;
 
-                       cb.sc_next = NULL;
                        cb.sc_response = constraint_uri_cb;
-                       cb.sc_cleanup = NULL;
                        cb.sc_private = &found;
 
                        nop.o_protocol = LDAP_VERSION3;
index 39aaa8046fc45ae6794a52a730d2c6b7d8368a41..d7d9dd5da4b7a1749ee60daf0efe61571ec3a826 100644 (file)
@@ -442,6 +442,7 @@ dds_op_add( Operation *op, SlapReply *rs )
                        sc->sc_response = dds_counter_cb;
                        sc->sc_private = di;
                        sc->sc_next = op->o_callback;
+                       sc->sc_writewait = 0;
 
                        op->o_callback = sc;
                }
@@ -476,6 +477,7 @@ dds_op_delete( Operation *op, SlapReply *rs )
                        sc->sc_cleanup = dds_freeit_cb;
                        sc->sc_response = dds_counter_cb;
                        sc->sc_private = di;
+                       sc->sc_writewait = 0;
                        sc->sc_next = op->o_callback;
        
                        op->o_callback = sc;
index 25ea9b288465c0ef11d0813c092a603fcc37ed35..e568291bdeb20500c9a2bb41302b6439922d4463 100644 (file)
@@ -346,7 +346,7 @@ static int
 dynlist_prepare_entry( Operation *op, SlapReply *rs, dynlist_info_t *dli )
 {
        Attribute       *a, *id = NULL;
-       slap_callback   cb;
+       slap_callback   cb = { 0 };
        Operation       o = *op;
        struct berval   *url;
        Entry           *e;
@@ -404,8 +404,6 @@ dynlist_prepare_entry( Operation *op, SlapReply *rs, dynlist_info_t *dli )
        dlc.dlc_dli = dli;
        cb.sc_private = &dlc;
        cb.sc_response = dynlist_sc_update;
-       cb.sc_cleanup = NULL;
-       cb.sc_next = NULL;
 
        o.o_callback = &cb;
        o.ors_deref = LDAP_DEREF_NEVER;
index f0f366c101998b5d99a83e4df1712c8b26325bf8..40ad6e274a8ed71d5596799e631544bb1e02b451 100644 (file)
@@ -737,6 +737,7 @@ memberof_op_add( Operation *op, SlapReply *rs )
        sc->sc_private = sc+1;
        sc->sc_response = memberof_res_add;
        sc->sc_cleanup = memberof_cleanup;
+       sc->sc_writewait = 0;
        mci = sc->sc_private;
        mci->on = on;
        mci->member = NULL;
@@ -771,6 +772,7 @@ memberof_op_delete( Operation *op, SlapReply *rs )
        sc->sc_private = sc+1;
        sc->sc_response = memberof_res_delete;
        sc->sc_cleanup = memberof_cleanup;
+       sc->sc_writewait = 0;
        mci = sc->sc_private;
        mci->on = on;
        mci->member = NULL;
@@ -1189,6 +1191,7 @@ done2:;
        sc->sc_private = sc+1;
        sc->sc_response = memberof_res_modify;
        sc->sc_cleanup = memberof_cleanup;
+       sc->sc_writewait = 0;
        mci = sc->sc_private;
        mci->on = on;
        mci->member = NULL;
@@ -1234,6 +1237,7 @@ memberof_op_modrdn( Operation *op, SlapReply *rs )
        sc->sc_private = sc+1;
        sc->sc_response = memberof_res_modrdn;
        sc->sc_cleanup = memberof_cleanup;
+       sc->sc_writewait = 0;
        mci = sc->sc_private;
        mci->on = on;
        mci->member = NULL;
index 9931db9a756553ddefc9d6ed62def02755b103e2..8ff75b898cf102e8d37eab09863e423c54925fda 100644 (file)
@@ -2838,7 +2838,7 @@ pcache_op_bind(
        QueryTemplate *temp;
        Entry *e;
        slap_callback   cb = { 0 }, *sc;
-       bindinfo bi;
+       bindinfo bi = { 0 };
        bindcacheinfo *bci;
        Operation op2;
        int rc;
@@ -2868,7 +2868,6 @@ pcache_op_bind(
        op2 = *op;
        op2.o_dn = op->o_bd->be_rootdn;
        op2.o_ndn = op->o_bd->be_rootndn;
-       bi.bi_flags = 0;
 
        op2.o_bd = &cm->db;
        e = NULL;
@@ -2897,11 +2896,8 @@ pcache_op_bind(
         */
        bi.bi_cm = cm;
        bi.bi_templ = temp;
-       bi.bi_cq = NULL;
-       bi.bi_si = NULL;
 
        bi.bi_cb.sc_response = pc_bind_search;
-       bi.bi_cb.sc_cleanup = NULL;
        bi.bi_cb.sc_private = &bi;
        cb.sc_private = &bi;
        cb.sc_response = pc_bind_resp;
@@ -2937,6 +2933,7 @@ pcache_op_bind(
                sc->sc_response = pc_bind_save;
                sc->sc_cleanup = NULL;
                sc->sc_private = sc+1;
+               sc->sc_writewait = NULL;
                bci = sc->sc_private;
                sc->sc_next = op->o_callback;
                op->o_callback = sc;
@@ -3129,6 +3126,7 @@ pcache_op_search(
                cb->sc_response = pcache_response;
                cb->sc_cleanup = pcache_op_cleanup;
                cb->sc_private = (cb+1);
+               cb->sc_writewait = 0;
                si = cb->sc_private;
                si->on = on;
                si->query = query;
index 7c50239c11c4f092221988b94aa6aadb98294806..ba070e910063c8b4e756c1077db9aa933b6b4b48 100644 (file)
@@ -923,6 +923,7 @@ static int sssvlv_op_search(
                        cb->sc_response         = sssvlv_op_response;
                        cb->sc_next                     = op->o_callback;
                        cb->sc_private          = so;
+                       cb->sc_writewait        = NULL;
 
                        so->so_tree = NULL;
                        so->so_ctrl = sc;
index 6f6d765ba95f59459464c139e9f7dc79318a5661..150b93467df65424773e6b0cd493beaa2edda5b3 100644 (file)
@@ -2499,7 +2499,7 @@ syncprov_op_search( Operation *op, SlapReply *rs )
                syncops so = {0};
                fbase_cookie fc;
                opcookie opc;
-               slap_callback sc;
+               slap_callback sc = {0};
 
                fc.fss = &so;
                fc.fbase = 0;
index 69aa6f2ded6788e12b33bf28bb854cbd955ec1b9..18cdadfa2d1d463788a898e0c91383435fd8ee52 100644 (file)
@@ -82,6 +82,7 @@ slapi_op_internal_p( Operation *op, SlapReply *rs, slap_callback *cb )
                cb->sc_response = slapi_over_response;
                cb->sc_cleanup = slapi_over_cleanup;
                cb->sc_private = pb;
+               cb->sc_writewait = 0;
                cb->sc_next = op->o_callback;
                op->o_callback = cb;
        }
@@ -734,6 +735,7 @@ slapi_over_access_allowed(
 
        cb.sc_response = NULL;
        cb.sc_cleanup = NULL;
+       cb.sc_writewait = NULL;
 
        pb = SLAPI_OPERATION_PBLOCK( op );
 
@@ -798,6 +800,7 @@ slapi_over_acl_group(
 
                cb.sc_response = NULL;
                cb.sc_cleanup = NULL;
+               cb.sc_writewait = NULL;
 
                pb = SLAPI_OPERATION_PBLOCK( op );
 
index 95116b48b12c0e312bba39a6702ea1e3483dc1f4..fc322dbcf3430be3f8622512fff27421aeb53f38 100644 (file)
@@ -2253,6 +2253,7 @@ syncrepl_op_modify( Operation *op, SlapReply *rs )
                sc->sc_private = mx;
                sc->sc_next = op->o_callback;
                sc->sc_cleanup = NULL;
+               sc->sc_writewait = NULL;
                op->o_callback = sc;
                op->orm_no_opattrs = 1;
                mx->mx_orig = op->orm_modlist;