From: Howard Chu Date: Sun, 15 Nov 2009 10:38:13 +0000 (+0000) Subject: Use fake_init2 in db_open/db_close since they can execute from a X-Git-Tag: ACLCHECK_0~118 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ff98f4abc5e1f9fe74b71c834270441a583768b0;p=openldap Use fake_init2 in db_open/db_close since they can execute from a back-config operation (and could wipe out the state otherwise) --- diff --git a/servers/slapd/back-monitor/init.c b/servers/slapd/back-monitor/init.c index 0cbe5682fb..dfd1d86115 100644 --- a/servers/slapd/back-monitor/init.c +++ b/servers/slapd/back-monitor/init.c @@ -841,7 +841,7 @@ monitor_search2ndn( } thrctx = ldap_pvt_thread_pool_context(); - connection_fake_init( &conn, &opbuf, thrctx ); + connection_fake_init2( &conn, &opbuf, thrctx, 0 ); op = &opbuf.ob_op; op->o_tag = LDAP_REQ_SEARCH; diff --git a/servers/slapd/back-sql/init.c b/servers/slapd/back-sql/init.c index 5aaa0011f1..c4f3322965 100644 --- a/servers/slapd/back-sql/init.c +++ b/servers/slapd/back-sql/init.c @@ -548,7 +548,7 @@ backsql_db_open( } /* This should just be to force schema loading */ - connection_fake_init( &conn, &opbuf, thrctx ); + connection_fake_init2( &conn, &opbuf, thrctx, 0 ); op = &opbuf.ob_op; op->o_bd = bd; if ( backsql_get_db_conn( op, &dbh ) != LDAP_SUCCESS ) { diff --git a/servers/slapd/overlays/dds.c b/servers/slapd/overlays/dds.c index a6c8db976d..f434720933 100644 --- a/servers/slapd/overlays/dds.c +++ b/servers/slapd/overlays/dds.c @@ -137,7 +137,7 @@ dds_expire( void *ctx, dds_info_t *di ) int rc; char *extra = ""; - connection_fake_init( &conn, &opbuf, ctx ); + connection_fake_init2( &conn, &opbuf, ctx, 0 ); op = &opbuf.ob_op; op->o_tag = LDAP_REQ_SEARCH; @@ -1627,7 +1627,7 @@ dds_count( void *ctx, BackendDB *be ) int rc; char *extra = ""; - connection_fake_init( &conn, &opbuf, ctx ); + connection_fake_init2( &conn, &opbuf, ctx, 0 ); op = &opbuf.ob_op; op->o_tag = LDAP_REQ_SEARCH; diff --git a/servers/slapd/overlays/pcache.c b/servers/slapd/overlays/pcache.c index bfd1cd30db..488079a01c 100644 --- a/servers/slapd/overlays/pcache.c +++ b/servers/slapd/overlays/pcache.c @@ -4490,7 +4490,7 @@ pcache_db_open2( AttributeAssertion ava = ATTRIBUTEASSERTION_INIT; AttributeName attrs[ 2 ] = {{{ 0 }}}; - connection_fake_init( &conn, &opbuf, thrctx ); + connection_fake_init2( &conn, &opbuf, thrctx, 0 ); op = &opbuf.ob_op; op->o_bd = &cm->db; @@ -4676,7 +4676,7 @@ pcache_db_close( thrctx = ldap_pvt_thread_pool_context(); - connection_fake_init( &conn, &opbuf, thrctx ); + connection_fake_init2( &conn, &opbuf, thrctx, 0 ); op = &opbuf.ob_op; if ( qm->templates != NULL ) { diff --git a/servers/slapd/overlays/syncprov.c b/servers/slapd/overlays/syncprov.c index ec1e836e94..a7e93cc336 100644 --- a/servers/slapd/overlays/syncprov.c +++ b/servers/slapd/overlays/syncprov.c @@ -2893,7 +2893,7 @@ syncprov_db_open( } thrctx = ldap_pvt_thread_pool_context(); - connection_fake_init( &conn, &opbuf, thrctx ); + connection_fake_init2( &conn, &opbuf, thrctx, 0 ); op = &opbuf.ob_op; op->o_bd = be; op->o_dn = be->be_rootdn; @@ -2978,7 +2978,7 @@ syncprov_db_close( void *thrctx; thrctx = ldap_pvt_thread_pool_context(); - connection_fake_init( &conn, &opbuf, thrctx ); + connection_fake_init2( &conn, &opbuf, thrctx, 0 ); op = &opbuf.ob_op; op->o_bd = be; op->o_dn = be->be_rootdn;