/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 1998-2012 The OpenLDAP Foundation.
+ * Copyright 1998-2014 The OpenLDAP Foundation.
* Portions Copyright 1998-2003 Kurt D. Zeilenga.
* Portions Copyright 2003 IBM Corporation.
* All rights reserved.
#include "slapcommon.h"
+extern int slap_DN_strict; /* dn.c */
+
static char csnbuf[ LDAP_PVT_CSNSTR_BUFSIZE ];
typedef struct Erec {
Entry *e;
- int lineno;
- int nextline;
+ unsigned long lineno;
+ unsigned long nextline;
} Erec;
typedef struct Trec {
Entry *e;
- int lineno;
- int nextline;
+ unsigned long lineno;
+ unsigned long nextline;
int rc;
int ready;
} Trec;
{
BackendDB *bd;
Entry *e;
+ int prev_DN_strict;
if ( erec->lineno < jumpline )
goto again;
+ if ( !dbnum ) {
+ prev_DN_strict = slap_DN_strict;
+ slap_DN_strict = 0;
+ }
e = str2entry2( buf, checkvals );
+ if ( !dbnum ) {
+ slap_DN_strict = prev_DN_strict;
+ }
if ( enable_meter )
lutil_meter_update( &meter,
0);
if( e == NULL ) {
- fprintf( stderr, "%s: could not parse entry (line=%d)\n",
+ fprintf( stderr, "%s: could not parse entry (line=%lu)\n",
progname, erec->lineno );
return -2;
}
if( BER_BVISEMPTY( &e->e_nname ) &&
!BER_BVISEMPTY( be->be_nsuffix ))
{
- fprintf( stderr, "%s: line %d: "
+ fprintf( stderr, "%s: line %lu: "
"cannot add entry with empty dn=\"%s\"",
progname, erec->lineno, e->e_dn );
bd = select_backend( &e->e_nname, nosubordinates );
/* check backend */
bd = select_backend( &e->e_nname, nosubordinates );
if ( bd != be ) {
- fprintf( stderr, "%s: line %d: "
+ fprintf( stderr, "%s: line %lu: "
"database #%d (%s) not configured to hold \"%s\"",
progname, erec->lineno,
dbnum,
id = be->be_entry_put( be, erec.e, &bvtext );
if( id == NOID ) {
fprintf( stderr, "%s: could not add entry dn=\"%s\" "
- "(line=%d): %s\n", progname, erec.e->e_dn,
+ "(line=%lu): %s\n", progname, erec.e->e_dn,
erec.lineno, bvtext.bv_val );
rc = EXIT_FAILURE;
if( continuemode ) {