From: Pierangelo Masarati Date: Sun, 20 Nov 2005 19:10:13 +0000 (+0000) Subject: warn if one uses "dn:" inside an entry during add (likely forgot the newline between... X-Git-Tag: OPENLDAP_REL_ENG_2_4_BP~761 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=55349537ad7fe6b23d4c0d61a7e8b2acacbd68af;p=openldap warn if one uses "dn:" inside an entry during add (likely forgot the newline between two entries) --- diff --git a/clients/tools/ldapmodify.c b/clients/tools/ldapmodify.c index d8e077561b..a9e3497aa9 100644 --- a/clients/tools/ldapmodify.c +++ b/clients/tools/ldapmodify.c @@ -475,7 +475,7 @@ process_ldif_rec( char *rbuf, int count ) { use_record = 1; } - } else if ( count == 1 && linenum == 1 && + } else if ( count == 1 && linenum == 1 && strcasecmp( type, T_VERSION_STR ) == 0 ) { if( val.bv_len == 0 || atoi(val.bv_val) != 1 ) { @@ -647,6 +647,11 @@ process_ldif_rec( char *rbuf, int count ) prog, linenum, dn ); rc = LDAP_PARAM_ERROR; } else { + if ( new_entry && strcasecmp( type, T_DN_STR ) == 0 ) { + fprintf( stderr, _("%s: attributeType \"%s\": " + "(missing newline after line %d of entry \"%s\"?)\n"), + prog, type, linenum - 1, dn ); + } addmodifyop( &pmods, modop, type, &val ); }