From: Kurt Zeilenga Date: Mon, 13 Sep 1999 18:47:05 +0000 (+0000) Subject: config should return error if backend or database initialization fail. X-Git-Tag: UCDATA_2_4~433 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=fc10815fc86ba6520f2c35cdfaa901dbce3b46b5;p=openldap config should return error if backend or database initialization fail. --- diff --git a/servers/slapd/config.c b/servers/slapd/config.c index 493045cdf2..cc3ea8416e 100644 --- a/servers/slapd/config.c +++ b/servers/slapd/config.c @@ -123,6 +123,13 @@ read_config( const char *fname ) bi = backend_info( cargv[1] ); + if( bi == NULL ) { + Debug( LDAP_DEBUG_ANY, + "backend %s initialization failed.n", + cargv[1], 0, 0 ); + return( 1 ); + } + /* start of a new database definition */ } else if ( strcasecmp( cargv[0], "database" ) == 0 ) { if ( cargc < 2 ) { @@ -131,9 +138,17 @@ read_config( const char *fname ) fname, lineno, 0 ); return( 1 ); } + bi = NULL; be = backend_db_init( cargv[1] ); + if( be == NULL ) { + Debug( LDAP_DEBUG_ANY, + "database %s initialization failed.n", + cargv[1], 0, 0 ); + return( 1 ); + } + /* get pid file name */ } else if ( strcasecmp( cargv[0], "pidfile" ) == 0 ) { if ( cargc < 2 ) {