From 6a6adff86ce51004496b4c090f3feacc7bdfc953 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Sat, 8 Sep 2007 04:59:34 +0000 Subject: [PATCH] ITS#5129 disallow Quick mode if DB_CONFIG has changed --- servers/slapd/back-bdb/init.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/servers/slapd/back-bdb/init.c b/servers/slapd/back-bdb/init.c index 2d08bc4e10..88dee474bd 100644 --- a/servers/slapd/back-bdb/init.c +++ b/servers/slapd/back-bdb/init.c @@ -191,9 +191,18 @@ bdb_db_open( BackendDB *be, ConfigReply *cr ) if( stat( path, &stat2 ) == 0 ) { if( stat2.st_mtime < stat1.st_mtime ) { Debug( LDAP_DEBUG_ANY, - LDAP_XSTRING(bdb_db_open) ": DB_CONFIG for suffix \"%s\" has changed.\n" - "Performing database recovery to activate new settings.\n", - be->be_suffix[0].bv_val, 0, 0 ); + LDAP_XSTRING(bdb_db_open) ": DB_CONFIG for suffix \"%s\" has changed.\n", + be->be_suffix[0].bv_val, 0, 0 ); + if ( quick ) { + Debug( LDAP_DEBUG_ANY, + "Cannot use Quick mode, perform manual recovery first.\n", + 0, 0, 0 ); + return -1; + } else { + Debug( LDAP_DEBUG_ANY, + "Performing database recovery to activate new settings.\n", + 0, 0, 0 ); + } do_recover = DB_RECOVER; } } -- 2.39.5