int rc = EXIT_SUCCESS;
int manage = 0;
+ /* default "000" */
+ csnsid = 0;
+
slap_tool_init( progname, SLAPADD, argc, argv );
memset( &opbuf, 0, sizeof(opbuf) );
lmax = 0;
nextline = 0;
+ /* enforce schema checking unless not disabled */
+ if ( (slapMode & SLAP_TOOL_NO_SCHEMA_CHECK) == 0) {
+ SLAP_DBFLAGS(be) &= ~(SLAP_DBFLAG_NO_SCHEMA_CHECK);
+ }
+
if( !dryrun && be->be_entry_open( be, 1 ) != 0 ) {
fprintf( stderr, "%s: could not open database.\n",
progname );
nvals[1].bv_len = 0;
nvals[1].bv_val = NULL;
- csn.bv_len = lutil_csnstr( csnbuf, sizeof( csnbuf ), 0, 0 );
+ csn.bv_len = lutil_csnstr( csnbuf, sizeof( csnbuf ), csnsid, 0 );
csn.bv_val = csnbuf;
timestamp.bv_val = timebuf;
if ( attr ) {
int i;
- for ( i = 0; !BER_BVISNULL( &attr->a_vals[ i ] ); i++ ) {
+ for ( i = 0; !BER_BVISNULL( &attr->a_nvals[ i ] ); i++ ) {
int rc_sid;
rc_sid = slap_parse_csn_sid( &attr->a_nvals[ i ] );
}
}
- if ( attr->a_nvals != attr->a_vals ) {
- ber_bvarray_free( attr->a_vals );
+ if ( attr->a_nvals != attr->a_nvals ) {
+ ber_bvarray_free( attr->a_nvals );
}
attr->a_nvals = NULL;
ber_bvarray_free( attr->a_vals );