]> git.sur5r.net Git - openldap/commitdiff
Use fake_init2 in db_open/db_close since they can execute from a
authorHoward Chu <hyc@openldap.org>
Sun, 15 Nov 2009 10:38:13 +0000 (10:38 +0000)
committerHoward Chu <hyc@openldap.org>
Sun, 15 Nov 2009 10:38:13 +0000 (10:38 +0000)
back-config operation (and could wipe out the state otherwise)

servers/slapd/back-monitor/init.c
servers/slapd/back-sql/init.c
servers/slapd/overlays/dds.c
servers/slapd/overlays/pcache.c
servers/slapd/overlays/syncprov.c

index 0cbe5682fbc86871b36039c9b83a02aef6cd0dd7..dfd1d861157570b29c008248980109a71feaaab3 100644 (file)
@@ -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;
index 5aaa0011f1b47af8f9ae89747bdfcfd3c52f4ffb..c4f332296555ebf74c6c02ab81abf48bb813a26d 100644 (file)
@@ -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 ) {
index a6c8db976d08b27a45c34c41c2b971308b60254c..f4347209338c23eb5df55d9391d4eb7541fca400 100644 (file)
@@ -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;
index bfd1cd30db6fbe9a863756cb9e9eadfa907cdce9..488079a01c7aeed3fac9a4bc43adff5702934291 100644 (file)
@@ -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 ) {
index ec1e836e94eb846077346cee145f0b8011bbee4d..a7e93cc336c7a073a28b592c509899e8ec7b320d 100644 (file)
@@ -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;