Skip to content
Snippets Groups Projects
Commit fc10815f authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

config should return error if backend or database initialization fail.

parent c6ec966f
No related branches found
No related tags found
No related merge requests found
......@@ -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 ) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment