Skip to content
Snippets Groups Projects
Commit 4a5cef74 authored by Pierangelo Masarati's avatar Pierangelo Masarati
Browse files

fix access control when no backend could be found (might need work)

parent ec0b3b4b
No related branches found
No related tags found
No related merge requests found
......@@ -222,9 +222,18 @@ slapacl( int argc, char **argv )
op->o_bd = frontendDB;
}
if ( !dryrun && be ) {
if ( !dryrun ) {
ID id;
if ( be == NULL ) {
fprintf( stderr, "%s: no target database "
"has been found for baseDN=\"%s\"; "
"you may try with \"-u\" (dry run).\n",
baseDN.bv_val, progname );
rc = 1;
goto destroy;
}
if ( !be->be_entry_open ||
!be->be_entry_close ||
!be->be_dn2id_get ||
......
......@@ -576,7 +576,7 @@ startup:;
mal_leaktrace(1);
#endif
if ( !dryrun && slap_startup( be ) ) {
if ( !dryrun && be && slap_startup( be ) ) {
switch ( tool ) {
case SLAPTEST:
fprintf( stderr, "slap_startup failed "
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment