X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fslapacl.c;h=925127d0570a05b99c53f33b62b4e455459785a7;hb=5631f25839a4a83521993639a96909267ea7bce6;hp=5b516c173730be9557dca23296c05ef85145f6aa;hpb=2430af4e8bbfb5e852321efc09bcdaf816f60286;p=openldap diff --git a/servers/slapd/slapacl.c b/servers/slapd/slapacl.c index 5b516c1737..925127d057 100644 --- a/servers/slapd/slapacl.c +++ b/servers/slapd/slapacl.c @@ -86,6 +86,8 @@ slapacl( int argc, char **argv ) rc = 1; goto destroy; } + + i++; } } @@ -213,9 +215,25 @@ slapacl( int argc, char **argv ) } op->o_bd = be; - if ( !dryrun && be ) { + if ( op->o_bd == NULL ) { + /* NOTE: if no database could be found (e.g. because + * accessing the rootDSE or so), use the frontendDB + * rules; might need work */ + op->o_bd = frontendDB; + } + + 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 ||