break;
case SLAPAUTH:
- options = "\t[-U authcID] [-X authzID] ID [...]\n";
+ options = "\t[-U authcID] [-X authzID] [-R realm] [-M mech] ID [...]\n";
break;
case SLAPACL:
options = "\t[-U authcID | -D authcDN]"
- " -b DN attr[/level][:value] [...]\n";
+ " -b DN [attr[/access][:value]] [...]\n";
break;
}
break;
case SLAPAUTH:
- options = "d:f:U:vX:";
+ options = "d:f:M:R:U:vX:";
mode |= SLAP_TOOL_READMAIN | SLAP_TOOL_READONLY;
break;
usage( tool, progname );
exit( EXIT_FAILURE );
}
- str2clist( &replica_id_strlist, replica_id_string, "," );
+ slap_str2clist( &replica_id_strlist, replica_id_string, "," );
for ( i = 0; replica_id_strlist && replica_id_strlist[i]; i++ ) ;
replica_id_list = ch_calloc( i + 1, sizeof( int ) );
for ( i = 0; replica_id_strlist && replica_id_strlist[i]; i++ ) {
retrieve_ctxcsn = 1;
break;
+ case 'M':
+ ber_str2bv( optarg, 0, 0, &mech );
+ break;
+
case 'n': /* which config file db to index */
dbnum = atoi( optarg ) - 1;
break;
replica_demotion = 1;
break;
+ case 'R':
+ realm = optarg;
+ break;
+
case 's': /* dump subtree */
subtree = strdup( optarg );
break;
break;
case SLAPACL:
- if ( argc == optind ) {
- usage( tool, progname );
- }
if ( !BER_BVISNULL( &authcDN ) && !BER_BVISNULL( &authcID ) ) {
usage( tool, progname );
}
break;
}
- rc = glue_sub_init();
-
- if ( rc != 0 ) {
- fprintf( stderr, "Subordinate configuration error\n" );
- exit( EXIT_FAILURE );
- }
-
rc = slap_schema_check();
if ( rc != 0 ) {
void slap_tool_destroy( void )
{
- if ( !dryrun ) {
+ if ( !dryrun && be != NULL ) {
slap_shutdown( be );
}
slap_destroy();