From: Howard Chu Date: Thu, 3 Apr 2008 08:50:19 +0000 (+0000) Subject: Should accept regular LDIF input X-Git-Tag: OPENLDAP_REL_ENG_2_4_9~20^2~43 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=67bb145098cb3d01b757da2e4d9402bebcce6774;p=openldap Should accept regular LDIF input --- diff --git a/tests/progs/slapd-addel.c b/tests/progs/slapd-addel.c index 87e4fdbe99..f186f670b3 100644 --- a/tests/progs/slapd-addel.c +++ b/tests/progs/slapd-addel.c @@ -278,7 +278,10 @@ get_add_entry( char *filename, LDAPMod ***mods ) if (( nl = strchr( line, '\r' )) || ( nl = strchr( line, '\n' ))) *nl = '\0'; - entry = strdup( line ); + nl = line; + if ( !strncasecmp( nl, "dn: ", 4 )) + nl += 4; + entry = strdup( nl ); }