ITS#8435 Fix uninited slap_callback.sc_writewait

This commit is contained in:
Hallvard Furuseth 2016-06-12 08:30:58 +02:00
parent 92724fd39e
commit 23c5d6bbdd
11 changed files with 19 additions and 12 deletions

View 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;
}

View 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 ) {

View 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;

View 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;

View 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;

View 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;

View 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;

View 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;

View 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;

View 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 );

View 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;