/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 1998-2006 The OpenLDAP Foundation.
+ * Copyright 1998-2007 The OpenLDAP Foundation.
* Portions Copyright 1998-2003 Kurt D. Zeilenga.
* Portions Copyright 2003 IBM Corporation.
* All rights reserved.
break;
case SLAPINDEX:
- options = " [-c]\n\t[-g] [-n databasenumber | -b suffix] [-q]\n";
+ options = " [-c]\n\t[-g] [-n databasenumber | -b suffix] [attr ...] [-q]\n";
break;
case SLAPTEST:
while ( (i = getopt( argc, argv, options )) != EOF ) {
switch ( i ) {
case 'a':
- filterstr = strdup( optarg );
+ filterstr = ch_strdup( optarg );
break;
case 'b':
break;
case 'f': /* specify a conf file */
- conffile = strdup( optarg );
+ conffile = ch_strdup( optarg );
break;
case 'F': /* specify a conf dir */
- confdir = strdup( optarg );
+ confdir = ch_strdup( optarg );
break;
case 'g': /* disable subordinate glue */
break;
case 'l': /* LDIF file */
- ldiffile = strdup( optarg );
+ ldiffile = ch_strdup( optarg );
break;
case 'M':
if ( tool == SLAPADD )
mode |= SLAP_TOOL_NO_SCHEMA_CHECK;
else if ( tool == SLAPCAT )
- subtree = strdup( optarg );
+ subtree = ch_strdup( optarg );
break;
case 't': /* turn on truncate */
switch ( tool ) {
case SLAPADD:
case SLAPCAT:
- case SLAPINDEX:
if ( ( argc != optind ) || (dbnum >= 0 && base.bv_val != NULL ) ) {
usage( tool, progname );
}
break;
+ case SLAPINDEX:
+ if ( dbnum >= 0 && base.bv_val != NULL ) {
+ usage( tool, progname );
+ }
+
+ break;
+
case SLAPDN:
if ( argc == optind ) {
usage( tool, progname );
exit( EXIT_FAILURE );
}
+#ifdef LDAP_SYSLOG
if ( syslog_unknowns ) {
rc = parse_debug_unknowns( syslog_unknowns, &ldap_syslog );
ldap_charray_free( syslog_unknowns );
if ( rc )
exit( EXIT_FAILURE );
}
+#endif
at_oc_cache = 1;