From 67bb145098cb3d01b757da2e4d9402bebcce6774 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Thu, 3 Apr 2008 08:50:19 +0000 Subject: [PATCH] Should accept regular LDIF input --- tests/progs/slapd-addel.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 ); } -- 2.39.5