]> git.sur5r.net Git - openldap/commitdiff
warn if one uses "dn:" inside an entry during add (likely forgot the newline between...
authorPierangelo Masarati <ando@openldap.org>
Sun, 20 Nov 2005 19:10:13 +0000 (19:10 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sun, 20 Nov 2005 19:10:13 +0000 (19:10 +0000)
clients/tools/ldapmodify.c

index d8e077561b6a15bc1170ed9ddd0e6e867a4183dc..a9e3497aa9956600710d0c66c4eb0e2ae461c2f5 100644 (file)
@@ -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 );
                }