From 294da7ed11a9a5721b15d0ed81682f123e20cbb0 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Thu, 20 Mar 2008 01:24:33 +0000 Subject: [PATCH] ITS#5435 ConfigReply arg must be non-NULL --- servers/slapd/back-bdb/config.c | 4 ++-- servers/slapd/backend.c | 2 +- servers/slapd/backglue.c | 3 ++- servers/slapd/overlays/pcache.c | 2 +- servers/slapd/overlays/translucent.c | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/servers/slapd/back-bdb/config.c b/servers/slapd/back-bdb/config.c index 8a762aee14..184ebb64d5 100644 --- a/servers/slapd/back-bdb/config.c +++ b/servers/slapd/back-bdb/config.c @@ -337,9 +337,9 @@ bdb_cf_cleanup( ConfigArgs *c ) if ( bdb->bi_flags & BDB_RE_OPEN ) { bdb->bi_flags ^= BDB_RE_OPEN; - rc = c->be->bd_info->bi_db_close( c->be, NULL ); + rc = c->be->bd_info->bi_db_close( c->be, &c->reply ); if ( rc == 0 ) - rc = c->be->bd_info->bi_db_open( c->be, NULL ); + rc = c->be->bd_info->bi_db_open( c->be, &c->reply ); /* If this fails, we need to restart */ if ( rc ) { slapd_shutdown = 2; diff --git a/servers/slapd/backend.c b/servers/slapd/backend.c index fb92cf6f7f..2f26623428 100644 --- a/servers/slapd/backend.c +++ b/servers/slapd/backend.c @@ -269,7 +269,7 @@ int backend_startup(Backend *be) /* open frontend, if required */ if ( frontendDB->bd_info->bi_db_open ) { - rc = frontendDB->bd_info->bi_db_open( frontendDB, NULL ); + rc = frontendDB->bd_info->bi_db_open( frontendDB, &cr ); if ( rc != 0 ) { Debug( LDAP_DEBUG_ANY, "backend_startup: bi_db_open(frontend) failed! (%d)\n", diff --git a/servers/slapd/backglue.c b/servers/slapd/backglue.c index b406f5b19f..c12d4de4e1 100644 --- a/servers/slapd/backglue.c +++ b/servers/slapd/backglue.c @@ -620,6 +620,7 @@ glue_open ( glueinfo *gi = on->on_bi.bi_private; static int glueOpened = 0; int i, j, same, bsame = 0, rc = 0; + ConfigReply cr = {0}; if (glueOpened) return 0; @@ -650,7 +651,7 @@ glue_open ( gi->gi_n[i].gn_be->bd_info ); /* Let backend.c take care of the rest of startup */ if ( !rc ) - rc = backend_startup_one( gi->gi_n[i].gn_be, NULL ); + rc = backend_startup_one( gi->gi_n[i].gn_be, &cr ); if ( rc ) break; } if ( !rc && !bsame && on->on_info->oi_orig->bi_open ) diff --git a/servers/slapd/overlays/pcache.c b/servers/slapd/overlays/pcache.c index 450706c127..700043e305 100644 --- a/servers/slapd/overlays/pcache.c +++ b/servers/slapd/overlays/pcache.c @@ -3209,7 +3209,7 @@ pcache_db_open2( query_manager* qm = cm->qm; int rc; - rc = backend_startup_one( &cm->db, NULL ); + rc = backend_startup_one( &cm->db, cr ); if ( rc == 0 ) { cm->defer_db_open = 0; } diff --git a/servers/slapd/overlays/translucent.c b/servers/slapd/overlays/translucent.c index 146245dfb0..7f91cff5e5 100644 --- a/servers/slapd/overlays/translucent.c +++ b/servers/slapd/overlays/translucent.c @@ -1147,7 +1147,7 @@ static int translucent_db_open(BackendDB *be, ConfigReply *cr) { if ( ov->defer_db_open ) return 0; - rc = backend_startup_one( &ov->db, NULL ); + rc = backend_startup_one( &ov->db, cr ); if(rc) Debug(LDAP_DEBUG_TRACE, "translucent: bi_db_open() returned error %d\n", rc, 0, 0); -- 2.39.5