mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-19 05:13:35 -05:00
clarify error message and allow -u (dryrun) option for slaptest, to circumvent database startup
This commit is contained in:
parent
e5c58636de
commit
0ea4070eb1
2 changed files with 27 additions and 15 deletions
|
|
@ -378,10 +378,14 @@ bdb_db_open( BackendDB *be )
|
|||
bdb->bi_dbenv_mode );
|
||||
#endif
|
||||
|
||||
if( rc != 0 ) {
|
||||
if ( rc != 0 ) {
|
||||
char buf[SLAP_TEXT_BUFLEN];
|
||||
|
||||
snprintf( buf, sizeof(buf), "%s/%s",
|
||||
bdb->bi_dbenv_home, bdbi_databases[i].file );
|
||||
Debug( LDAP_DEBUG_ANY,
|
||||
"bdb_db_open: db_open(%s) failed: %s (%d)\n",
|
||||
bdb->bi_dbenv_home, db_strerror(rc), rc );
|
||||
buf, db_strerror(rc), rc );
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -49,35 +49,39 @@ usage( int tool, const char *progname )
|
|||
{
|
||||
char *options = NULL;
|
||||
fprintf( stderr,
|
||||
"usage: %s [-v] [-c] [-d debuglevel] [-f configfile]\n",
|
||||
"usage: %s [-v] [-c] [-d debuglevel] [-f configfile]",
|
||||
progname );
|
||||
|
||||
switch( tool ) {
|
||||
case SLAPACL:
|
||||
options = "\n\t[-U authcID | -D authcDN]"
|
||||
" -b DN [attr[/access][:value]] [...]\n";
|
||||
break;
|
||||
|
||||
case SLAPADD:
|
||||
options = "\t[-n databasenumber | -b suffix]\n"
|
||||
options = "\n\t[-n databasenumber | -b suffix]\n"
|
||||
"\t[-l ldiffile] [-u] [-p [-w] | -r [-i syncreplidlist] [-w]]\n";
|
||||
break;
|
||||
|
||||
case SLAPAUTH:
|
||||
options = "\n\t[-U authcID] [-X authzID] [-R realm] [-M mech] ID [...]\n";
|
||||
break;
|
||||
|
||||
case SLAPCAT:
|
||||
options = "\t[-n databasenumber | -b suffix]"
|
||||
options = "\n\t[-n databasenumber | -b suffix]"
|
||||
" [-l ldiffile] [-a filter] [-m] [-k]\n";
|
||||
break;
|
||||
|
||||
case SLAPDN:
|
||||
options = "\tDN [...]\n";
|
||||
options = " DN [...]\n";
|
||||
break;
|
||||
|
||||
case SLAPINDEX:
|
||||
options = "\t[-n databasenumber | -b suffix]\n";
|
||||
options = "\n\t[-n databasenumber | -b suffix]\n";
|
||||
break;
|
||||
|
||||
case SLAPAUTH:
|
||||
options = "\t[-U authcID] [-X authzID] [-R realm] [-M mech] ID [...]\n";
|
||||
break;
|
||||
|
||||
case SLAPACL:
|
||||
options = "\t[-U authcID | -D authcDN]"
|
||||
" -b DN [attr[/access][:value]] [...]\n";
|
||||
case SLAPTEST:
|
||||
options = " [-u]\n";
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -132,11 +136,15 @@ slap_tool_init(
|
|||
break;
|
||||
|
||||
case SLAPDN:
|
||||
case SLAPTEST:
|
||||
options = "d:f:v";
|
||||
mode |= SLAP_TOOL_READMAIN | SLAP_TOOL_READONLY;
|
||||
break;
|
||||
|
||||
case SLAPTEST:
|
||||
options = "d:f:uv";
|
||||
mode |= SLAP_TOOL_READMAIN | SLAP_TOOL_READONLY;
|
||||
break;
|
||||
|
||||
case SLAPAUTH:
|
||||
options = "d:f:M:R:U:vX:";
|
||||
mode |= SLAP_TOOL_READMAIN | SLAP_TOOL_READONLY;
|
||||
|
|
|
|||
Loading…
Reference in a new issue