#define SLAP_TOOL_READMAIN 0x0200
#define SLAP_TOOL_READONLY 0x0400
#define SLAP_TOOL_QUICK 0x0800
+#define SLAP_TOOL_NO_SCHEMA_CHECK 0x1000
#define SB_TLS_DEFAULT (-1)
#define SB_TLS_OFF 0
/* check schema */
op->o_bd = be;
- rc = entry_schema_check( op, e, NULL, manage,
- &text, textbuf, textlen );
+ if ( (slapMode & SLAP_TOOL_NO_SCHEMA_CHECK) == 0) {
+ rc = entry_schema_check( op, e, NULL, manage,
+ &text, textbuf, textlen );
- if( rc != LDAP_SUCCESS ) {
- fprintf( stderr, "%s: dn=\"%s\" (line=%d): (%d) %s\n",
- progname, e->e_dn, lineno, rc, text );
- rc = EXIT_FAILURE;
- entry_free( e );
- if( continuemode ) continue;
- break;
+ if( rc != LDAP_SUCCESS ) {
+ fprintf( stderr, "%s: dn=\"%s\" (line=%d): (%d) %s\n",
+ progname, e->e_dn, lineno, rc, text );
+ rc = EXIT_FAILURE;
+ entry_free( e );
+ if( continuemode ) continue;
+ break;
+ }
}
}
case SLAPADD:
options = " [-c]\n\t[-g] [-n databasenumber | -b suffix]\n"
- "\t[-l ldiffile] [-q] [-u] [-w]\n";
+ "\t[-l ldiffile] [-q] [-u] [-s] [-w]\n";
break;
case SLAPAUTH:
switch( tool ) {
case SLAPADD:
- options = "b:cd:f:F:gl:n:qtuvw";
+ options = "b:cd:f:F:gl:n:qstuvw";
break;
case SLAPCAT:
break;
case 's': /* dump subtree */
- subtree = strdup( optarg );
+ if ( tool == SLAPADD )
+ mode |= SLAP_TOOL_NO_SCHEMA_CHECK;
+ else if ( tool == SLAPCAT )
+ subtree = strdup( optarg );
break;
case 't': /* turn on truncate */