From 55349537ad7fe6b23d4c0d61a7e8b2acacbd68af Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Sun, 20 Nov 2005 19:10:13 +0000 Subject: [PATCH] warn if one uses "dn:" inside an entry during add (likely forgot the newline between two entries) --- clients/tools/ldapmodify.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 ); } -- 2.39.5