mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
warn if one uses "dn:" inside an entry during add (likely forgot the newline between two entries)
This commit is contained in:
parent
22b6248c8d
commit
55349537ad
@ -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 );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user